Network address allocation method, server, terminal equipment and system

By allocating static IP addresses based on user identity information, the problem of operating system image management being unable to obtain accurate IP addresses is solved, and correct IP address settings and network communications for terminal devices are realized.

CN118694747APending Publication Date: 2024-09-24BEIJING HONGTENG INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310286843.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-22
Publication Date
2024-09-24

AI Technical Summary

Technical Problem

In the existing technology, operating system image management cannot obtain accurate IP addresses and cannot meet users' communication needs.

Method used

By matching the user identity information (such as user ID, department information, user information) with the preset user identity information when receiving a networking request from the terminal device, assign a static IP address and send it to the terminal device to Update its local IP address.

Benefits of technology

It realizes the correct IP address setting of each terminal device, meets the operating system image setting requirements, ensures normal network communication, and avoids the problem of operating system image management being unable to obtain accurate IP addresses.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118694747A
    Figure CN118694747A
Patent Text Reader

Abstract

The invention relates to the technical field of internet, in particular to a network address allocation method, a server, terminal equipment and a system. When user identity information is successfully matched with preset user identity information, a corresponding static IP address is allocated according to the user identity information; therefore, the terminal equipment can update the local IP address according to the distributed static IP address so as to access to the local area network where the server is located, correct IP address setting of all the terminal equipment can be achieved while the mirror image setting requirement of an operating system is met, network communication is achieved, and user experience is improved. The technical problems that in the prior art, an accurate IP address cannot be obtained through operation system mirror image management, and the communication requirement of a user cannot be met are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of Internet technology, and in particular to a network address allocation method, server, terminal equipment and system. Background Art

[0002] Operating system images are currently a common means for enterprises to manage operating systems. However, once the operating system image is produced, all configurations in the system are exactly the same, especially the IP address information. As the basis of network communication, if the correct IP address cannot be obtained, network communication cannot be carried out. Enterprises generally use the DHCP mechanism to handle the IP address allocation problem of system images, but most enterprises use static IP addresses. There is a corresponding relationship between IP addresses and departments and personnel. Therefore, the use of DHCP has great limitations and cannot meet user needs.

[0003] The above contents are only used to assist in understanding the technical solution of the present invention and do not constitute an admission that the above contents are prior art. Summary of the invention

[0004] The main purpose of the present invention is to provide a network address allocation method, server, terminal device and system, aiming to solve the technical problem in the prior art that the operating system image management cannot obtain accurate IP addresses and cannot meet the communication needs of users.

[0005] To achieve the above object, the present invention provides a network address allocation method, which is applied to a server and comprises the following steps:

[0006] When receiving a networking request from a terminal device, determining user identity information according to the networking request;

[0007] Matching the user identity information with preset user identity information;

[0008] When the match is successful, a static IP address is allocated according to the user identity information, and the static IP address is sent to the terminal device, so that the terminal device updates the local IP address according to the static IP address.

[0009] Optionally, the user identity information includes: user ID, department information and user information;

[0010] The matching of the user identity information with preset user identity information includes:

[0011] Matching the user ID, the department information and the user information with the preset user identity information respectively;

[0012] When the match is successful, detecting whether the user ID, the department information and the user information are correspondingly associated according to the preset user identity information;

[0013] Accordingly, when the match is successful, a static IP address is allocated according to the user identity information, and the static IP address is sent to the terminal device, including:

[0014] If the user ID, the department information and the user information are associated with each other, then the match is determined to be successful;

[0015] When the match is successful, a static IP address is allocated according to the user ID, the department information and the user information, and the static IP address is sent to the terminal device.

[0016] Optionally, the detecting, according to the preset user identity information, whether the user ID, the department information, and the user information are correspondingly associated includes:

[0017] Using at least one of the user ID, the department information, and the user information as reference information;

[0018] Determine the remaining information corresponding to the reference information according to the preset user identity information;

[0019] Compare the user ID, the department information and the user information with the remaining information;

[0020] Determine whether the user ID, the department information, and the user information are correspondingly associated based on the comparison result.

[0021] Optionally, allocating a static IP address according to the user ID, the department information, and the user information includes:

[0022] Determine the LAN type based on preset networking requirements;

[0023] and determining a corresponding first IP network segment address according to the local area network type;

[0024] Determine the subnet IP address according to the department information, and determine the host address according to the user ID and / or the user information;

[0025] A static IP address is determined based on the first IP network segment address, the subnet IP address, and the host address.

[0026] Optionally, before allocating a static IP address according to the user identity information, the method further includes:

[0027] Get the number of current network users;

[0028] When the number of current networking users is less than the rated number of users, a static IP address is allocated according to the user identity information.

[0029] Optionally, after obtaining the number of current networking users, the method further includes:

[0030] When the number of current networking users is less than the rated number of users, a target host position is determined, and a step of allocating a static IP address according to the user identity information and the target host position is performed.

[0031] Optionally, when receiving a networking request sent by a terminal device, before determining the user identity information according to the networking request, the method further includes:

[0032] Determine a preset storage space, and create an operating system image in the preset storage space;

[0033] When a networking request from a terminal device is received, user identity information is determined based on the networking request through the operating system image.

[0034] Optionally, the creating an operating system image in the preset storage space includes:

[0035] Determine the local files corresponding to the local operating system;

[0036] Copy the local file and use the copied file as a mirror file;

[0037] The image file is correspondingly stored in the preset storage space to create an operating system image.

[0038] Optionally, when the match is successful, after allocating a static IP address according to the user identity information and sending the static IP address to the terminal device so that the terminal device updates the local IP address according to the static IP address, the method further includes:

[0039] Check whether the terminal devices with the same department information are in the same subnet;

[0040] If not, determining the target subnet mask based on the user identity information and the static IP address;

[0041] The target subnet mask is sent to the terminal device, so that the terminal device updates the local subnet mask according to the target subnet mask.

[0042] Optionally, the detecting whether the terminal devices with the same department information are in the same subnet includes:

[0043] Generate a target network segment information set according to the subnet mask corresponding to the terminal device with the same department information and the static IP address;

[0044] Detecting whether the target network segment information sets are the same;

[0045] When the target network segment information sets are the same, it is determined that the terminal devices with the same department information are in the same subnet.

[0046] Optionally, the network address allocation method further includes:

[0047] After a preset time interval, obtain the file information of the terminal devices connected in this network segment;

[0048] The historical backup file information is updated according to the file information and stored accordingly.

[0049] In addition, to achieve the above objectives, the present invention also proposes a server, which includes: a memory, a processor, and a network address allocation program stored in the memory and executable on the processor, wherein the network address allocation program is configured to implement the steps of the network address allocation method described above.

[0050] The present invention provides a network address allocation method, which is applied to a terminal device and comprises the following steps:

[0051] Determine a temporary IP address, and send a networking request to a server based on the temporary IP address, so that the server can feedback a static IP address, wherein the networking request is generated according to the user ID, department information, and user information in the user identity information;

[0052] The local IP address is updated according to the static IP address.

[0053] Optionally, determining the temporary IP address includes:

[0054] Sending a communication request to at least one target terminal device by multicasting, so that the target terminal device feeds back a communication response;

[0055] A temporary IP address is generated according to the communication response.

[0056] Optionally, generating a temporary IP address according to the communication response includes:

[0057] Determine an idle IP address in the same network segment according to the communication response;

[0058] The idle IP address is recorded as a temporary IP address.

[0059] Optionally, sending a networking request to the server based on the temporary IP address includes:

[0060] Updating the local IP address according to the temporary IP address;

[0061] Generate a networking request based on the user ID, department information, and user information;

[0062] Send a networking request to the server according to the updated local IP address.

[0063] Optionally, after sending the networking request to the server based on the temporary IP address, the method further includes:

[0064] When the server feeds back the target subnet mask, the local subnet mask is updated according to the target subnet mask.

[0065] Optionally, the network address allocation method further includes:

[0066] After a preset time interval, the local file information is uploaded to the server, so that the server updates the historical backup file information according to the local file information and stores it accordingly.

[0067] In addition, to achieve the above-mentioned purpose, the present invention also proposes a terminal device, which includes: a memory, a processor, and a network address allocation program stored in the memory and executable on the processor, wherein the network address allocation program is configured to implement the steps of the network address allocation method described above.

[0068] In addition, to achieve the above-mentioned purpose, the present invention further proposes a storage medium, on which a network address allocation program is stored, and when the network address allocation program is executed by a processor, the steps of the network address allocation method described above are implemented.

[0069] The present invention allocates a corresponding static IP address according to the user identity information when the user identity information successfully matches the preset user identity information, so that the terminal device can update the local IP address according to the allocated static IP address, thereby accessing the local area network where the server is located. While meeting the operating system mirror setting requirements, the correct IP address setting of each terminal device can also be achieved to realize network communication, avoiding the technical problem in the prior art that the operating system mirror management cannot obtain an accurate IP address and cannot meet the user's communication needs. BRIEF DESCRIPTION OF THE DRAWINGS

[0070] Figure 1 It is a structural diagram of a network address allocation device in a hardware operating environment involved in an embodiment of the present invention;

[0071] Figure 2 A schematic diagram of a flow chart of a first embodiment of a network address allocation method according to the present invention;

[0072] Figure 3 A schematic diagram of a local area network architecture according to an embodiment of a network address allocation method of the present invention;

[0073] Figure 4 It is a structural diagram of a network address allocation device in a hardware operating environment involved in an embodiment of the present invention;

[0074] Figure 5 It is a flowchart diagram of the second embodiment of the network address allocation device of the present invention.

[0075] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0076] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0077] Reference Figure 1 , Figure 1 The figure is a schematic diagram of the server structure of the hardware operating environment involved in the embodiment of the present invention.

[0078] like Figure 1 As shown, the server may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (Wireless-Fidelity, Wi-Fi) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM), or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk storage. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0079] Those skilled in the art will understand that Figure 1 The structure shown in the figure does not constitute a limitation on the server, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0080] like Figure 1As shown, the memory 1005 as a storage medium may include an operating system, a network communication module, a user interface module, and a network address allocation program.

[0081] exist Figure 1 In the server shown, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the server of the present invention can be set in the server, and the server calls the network address allocation program stored in the memory 1005 through the processor 1001, and executes the network address allocation method provided by the embodiment of the present invention.

[0082] The embodiment of the present invention provides a method for allocating network addresses. Figure 2 , Figure 2 It is a flowchart of a first embodiment of a network address allocation method of the present invention.

[0083] In this embodiment, the network address allocation method is applied to a server, and the network address allocation method includes the following steps:

[0084] Step S10: upon receiving a networking request from a terminal device, determining user identity information according to the networking request.

[0085] It should be noted that the executor of the method of this embodiment can be a device with data processing, data transmission and network communication functions, such as a server or a cloud switch, etc., or other devices that can achieve the same or similar functions. This embodiment does not impose specific restrictions on this. In this embodiment and the following embodiments, the server will be used as an example for explanation.

[0086] It should be understood that Dynamic Host Configuration Protocol (DHCP) refers to the protocol used by computers to obtain configuration information. Its function is to assign an IP address to a PC. However, DHCP has three IP address allocation mechanisms: 1. Automatic Allocation: The DHCP server assigns a permanent IP address to the host. Once the DHCP client successfully leases an IP address from the DHCP server for the first time, it can use the address permanently. 2. Dynamic Allocation: The DHCP server assigns a time-limited IP address to the host. When the time expires or the host explicitly expresses its intention to give up the address, the address can be used by other hosts. 3. Manual Allocation: The IP address of the client is assigned by the network administrator, and the DHCP server only tells the client host the assigned IP address. Among the three address allocation methods, only dynamic allocation can reuse addresses that the client no longer needs, but it has a time limit, which is not conducive to enterprise management and reduces management efficiency.

[0087] It is worth noting that the terminal device can be a device with functions such as data transmission, data processing and network communication, such as a computer or a control computer, or other devices that can achieve the same or similar functions. This embodiment does not impose specific restrictions on this.

[0088] It can be understood that a networking request refers to a request issued by a terminal device to form a local area communication network with other terminal devices and servers, wherein the networking request can be used to establish a local area communication network, and can also be used to request to join an already established local area communication network. This embodiment does not impose specific restrictions on this.

[0089] It should be noted that the user identity information should include at least one of the following information: user ID, department information, and user information. The user ID, department information, and user information may have different settings depending on the operating system architecture. The user ID is unique. The department information refers to the department category, department to which the terminal device belongs, and subordinate departments. The user signal includes the user's name, years of service, position level, and other basic information. This embodiment does not impose any specific restrictions on this.

[0090] Furthermore, establishing an operating system image can realize personnel management or data backup for an enterprise or user to a high degree. When receiving a networking request from a terminal device, before determining the user identity information according to the networking request, it also includes:

[0091] Determine a preset storage space, and create an operating system image in the preset storage space;

[0092] When a networking request from a terminal device is received, user identity information is determined based on the networking request through the operating system image.

[0093] It can be understood that making an operating system image can be to copy the operating system files and store them in files in .ISO or .Adi formats so that other software or programs can read the files and re-expand them. After the operating system image is created, it is also necessary to make the client program in the operating system image and deploy the operating system image to the terminal device, and automatically run the client program.

[0094] Step S20: Match the user identity information with preset user identity information.

[0095] It should be understood that the preset user identity information refers to all personnel structure and user identity information of the user organization pre-entered into the operating system image, such as user work number, department information, and user information, etc. This embodiment does not impose specific restrictions on this.

[0096] In a specific implementation, controlling the user identity information to match with the preset user identity information means matching the user ID, department information, user information and other information with the user identity information already stored in the operating system image, so as to verify whether the terminal device that issues the networking request can access the network.

[0097] Furthermore, matching the user identity information with preset user identity information includes:

[0098] Matching the user ID, the department information and the user information with the preset user identity information respectively;

[0099] When the match is successful, detecting whether the user ID, the department information and the user information are correspondingly associated according to the preset user identity information;

[0100] Accordingly, when the match is successful, a static IP address is allocated according to the user identity information, and the static IP address is sent to the terminal device, including:

[0101] If the user ID, the department information and the user information are associated with each other, then the match is determined to be successful;

[0102] When the match is successful, a static IP address is allocated according to the user ID, the department information and the user information, and the static IP address is sent to the terminal device.

[0103] It should be noted that even if the preset user identity information contains information such as the user work number, department information, and user information in the user networking request, it does not mean that the terminal device is a person within the company. It is necessary to combine the correlation between the user work number, department information, and user information in order to determine whether authorization to access the local area communication network can be obtained.

[0104] Further, the detecting, according to the preset user identity information, whether the user ID, the department information, and the user information are correspondingly associated includes:

[0105] Using at least one of the user ID, the department information, and the user information as reference information;

[0106] Determine the remaining information corresponding to the reference information according to the preset user identity information;

[0107] Compare the user ID, the department information and the user information with the remaining information;

[0108] Determine whether the user ID, the department information, and the user information are correspondingly associated based on the comparison result.

[0109] Among them, the reference information can be any one of the user ID, department information and user information, and the remaining information refers to the information other than the reference information. For example, if the reference information is the user ID, the remaining information refers to the department information and user information. This embodiment does not make specific restrictions on this.

[0110] In the specific implementation, the user's work number is used as reference information, and the remaining information is department information and user information. The department to which the user works and the corresponding name, position, age and other information are queried through the preset user identity information. This is to facilitate comparison with the remaining information (i.e., department information and user information). When the comparison results are consistent, it is determined that the user's work number, department information and user information are correspondingly associated.

[0111] Step S30: when the match is successful, a static IP address is allocated according to the user identity information, and the static IP address is sent to the terminal device, so that the terminal device updates the local IP address according to the static IP address.

[0112] It should be noted that when static IP addresses are assigned based on user identity information, the IP address of each terminal device is unique in the local area communication network. If there are multiple devices with the same IP address in the same network, network communication failures will occur during network communication.

[0113] When the terminal device establishes a communication connection with the server,

[0114] Furthermore, in order to assign a unique static IP address to the terminal device, the assigning of the static IP address according to the user ID, the department information and the user information includes:

[0115] Determine the LAN type based on preset networking requirements;

[0116] and determining a corresponding first IP network segment address according to the local area network type;

[0117] Determine the subnet IP address according to the department information, and determine the host address according to the user ID and / or the user information;

[0118] A static IP address is determined based on the first IP network segment address, the subnet IP address, and the host address.

[0119] It should be noted that the LAN types include: Class A 10.0.0.1~10.255.255.254, Class B 172.16.0.1~172.31.255.254 and Class C 192.168.0.1~192.168.255.254. The preset networking requirements refer to the type requirements for establishing a LAN communication network based on user needs. The first IP network segment address is related to the LAN type. For example: for a Class A LAN, the first IP network segment address is 10; for a Class B LAN, the first IP network segment address is 172; for a Class C LAN, the first IP network segment address is 192.168. Different LAN types have different corresponding first IP network segment address lengths and values, which are mainly determined according to user needs.

[0120] In practice, the operating system architecture of a company or organization is represented by a tree structure, with departments as leaf nodes. Figure 3 , Figure 3 This is a LAN department structure diagram. The main node is the server. If there are multiple subordinate departments under different departments, new leaf nodes will be added. If they do not exist, they will be directly connected to the terminal devices corresponding to each user.

[0121] Therefore, when determining the subnet IP address of a terminal device, the subnet IP address can be determined according to the department to which the terminal device belongs. Taking a Class C network as an example, if there are three departments A, B, and C, the static IP addresses of these three departments can be divided into 192.168.1.XXX, 192.168.2.XXX, and 192.168.3.XXX. This embodiment does not impose any specific restrictions on this.

[0122] Then, the remaining IP addresses are allocated according to the free IP addresses in the department information. At this time, if there are no free IP addresses, they cannot be allocated. Therefore, before allocating static IP addresses according to the user identity information, the following is also included:

[0123] Get the number of current network users;

[0124] When the number of current networking users is less than the rated number of users, a static IP address is allocated according to the user identity information.

[0125] It is understandable that the rated number of users may be the maximum number of user connections in the entire local area communication network, or may be the number of personnel in a department when allocating specific IP addresses, and this embodiment does not impose any specific restrictions on this.

[0126] Furthermore, after obtaining the number of current networking users, the method further includes:

[0127] When the number of current networking users is less than the rated number of users, a target host position is determined, and a step of allocating a static IP address according to the user identity information and the target host position is performed.

[0128] It should be understood that, taking Class C addresses as an example, within the same subnet, the parameter that affects the maximum number of connectable hosts is the number of host bits. For example: the subnet with an IP address of 192.168.1.0 / 24, where the network bit is 24 bits, and since the number of bits of a Class C address is 32 bits, the host bit is 8, and the maximum number of connectable hosts is 2 to the power of 8 minus 2, which is 256-2=254. By modifying the number of host bits, the number of hosts can be increased to a certain extent, but the maximum can only be 8.

[0129] Furthermore, when the matching is successful, after allocating a static IP address according to the user identity information and sending the static IP address to the terminal device so that the terminal device updates the local IP address according to the static IP address, it also includes:

[0130] Check whether the terminal devices with the same department information are in the same subnet;

[0131] If not, determining the target subnet mask based on the user identity information and the static IP address;

[0132] The target subnet mask is sent to the terminal device, so that the terminal device updates the local subnet mask according to the target subnet mask.

[0133] It is worth noting that the subnet mask is used to indicate which bits of an IP address identify the subnet where the host is located, and which bits of the bit mask identify whether the host is in the same subnet. The IP address and the subnet mask need to be determined. If two terminal devices have the same IP address but different subnet masks, it is possible that the two terminal devices are not in the same subnet. The subnet mask cannot exist alone and needs to be used in conjunction with the IP address.

[0134] Furthermore, the step of detecting whether the terminal devices with the same department information are in the same subnet includes:

[0135] Generate a target network segment information set according to the subnet mask corresponding to the terminal device with the same department information and the static IP address;

[0136] Detecting whether the target network segment information sets are the same;

[0137] When the target network segment information sets are the same, it is determined that the terminal devices with the same department information are in the same subnet.

[0138] In the specific implementation, the target network segment information in the same network segment should be the same. Multiple hosts can be connected to one network segment at the same time. The calculation of the target network segment information can be to convert the IP address and subnet mask into binary parameter groups respectively, and then perform AND operation on the converted IP address and subnet mask to obtain the final target network segment information. For example, the IP address of a terminal device is 192.168.1.1, and the subnet mask is 255.255.255.0. After calculation, the network segment to which the terminal device belongs is 192.168.1.0. Similarly, the IP address of a terminal device is 192.168.1.2, and the subnet mask is 255.255.255.0. After calculation, the network segment to which the terminal device belongs is also 192.168.1.0.

[0139] Furthermore, in this embodiment, the network address allocation method further includes:

[0140] After a preset time interval, obtain the file information of the terminal devices connected in this network segment;

[0141] The historical backup file information is updated according to the file information and stored accordingly.

[0142] It is understandable that the historical backup file information can be stored in the storage space where the operating system image file is located, and used for data backup and data restoration, etc. This embodiment does not impose specific restrictions on this.

[0143] This embodiment allocates a corresponding static IP address according to the user identity information when the user identity information successfully matches the preset user identity information, so that the terminal device can update the local IP address according to the allocated static IP address, thereby accessing the local area network where the server is located. While meeting the operating system image setting requirements, it can also achieve the correct IP address setting of each terminal device and realize network communication, avoiding the technical problem in the prior art that the operating system image management cannot obtain an accurate IP address and cannot meet the user's communication needs.

[0144] This embodiment provides a server, which includes: a memory, a processor, and a network address allocation program stored in the memory and executable on the processor, wherein the network address allocation program is configured to implement the network address allocation method described above.

[0145] Reference Figure 4 , Figure 4 A schematic diagram of the terminal device structure of the hardware operating environment involved in the embodiment of the present invention.

[0146] like Figure 4 As shown, the terminal device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (Wireless-Fidelity, Wi-Fi) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM), or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk storage. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0147] Those skilled in the art will understand that Figure 4 The structure shown in the figure does not constitute a limitation on the terminal device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0148] like Figure 4As shown, the memory 1005 as a storage medium may include an operating system, a network communication module, a user interface module, and a network address allocation program.

[0149] exist Figure 4 In the terminal device shown, the network interface 1004 is mainly used for data communication with the network terminal device; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the terminal device of the present invention can be set in the terminal device, and the terminal device calls the network address allocation program stored in the memory 1005 through the processor 1001, and executes the network address allocation method provided by the embodiment of the present invention.

[0150] refer to Figure 5 , Figure 5 It is a flowchart diagram of a second embodiment of a network address allocation method of the present invention.

[0151] In this embodiment, the network address allocation method is applied to a terminal device, and the network address allocation method includes:

[0152] Step S10': determine a temporary IP address, and send a networking request to the server based on the temporary IP address so that the server feeds back a static IP address, wherein the networking request is generated based on the user ID, department information and user information in the user identity information.

[0153] It should be noted that the executor of the method of this embodiment can be a device with data processing, data transmission and network communication functions, such as: terminal devices such as computers or computers, or other devices that can achieve the same or similar functions. This embodiment does not impose specific restrictions on this. In this embodiment and the following embodiments, the terminal device will be used as an example for explanation.

[0154] It should be noted that the temporary IP address is used to provide a basis for terminal devices that are not in the local area network to communicate with the server. When a terminal device that is not in the local area communication network mentioned above requests to join the local area communication network, it cannot send user identity information due to lack of communication authority, and the server cannot allocate the corresponding static IP address. At this time, a temporary IP address can be given to the terminal device for simple communication with the server.

[0155] Further, the determining of the temporary IP address includes:

[0156] Sending a communication request to at least one target terminal device by multicasting, so that the target terminal device feeds back a communication response;

[0157] A temporary IP address is generated according to the communication response.

[0158] It can be understood that the terminal uses multicast technology to communicate with other terminal devices in the same network segment. Multicast means allowing one or more terminal devices to send a single data packet to multiple terminal devices, sending the terminal IP address information that can obtain the current network segment, and obtaining an unused temporary IP.

[0159] In addition, the temporary IP address reserved for network communication with the server when the LAN is established can also be directly used without broadcasting with other terminal devices. This embodiment does not impose specific restrictions on this.

[0160] Further, generating a temporary IP address according to the communication response includes:

[0161] Determine an idle IP address in the same network segment according to the communication response;

[0162] The idle IP address is recorded as a temporary IP address.

[0163] It can be understood that the idle IP addresses in the same network segment refer to the IP addresses that are not used by other terminal devices in the same network segment.

[0164] Further, sending a networking request to the server based on the temporary IP address includes:

[0165] Updating the local IP address according to the temporary IP address;

[0166] Generate a networking request based on the user ID, department information, and user information;

[0167] Send a networking request to the server according to the updated local IP address.

[0168] Additionally, it includes:

[0169] When the server feeds back the target subnet mask, the local subnet mask is updated according to the target subnet mask.

[0170] In the specific implementation, after modifying the IP address and the corresponding subnet mask, data communication of user identity information with the server can be realized. Then the server can allocate static IP addresses according to the user identity information, and realize data interaction with other terminal devices in the local area network, which facilitates user management and improves management efficiency.

[0171] Step S20': Update the local IP address according to the static IP address.

[0172] It is easy to understand that updating the local IP address according to the static IP address means replacing the local IP address according to the static IP address transmitted by the server to achieve network communication. In addition, the subnet mask can be modified accordingly to ensure the standardization of enterprise management. At the same time, the gateway address, DNS server address, etc. can also be corrected. This embodiment does not impose specific restrictions on this.

[0173] In this embodiment, the terminal device sends a networking request to the server according to the temporary IP address, so that the server can assign a static IP address to the terminal device, thereby enabling the new device to join the local area network, improving management efficiency, and increasing network communication efficiency.

[0174] The present application provides a terminal device, which includes: a memory, a processor, and a network address allocation program stored in the memory and executable on the processor, wherein the network address allocation program is configured to implement the network address allocation method described above.

[0175] The present application also provides a network address allocation system, which includes a server and a terminal device. The server executes the network address allocation method described in the first embodiment, and the terminal device executes the network address allocation method described in the second embodiment.

[0176] It should be understood that the above is only an example and does not constitute any limitation on the technical solution of the present invention. In specific applications, technicians in this field can make settings as needed, and the present invention does not limit this.

[0177] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of the present invention. In practical applications, technicians in this field can select part or all of them according to actual needs to achieve the purpose of the present embodiment, and no limitation is made here.

[0178] In addition, for technical details not fully described in this embodiment, reference can be made to the network address allocation method provided in any embodiment of the present invention, and will not be repeated here.

[0179] In addition, it should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0180] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0181] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory (ROM) / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0182] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

[0183] The present invention discloses A1, a network address allocation method, the network address allocation method is applied to a server, and the network address allocation method comprises:

[0184] When receiving a networking request from a terminal device, determining user identity information according to the networking request;

[0185] Matching the user identity information with preset user identity information;

[0186] When the match is successful, a static IP address is allocated according to the user identity information, and the static IP address is sent to the terminal device, so that the terminal device updates the local IP address according to the static IP address.

[0187] A2. The network address allocation method as described in A1, wherein the user identity information includes: user ID, department information and user information;

[0188] The matching of the user identity information with preset user identity information includes:

[0189] Matching the user ID, the department information and the user information with the preset user identity information respectively;

[0190] When the match is successful, detecting whether the user ID, the department information and the user information are correspondingly associated according to the preset user identity information;

[0191] Accordingly, when the match is successful, a static IP address is allocated according to the user identity information, and the static IP address is sent to the terminal device, including:

[0192] If the user ID, the department information and the user information are associated with each other, then the match is determined to be successful;

[0193] When the match is successful, a static IP address is allocated according to the user ID, the department information and the user information, and the static IP address is sent to the terminal device.

[0194] A3. The network address allocation method as described in A2, wherein the step of detecting whether the user ID, the department information, and the user information are correspondingly associated according to the preset user identity information comprises:

[0195] Using at least one of the user ID, the department information, and the user information as reference information;

[0196] Determine the remaining information corresponding to the reference information according to the preset user identity information;

[0197] Compare the user ID, the department information and the user information with the remaining information;

[0198] Determine whether the user ID, the department information, and the user information are correspondingly associated based on the comparison result.

[0199] A4. The network address allocation method as described in A2, wherein the static IP address is allocated according to the user ID, the department information and the user information, comprising:

[0200] Determine the LAN type based on preset networking requirements;

[0201] and determining a corresponding first IP network segment address according to the local area network type;

[0202] Determine the subnet IP address according to the department information, and determine the host address according to the user ID and / or the user information;

[0203] A static IP address is determined based on the first IP network segment address, the subnet IP address, and the host address.

[0204] A5. The network address allocation method as described in A1, before allocating the static IP address according to the user identity information, further comprising:

[0205] Get the number of current network users;

[0206] When the number of current networking users is less than the rated number of users, a static IP address is allocated according to the user identity information.

[0207] 6. The network address allocation method as described in A5, after obtaining the number of current networking users, further comprising:

[0208] When the number of current networking users is less than the rated number of users, a target host position is determined, and a step of allocating a static IP address according to the user identity information and the target host position is performed.

[0209] A7. The network address allocation method as described in A1, when receiving a networking request sent by a terminal device, before determining the user identity information according to the networking request, further comprising:

[0210] Determine a preset storage space, and create an operating system image in the preset storage space;

[0211] When a networking request from a terminal device is received, user identity information is determined based on the networking request through the operating system image.

[0212] A8. The network address allocation method as described in A7, wherein the step of creating an operating system image in the preset storage space comprises:

[0213] Determine the local files corresponding to the local operating system;

[0214] Copy the local file and use the copied file as a mirror file;

[0215] The image file is correspondingly stored in the preset storage space to create an operating system image.

[0216] A9. The network address allocation method as described in A1, wherein when the match is successful, a static IP address is allocated according to the user identity information, and the static IP address is sent to the terminal device so that the terminal device updates the local IP address according to the static IP address, further comprising:

[0217] Check whether the terminal devices with the same department information are in the same subnet;

[0218] If not, determining the target subnet mask based on the user identity information and the static IP address;

[0219] The target subnet mask is sent to the terminal device, so that the terminal device updates the local subnet mask according to the target subnet mask.

[0220] A10. The network address allocation method as described in A9, wherein the step of detecting whether terminal devices with the same department information are in the same subnet comprises:

[0221] Generate a target network segment information set according to the subnet mask corresponding to the terminal device with the same department information and the static IP address;

[0222] Detecting whether the target network segment information sets are the same;

[0223] When the target network segment information sets are the same, it is determined that the terminal devices with the same department information are in the same subnet.

[0224] A11. The network address allocation method as described in any one of A1-A10, wherein the network address allocation method further includes:

[0225] After a preset time interval, obtain the file information of the terminal devices connected in this network segment;

[0226] The historical backup file information is updated according to the file information and stored accordingly.

[0227] The present invention also discloses B12, a server, comprising: a memory, a processor, and a network address allocation program stored in the memory and executable on the processor, wherein the network address allocation program is configured to implement the network address allocation method as described in any one of A1 to A8.

[0228] The present invention also discloses C13, a network address allocation method, which is applied to a terminal device, and comprises:

[0229] Determine a temporary IP address, and send a networking request to a server based on the temporary IP address, so that the server can feedback a static IP address, wherein the networking request is generated according to the user ID, department information, and user information in the user identity information;

[0230] The local IP address is updated according to the static IP address.

[0231] C14. The network address allocation method as described in C13, wherein determining the temporary IP address comprises:

[0232] Sending a communication request to at least one target terminal device by multicasting, so that the target terminal device feeds back a communication response;

[0233] A temporary IP address is generated according to the communication response.

[0234] C15. The network address allocation method as described in C14, wherein generating a temporary IP address according to the communication response comprises:

[0235] Determine an idle IP address in the same network segment according to the communication response;

[0236] The idle IP address is recorded as a temporary IP address.

[0237] C16. The network address allocation method as described in C13, wherein the sending a networking request to the server based on the temporary IP address comprises:

[0238] Updating the local IP address according to the temporary IP address;

[0239] Generate a networking request based on the user ID, department information, and user information;

[0240] Send a networking request to the server according to the updated local IP address.

[0241] C17. The network address allocation method as described in C13, after sending the networking request to the server based on the temporary IP address, further comprising:

[0242] When the server feeds back the target subnet mask, the local subnet mask is updated according to the target subnet mask.

[0243] C18. The network address allocation method as described in any one of C13 to C17, further comprising:

[0244] After a preset time interval, the local file information is uploaded to the server, so that the server updates the historical backup file information according to the local file information and stores it accordingly.

[0245] The present invention discloses D19, a terminal device, comprising: a memory, a processor, and a network address allocation program stored in the memory and executable on the processor, wherein the network address allocation program is configured to implement a network address allocation method as described in any one of C8 to C12.

[0246] The present invention discloses E20, a network address allocation system, which includes a server and a terminal device. The server executes a network address allocation method as described in any one of A1 to A11, and the terminal device executes a network address allocation method as described in any one of C12 to C18.

Claims

1. A network address allocation method, characterized in that: The network address allocation method is applied to a server, and the network address allocation method includes: When receiving a networking request from a terminal device, determining user identity information according to the networking request; Matching the user identity information with preset user identity information; When the match is successful, a static IP address is allocated according to the user identity information, and the static IP address is sent to the terminal device, so that the terminal device updates the local IP address according to the static IP address.

2. The network address allocation method according to claim 1, characterized in that: The user identity information includes: user ID, department information and user information; The matching of the user identity information with preset user identity information includes: Matching the user ID, the department information and the user information with the preset user identity information respectively; When the match is successful, detecting whether the user ID, the department information and the user information are correspondingly associated according to the preset user identity information; Accordingly, when the match is successful, a static IP address is allocated according to the user identity information, and the static IP address is sent to the terminal device, including: If the user ID, the department information and the user information are associated with each other, then the match is determined to be successful; When the match is successful, a static IP address is allocated according to the user ID, the department information and the user information, and the static IP address is sent to the terminal device.

3. The network address allocation method according to claim 2, characterized in that: The detecting, according to the preset user identity information, whether the user ID, the department information, and the user information are correspondingly associated includes: taking at least one of the user ID, the department information and the user information as reference information; Determine the remaining information corresponding to the reference information according to the preset user identity information; Compare the user ID, the department information and the user information with the remaining information; Determine whether the user ID, the department information, and the user information are correspondingly associated based on the comparison result.

4. The network address allocation method according to claim 2, characterized in that: The allocating a static IP address according to the user ID, the department information and the user information includes: Determine the LAN type based on preset networking requirements; and determining a corresponding first IP network segment address according to the local area network type; Determine the subnet IP address according to the department information, and determine the host address according to the user ID and / or the user information; A static IP address is determined based on the first IP network segment address, the subnet IP address, and the host address.

5. The network address allocation method according to claim 1, characterized in that: Before allocating a static IP address according to the user identity information, the method further includes: Get the number of current network users; When the number of current networking users is less than the rated number of users, a static IP address is allocated according to the user identity information.

6. The network address allocation method according to claim 5, characterized in that: After obtaining the number of current networking users, the method further includes: When the number of current networking users is less than the rated number of users, a target host position is determined, and a step of allocating a static IP address according to the user identity information and the target host position is performed.

7. A server, characterized in that: The server comprises: a memory, a processor, and a network address allocation program stored in the memory and executable on the processor, wherein the network address allocation program is configured to implement the network address allocation method according to any one of claims 1 to 6.

8. A network address allocation method, characterized in that: The network address allocation method is applied to a terminal device, and the network address allocation method includes: Determine a temporary IP address, and send a networking request to a server based on the temporary IP address, so that the server can feedback a static IP address, wherein the networking request is generated according to the user ID, department information, and user information in the user identity information; The local IP address is updated according to the static IP address.

9. A terminal device, characterized in that: The terminal device comprises: a memory, a processor, and a network address allocation program stored in the memory and executable on the processor, wherein the network address allocation program is configured to implement the network address allocation method according to claim 8.

10. A network address allocation system, characterized in that: The network address allocation system comprises a server and a terminal device, the server executes the network address allocation method according to any one of claims 1 to 6, and the terminal device executes the network address allocation method according to claim 8.