Intelligent network distribution method and device, electronic equipment and readable storage medium

Through the intelligent distribution network method, the dispatching server and preset distribution rules are used to directly allocate available servers and port identifiers, which solves the problem of low distribution network efficiency of IoT devices, realizes a fast and flexible distribution process, and saves distribution time and Improved efficiency.

CN119172240AActive Publication Date: 2024-12-20GREE ELECTRIC APPLIANCE INC OF ZHUHAI +1
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202411222812.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-02
Publication Date
2024-12-20
Estimated Expiration
2044-09-02

AI Technical Summary

Technical Problem

During the distribution process of existing IoT devices, the large number of devices has increased the difficulty of distribution networks, and the distribution time is long and the efficiency is low. The server needs to poll and traverse the port to find idle ports, which is not efficient.

Method used

The intelligent distribution network method is adopted to obtain the current distribution network information and preset allocation rules through the dispatching server, and directly allocate available servers and port identifiers to avoid polling and traversal, and quickly select the resources required by the target device.

Benefits of technology

It realizes fast and flexible equipment distribution networking, enhances configuration flexibility and adaptability, saves distribution network time and efficiency, and simplifies the equipment distribution networking process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119172240A_ABST
    Figure CN119172240A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an intelligent network distribution method and device, electronic equipment and a readable storage medium, and the method comprises the steps: obtaining a network distribution identifier which is distributed by identifier distribution equipment based on current network distribution information stored by a scheduling server and a preset distribution rule under the condition that a network distribution request sent by target equipment is received; the distribution network identifier comprises a target server identifier and a target port identifier; determining a port state corresponding to the target port identifier based on port identifier information of a target server corresponding to the target server identifier; when the port state is an available state, sending a target port identifier and a target server identifier to the target device; the target server identifier and the target port identifier are used for the target device to complete network distribution. According to the method, the server and the port required by the target equipment are quickly and flexibly selected according to the current network distribution information without polling and traversing the server port to search for the idle port, so that the flexibility and the adaptability of configuration are enhanced, and the network distribution time and the network distribution efficiency are saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to an intelligent distribution network method, device, electronic equipment and readable storage medium. Background Art

[0002] With the rapid development of IoT technology, IoT devices are increasingly being used. However, there are still some problems in the current IoT device network configuration process. With the large number of IoT devices, the difficulty of network configuration increases.

[0003] In the related art, when the device is configuring the network, the server often uses polling to traverse the server ports to find the free ports and select the most suitable resources for device connection and configuration. However, this device configuration method takes a long time and has low efficiency in device configuration. Summary of the invention

[0004] In order to overcome the problems existing in the related art, the present invention provides an intelligent distribution network method, device, electronic device and readable storage medium.

[0005] In a first aspect, the present invention provides an intelligent network distribution method, which is applied to a scheduling server, and the method includes:

[0006] When receiving a network configuration request sent by a target device, obtaining a network configuration identifier assigned by an identifier allocation device based on current network configuration information stored in the scheduling server and a preset allocation rule; the network configuration identifier includes a target server identifier and a target port identifier;

[0007] Determine the port status corresponding to the target port identifier based on the port identifier information of the target server corresponding to the target server identifier;

[0008] When the port status is an available status, the target port identifier and the target server identifier are sent to the target device; the target server identifier and the target port identifier are used for the target device to complete network configuration.

[0009] Optionally, the acquiring identification allocation device allocates a network configuration identification based on the current network configuration information stored in the scheduling server and a preset allocation rule, including:

[0010] Sending the current network configuration information stored in the scheduling server to the identification allocation device; the current network configuration information includes the latest server allocation information and the latest port allocation information;

[0011] Acquire a network configuration identifier assigned by an identifier allocation device; the network configuration identifier includes a target server identifier and a target port identifier determined by the identifier allocation device according to an identifier increment allocation rule based on the latest server allocation information and the latest port allocation information.

[0012] Optionally, the method further comprises:

[0013] When the port status is unavailable, a first network configuration identifier reallocated by the identifier allocation device is obtained; the first network configuration identifier includes a first server identifier and a first port identifier, and the first server identifier is determined based on the target server identifier according to a first allocation rule.

[0014] Optionally, the method further comprises:

[0015] When receiving a network configuration request sent by a target device, if there is an idle port whose port allocation state is an idle state, select a target idle port with a smallest port identifier value from the idle ports with the smallest server identifier value as the target port;

[0016] The port identifier and the server identifier corresponding to the target port are determined as the target port identifier and the target server identifier.

[0017] Optionally, the method further comprises:

[0018] In the case where the target device is a first device, determining a historical server identifier and a historical port identifier based on historical network configuration information corresponding to the first device; the first device is a re-network configuration device;

[0019] The historical server identifier and the historical port identifier are sent to the first device.

[0020] Optionally, the method further comprises:

[0021] When the port allocation state corresponding to the historical port identifier is an allocated state, performing the operation of obtaining the network configuration identifier allocated by the identifier allocation device based on the current network configuration information stored in the scheduling server and the preset allocation rule;

[0022] The sending the history server identifier and the history port identifier to the first device includes:

[0023] When the port allocation state corresponding to the historical port identifier is an idle state, the historical server identifier and the historical port identifier are sent to the first device.

[0024] In a second aspect, the present invention provides an intelligent distribution network device, which is applied to a dispatching server, and the device includes:

[0025] A first acquisition module is used to obtain a network configuration identifier assigned by an identifier allocation device based on the current network configuration information stored in the scheduling server and a preset allocation rule when a network configuration request sent by a target device is received; the network configuration identifier includes a target server identifier and a target port identifier;

[0026] A first determining module, configured to determine a port state corresponding to the target port identifier based on port identifier information of the target server corresponding to the target server identifier;

[0027] The first sending module is used to send the target port identifier and the target server identifier to the target device when the port status is an available status; the target server identifier and the target port identifier are used for the target device to complete network configuration.

[0028] Optionally, the first acquisition module includes:

[0029] A first sending submodule, configured to send the current network configuration information stored in the scheduling server to the identification allocation device; the current network configuration information includes the latest server allocation information and the latest port allocation information;

[0030] The first acquisition submodule is used to acquire the network configuration identifier assigned by the identifier allocation device; the network configuration identifier includes the target server identifier and the target port identifier determined by the identifier allocation device according to the identifier increment allocation rule based on the latest server allocation information and the latest port allocation information.

[0031] Optionally, the device may further include:

[0032] The second acquisition module is used to obtain the first network configuration identifier reallocated by the identifier allocation device when the port status is unavailable; the first network configuration identifier includes a first server identifier and a first port identifier, and the first server identifier is determined based on the target server identifier according to a first allocation rule.

[0033] Optionally, the device may further include:

[0034] A first selection module is used for, when receiving a network configuration request sent by a target device, if there is an idle port whose port allocation state is an idle state, selecting a target idle port with a smallest port identifier value from the idle ports with the smallest server identifier value as the target port;

[0035] The second determining module is used to determine the port identifier and the server identifier corresponding to the target port as the target port identifier and the target server identifier.

[0036] Optionally, the device may further include:

[0037] A third determination module is used to determine a historical server identifier and a historical port identifier based on historical network configuration information corresponding to the first device when the target device is a first device; the first device is a re-network configuration device;

[0038] The second sending module is used to send the historical server identifier and the historical port identifier to the first device.

[0039] Optionally, the device may further include:

[0040] A third acquisition module is used to execute the operation of acquiring the network configuration identifier allocated by the identifier allocation device based on the current network configuration information stored in the scheduling server and the preset allocation rule when the port allocation state corresponding to the historical port identifier is the allocated state;

[0041] The second sending module includes:

[0042] The second sending submodule is configured to send the historical server identifier and the historical port identifier to the first device when the port allocation state corresponding to the historical port identifier is an idle state.

[0043] In a third aspect, the present invention provides an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the intelligent distribution network method described in any one of the first aspects is implemented.

[0044] In a fourth aspect, the present invention provides a readable storage medium. When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the steps in the intelligent distribution network method in any one of the embodiments of the first aspect above.

[0045] In an embodiment of the present invention, when a network configuration request is received from a target device, a network configuration identifier assigned by an identifier allocation device based on the current network configuration information stored in a scheduling server and a preset allocation rule is obtained; the network configuration identifier includes a target server identifier and a target port identifier; based on the port identifier information of the target server corresponding to the target server identifier, the port status corresponding to the target port identifier is determined; when the port status is in an available state, the target port identifier and the target server identifier are sent to the target device; the target server identifier and the target port identifier are used for the target device to complete network configuration. In this way, intelligent network configuration can be realized directly through the current network configuration information when the port status in the network configuration identifier assigned by the identifier allocation device is in an available state, and the identifier allocation device reasonably allocates servers and ports based on the current network configuration information, without polling and traversing server ports to find free ports. According to the current network configuration information, the server and port required by the target device can be quickly and flexibly selected, thereby enhancing the flexibility and adaptability of the configuration and saving network configuration time and efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0047] Figure 1 is a flowchart of a smart network distribution method provided by an embodiment of the present invention;

[0048] Figure 2 It is a flowchart of specific steps of an intelligent distribution network method provided by an embodiment of the present invention;

[0049] Figure 3 is a structural diagram of an intelligent distribution network device provided by an embodiment of the present invention;

[0050] Figure 4 It is a structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0051] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0052] Figure 1It is a flow chart of the steps of an intelligent network distribution method provided by an embodiment of the present invention, which is applied to a dispatching server in an intelligent network distribution system. A dispatching server is a server for managing and dispatching network resources. In the scenario of device network distribution, the dispatching server is mainly responsible for coordinating and managing network resources such as servers and ports, and distributing them to various devices as needed. The intelligent network distribution system also includes multiple servers (device servers) and identification allocation devices. Each server contains multiple ports, and the number of ports corresponding to each server can be the same or different. A unique server identifier and port identifier are set for each server and each port. The server identifier and port identifier can be a distributed ID, that is, the server identifier increases in a preset order, and the port identifier increases in a preset order. Exemplarily, the server identifiers can be set for three servers as server 1, server 2, and server 3. Correspondingly, assuming that each server contains 2 ports, the port identifier can be set as: server 1 contains port 1 and port 2, server 2 contains port 1 and port 2, and server 3 contains port 1 and port 2. The identification allocation device can be a distributed ID number generator, which is used to allocate network distribution information based on a preset allocation rule.

[0053] like Figure 1 As shown, the method may include:

[0054] Step 101: upon receiving a network configuration request sent by a target device, obtaining a network configuration identifier allocated by an identifier allocation device based on current network configuration information stored in the scheduling server and preset allocation rules; the network configuration identifier includes a target server identifier and a target port identifier.

[0055] In an embodiment of the present invention, when the target device needs to be networked, it will connect to the scheduling server. A network configuration request is sent to the scheduling server. When the scheduling server receives the network configuration request, it sends an identification allocation request to the identification allocation device, and sends the current network configuration information stored in the scheduling server to the identification allocation device. Among them, the current network configuration information may include the latest server allocation information and the latest port allocation information. After the identification allocation device allocates a network configuration identifier to any device, the network configuration identifier (including the server identifier and the port identifier) ​​allocated this time will be recorded, and the current network configuration information will be updated. Correspondingly, the latest server allocation information includes the server identifier corresponding to any device when the network configuration is successful based on the network configuration information allocated by the identification allocation device last time. The latest port allocation information includes the port identifier corresponding to any device when the network configuration is successful based on the network configuration information allocated by the identification allocation device last time.

[0056] When the identifier allocation device receives the first identifier allocation request, it will generate a network configuration identifier based on the current network configuration information and according to the preset allocation rule, and the network configuration identifier includes a target server identifier and a target port identifier. Among them, the preset allocation rule can be an identifier increment allocation rule. Specifically, the preset allocation rule can include determining the latest server identifier in the latest server allocation information as the target server identifier, and continuously increasing the latest port identifier in the latest port allocation information by a preset increment to obtain the target port identifier. Based on the latest server allocation information and the latest port allocation information in the current network configuration information, based on the incremental characteristics of the distributed ID, the target server identifier and the target port identifier are determined according to the identifier increment allocation rule as the network configuration identifier for the identifier allocation request. Specifically, when the first identifier allocation request is received, the latest server identifier in the latest server allocation information can be first determined as the target server identifier, and the latest port identifier in the latest port allocation information can be continuously increased in sequence (for example, the preset increment can be 1) to determine the target port identifier. The target server identifier and the target port identifier are spliced ​​to determine the network configuration identifier.

[0057] Step 102: Determine the port status corresponding to the target port identifier based on the port identifier information of the target server corresponding to the target server identifier.

[0058] In an embodiment of the present invention, when receiving a network distribution identifier, the dispatch server determines the target server corresponding to the target server identifier, obtains the port identifier information corresponding to the target server stored in the dispatch server, and determines the port state of the target port based on the port identifier information. Among them, the port identifier information may include the port identifiers of each port corresponding to the target server and the actual port allocation state corresponding to each port. Based on the port identifiers of each port, it is determined whether the target port identifier exists and the port allocation state corresponding to the target port identifier is determined, and the port state corresponding to the target port identifier is obtained. Among them, when the identifier allocation device allocates the network distribution identifier based on the identifier increment rule, it is often only the target port identifier obtained by sequential increment based on the latest port identifier in the latest port allocation information, but the target port identifier may not exist, that is, the target server corresponding to the target server identifier may not contain a port identified as the target port identifier. Therefore, it is necessary to determine whether the port identifier information corresponding to the target server contains the target port identifier based on the port identifier information of the target server to determine whether the target port identifier exists. Furthermore, the port allocation state corresponding to the target port identifier can be determined based on the actual port allocation state corresponding to each port, wherein the port allocation state may include an allocated state, an unallocated state, and an idle state. The allocated state of the port indicates that the port has been allocated to a device for network configuration and is currently occupied by the device. The unallocated state of the port indicates that the port has not been allocated to a device for network configuration and is not occupied by the device. The idle state of the port indicates that the port has been allocated to a device for network configuration but is currently vacant and not occupied by the device. When the target port identifier exists and the corresponding port allocation state is an idle state or an unallocated state, the port state is determined to be an available state; when the target port identifier does not exist or the target port identifier exists but the corresponding port allocation state is an allocated state, the port state is determined to be an unavailable state.

[0059] Step 103: When the port status is an available status, the target port identifier and the target server identifier are sent to the target device; the target server identifier and the target port identifier are used for the target device to complete network configuration.

[0060] In an embodiment of the present invention, when the port status is an available status, the target port corresponding to the target port identifier and the target server corresponding to the target server identifier can be assigned to the target device. Therefore, the target port identifier and the target server identifier are sent to the target device. After receiving the target port identifier and the target server identifier, the target device completes the network configuration with the target server and the target port based on the target port identifier and the target server identifier.

[0061] In summary, in the embodiment of the present invention, when a network configuration request is received from a target device, a network configuration identifier assigned by an identifier allocation device based on the current network configuration information stored in a scheduling server and a preset allocation rule is obtained; the network configuration identifier includes a target server identifier and a target port identifier; based on the port identifier information of the target server corresponding to the target server identifier, the port status corresponding to the target port identifier is determined; when the port status is in an available state, the target port identifier and the target server identifier are sent to the target device; the target server identifier and the target port identifier are used for the target device to complete the network configuration. In this way, intelligent network configuration can be realized directly through the current network configuration information when the port status in the network configuration identifier assigned by the identifier allocation device is in an available state, and the identifier allocation device reasonably allocates servers and ports based on the current network configuration information, without polling and traversing server ports to find free ports. According to the current network configuration information, the server and port required by the target device can be quickly and flexibly selected, thereby enhancing the flexibility and adaptability of the configuration and saving network configuration time and efficiency.

[0062] Furthermore, the intelligent network distribution method of the embodiment of the present invention can simplify and optimize the network distribution process of the equipment, and reduce the user waiting time and operation complexity.

[0063] Optionally, step 101 may include the following steps:

[0064] Step 301: Send the current network configuration information stored in the scheduling server to the identification allocation device; the current network configuration information includes the latest server allocation information and the latest port allocation information.

[0065] In an embodiment of the present invention, the scheduling server can obtain the stored current network configuration information, and send the current network configuration information and the first identifier allocation request to the identifier allocation device. The current network configuration information includes the latest server allocation information and the latest port allocation information. The scheduling server is configured with a counter, and the counter is used to record the port identifier as the latest port allocation information when each network configuration based on the network configuration information allocated by the identifier allocation device is successful. Correspondingly, the server identifier is also recorded as the latest server allocation information when each network configuration based on the network configuration information allocated by the identifier allocation device is successful.

[0066] Step 302: Obtain a network configuration identifier assigned by an identifier allocation device; the network configuration identifier includes a target server identifier and a target port identifier determined by the identifier allocation device according to an identifier increment allocation rule based on the latest server allocation information and the latest port allocation information.

[0067] In an embodiment of the present invention, when the identifier allocation device receives the first identifier allocation request, it determines the target server identifier and the target port identifier as the network configuration identifier based on the latest server allocation information and the latest port allocation information according to the identifier increment allocation rule. The scheduling server obtains the network configuration identifier sent by the identifier allocation device. Specifically, the latest server identifier in the latest server allocation information can be first determined as the target server identifier, and the latest port identifier in the latest port allocation information can be incremented in a continuous sequence (for example, the preset increment can be 1) to determine the target port identifier. The target server identifier and the target port identifier are spliced ​​to determine the network configuration identifier. Exemplarily, assuming that the latest server allocation information is server 1 and the latest port allocation information is port 3, the network configuration identifier generated by the identifier allocation device can include the target server identifier as server 1 and the target port identifier as port 4. In this way, servers and ports can be allocated in sequence according to the incremental characteristics of the distributed ID, so that resource allocation is more organized and resource allocation confusion is avoided.

[0068] Optionally, the embodiment of the present invention may include the following steps:

[0069] Step 201: When the port status is unavailable, obtain a first network configuration identifier reallocated by the identifier allocation device; the first network configuration identifier includes a first server identifier and a first port identifier, and the first server identifier is determined based on the target server identifier according to a first allocation rule.

[0070] In an embodiment of the present invention, when the port status is unavailable, the scheduling server sends a second identifier allocation request to the identifier allocation device. When the identifier allocation device receives the second identifier allocation request, it reallocates the first network configuration identifier based on the first allocation rule and the current network configuration information. The first network configuration identifier includes a first server identifier and a first port identifier. The first server identifier is determined based on the target server identifier according to the first allocation rule. The first allocation rule may include continuously increasing the latest server identifier in the latest server allocation information (since an identifier allocation has been performed once and the server identifier record has been performed at the same time in step 101, the latest server identifier is the target server identifier) ​​to obtain the first server identifier, and determining the first port identifier of the first server corresponding to the first server identifier as the first port identifier. In other words, the first server identifier is sequentially increased relative to the target server identifier, and the first port identifier may be the first port identifier corresponding to the first server.

[0071] After obtaining the first network configuration identifier, the first server identifier and the first port identifier are concatenated to determine the first network configuration identifier. Based on the port identifier information of the first server corresponding to the first server identifier, the port status corresponding to the first port identifier is determined, and when the port status is available, the first port identifier and the first target server identifier are sent to the target device; the first server identifier and the first port identifier are used for the target device to complete the network configuration.

[0072] Exemplarily, assume that server 1 and server 2 each contain 2 ports: port 1 and port 2, the latest server allocation information in the current network configuration information is server 1, and the latest port allocation information is port 2 (indicating that port 1 and port 2 in server 1 have been allocated). Then the target server identifier allocated for the first time by the identifier allocation device based on the preset allocation rule is server 1, and the target port identifier is port 3. Based on the port identification information (port 1 and port 2) of the target server (server 1), it is determined that port 3 does not exist in server 1, then it can be determined that the port state corresponding to the target port identifier is unavailable, then the scheduling server requests the identifier allocation device to reallocate the first network configuration identifier, including the first server identifier server 2, the first port identifier port 1, then based on the port identification information (port 1 and port 2) of the first server (server 2), it is determined that the port state corresponding to the first port identifier is available, then the first server identifier server 2 and the first port identifier port 1 are sent to the target device.

[0073] Exemplarily, when performing intelligent network distribution based on an embodiment of the present invention, assuming that each server has two ports, and when no device is disconnected from the network, the order of the target server identifiers and target port identifiers for intelligent network distribution to the five devices can be: server 1 port 1, server 1 port 2, server 2 port 1, server 2 port 2, server 3 port 1.

[0074] In an embodiment of the present invention, when the port status is unavailable, the first network configuration identifier is reallocated by the identifier allocation device, so that each device can obtain an independent port configuration on the basis of allocating servers and ports in sequence, thereby avoiding waste of network resources caused by confusion in the network configuration sequence.

[0075] Optionally, the embodiment of the present invention may include the following steps:

[0076] Step 401: When a network configuration request is received from a target device, if there is an idle port whose port allocation state is idle, select a target idle port with the smallest port identifier value from the idle ports with the smallest server identifier value as the target port.

[0077] Step 402: Determine the port identifier and the server identifier corresponding to the target port as the target port identifier and the target server identifier.

[0078] In the embodiment of the present invention, when the intelligent network distribution system runs stably for a period of time, a network-decoupled device may appear, that is, the network-connected server and port corresponding to the device change from an occupied state to an unoccupied state. In this case, when the network-decoupled device is decoupled, the dispatch server will record the device identifier and historical network distribution information corresponding to the network-decoupled device, and the historical network distribution information may include the server identifier and port identifier originally assigned to the network-decoupled device. At the same time, the dispatch server may also record the port status connected to the network-decoupled device as an idle state.

[0079] In the case where the scheduling server receives a network configuration request sent by the target device, if there is an idle port whose port allocation status is idle, the idle port with the smallest server identification value among the idle ports can be directly determined, and then the target idle port with the smallest port identification value is selected from the idle ports with the smallest server identification value, and the target idle port is determined as the target port. The server identification corresponding to the server where the target port is located is determined as the target server identification, and the port identification corresponding to the target port is determined as the target port identification. Exemplarily, assuming that the server identification and port identification corresponding to the idle ports whose port allocation status is idle are respectively: server 1 and port 2, server 1 and port 7, server 3 and port 1, server 5 and port 4, then server 1 and port 2 can be sent to the target device as the target server identification and target port identification, respectively.

[0080] In an embodiment of the present invention, when there are idle ports, the idle ports can be allocated preferentially. In this way, the allocated but idle server ports can be fully utilized without interacting with the scheduling server, thereby further improving the network distribution speed and efficiency.

[0081] Optionally, the embodiment of the present invention includes the following steps:

[0082] Step 501: When the target device is a first device, determine a historical server identifier and a historical port identifier based on historical network configuration information corresponding to the first device; the first device is a re-network configuration device.

[0083] In an embodiment of the present invention, when the target device is a first device, based on the device identifier of the first device, the historical network configuration information corresponding to the first device stored in the scheduling server is obtained. Based on the historical network configuration information corresponding to the first device, the historical server identifier and the historical port identifier are determined. Among them, the first device is a re-network configuration device, that is, when the first device is disconnected from the network, the scheduling server will record the device identifier and historical network configuration information of the first device, and the historical network configuration information may include the server identifier and port identifier originally assigned to the disconnected device. When the first device is re-networked, network configuration can be performed based on the server and port to which the first device has established a connection, that is, the historical server corresponding to the historical server identifier and the historical port corresponding to the historical port identifier.

[0084] Step 502: Send the history server identifier and the history port identifier to the first device.

[0085] Optionally, step 502 may include the following steps:

[0086] Step 601: When the port allocation state corresponding to the historical port identifier is an idle state, the historical server identifier and the historical port identifier are sent to the first device.

[0087] In the embodiment of the present invention, after determining the historical server identifier and the historical port identifier, it is necessary to determine whether the historical port corresponding to the historical port identifier is occupied, that is, to determine whether the port allocation state of the historical port is an idle state. Based on the port allocation state of each port recorded in the scheduling server, the port allocation state corresponding to the historical port corresponding to the historical port identifier is determined. When the port allocation state corresponding to the historical port identifier is an idle state, it indicates that the historical port is not occupied, and the historical server identifier and the historical port identifier can be sent to the first device.

[0088] Accordingly, the embodiment of the present invention may include the following steps:

[0089] Step 602: When the port allocation state corresponding to the historical port identifier is the allocated state, the operation of obtaining the network configuration identifier allocated by the identifier allocation device based on the current network configuration information stored in the scheduling server and the preset allocation rule is performed.

[0090] In an embodiment of the present invention, when the port allocation state corresponding to the historical port identifier is the allocated state, indicating that the server and port originally connected to the first device have been occupied, the method of step 101 can be directly executed to re-configure the network by using the identifier allocation device to allocate network configuration information.

[0091] In a possible implementation, when the port allocation status corresponding to the historical port identifier is the allocated state, it can be determined whether there is an idle port with an idle port allocation status. If so, the method of steps 401-402 can be directly executed. If not, the method of steps 101-103 can be executed.

[0092] In the embodiment of the present invention, for the device to be re-networked, it can continue to use the previously allocated server and port during the re-networking process, so that its connection status and related settings can be maintained for network configuration, ensuring the stability and continuity of the device connection, and saving network configuration time to a certain extent. In addition, in the case where the previously allocated server and port are already occupied, network configuration can be performed by identifying the network configuration information of the allocated device, thereby improving the flexibility of the device network configuration method and ensuring that the device can be normally configured.

[0093] For example, Figure 2 A specific step flow chart of an intelligent distribution network method is shown, such as Figure 2 As shown, when the scheduling server receives the network configuration request of the target device, the intelligent network configuration is started. When the target device is an unconfigured device, first determine whether there is an idle port with an idle port allocation status. If so, select the target idle port with the smallest port identifier value from the idle ports with the smallest server identifier value as the target port, and send the port identifier and server identifier corresponding to the target port to the target device; if not, the scheduling server obtains the network configuration identifier sent by the identifier allocation device, and determines the port status corresponding to the target port identifier in the network configuration identifier. When the port status is available, send the target server identifier and target port identifier in the network configuration identifier to the target device. When the port status is unavailable, obtain the first network configuration identifier reallocated by the identifier allocation device, and when the port status corresponding to the first port in the first network configuration identifier is available, send the first server identifier and the first port identifier in the first network configuration identifier to the target device. When the target device is a re-network configuration device, the historical server identifier and the historical port identifier are determined based on the historical network configuration information corresponding to the target device. When the port allocation status corresponding to the historical port identifier is an idle state, the historical server identifier and the historical port identifier are sent to the target device; when the port allocation status corresponding to the historical port identifier is an allocated state, the step of "determining whether there is an idle port with a port allocation status of an idle state" is executed.

[0094] Figure 3 Schematic diagram of the structure of an intelligent distribution network device provided by an embodiment of the present invention, which is applied to a dispatching server. Figure 3 As shown, the device may specifically include:

[0095] The first acquisition module 701 is used to obtain the network configuration identifier assigned by the identifier allocation device based on the current network configuration information stored in the scheduling server and the preset allocation rule when receiving the network configuration request sent by the target device; the network configuration identifier includes the target server identifier and the target port identifier;

[0096] A first determining module 702, configured to determine a port state corresponding to the target port identifier based on the port identifier information of the target server corresponding to the target server identifier;

[0097] The first sending module 703 is used to send the target port identifier and the target server identifier to the target device when the port status is an available status; the target server identifier and the target port identifier are used for the target device to complete network configuration.

[0098] The embodiment of the present invention provides an intelligent network distribution device. When receiving a network distribution request sent by a target device, the network distribution identifier assigned by the identifier allocation device based on the current network distribution information stored in the scheduling server and the preset allocation rule is obtained; the network distribution identifier includes a target server identifier and a target port identifier; based on the port identifier information of the target server corresponding to the target server identifier, the port status corresponding to the target port identifier is determined; when the port status is in an available state, the target port identifier and the target server identifier are sent to the target device; the target server identifier and the target port identifier are used for the target device to complete the network distribution. In this way, the intelligent network distribution can be realized directly through the current network distribution information when the port status in the network distribution identifier assigned by the identifier allocation device is in an available state. The identifier allocation device reasonably allocates servers and ports based on the current network distribution information, without polling and traversing server ports to find free ports. According to the current network distribution information, the server and port required by the target device are quickly and flexibly selected, thereby enhancing the flexibility and adaptability of the configuration and saving network distribution time and efficiency.

[0099] Optionally, the first acquisition module 701 includes:

[0100] A first sending submodule, configured to send the current network configuration information stored in the scheduling server to the identification allocation device; the current network configuration information includes the latest server allocation information and the latest port allocation information;

[0101] The first acquisition submodule is used to acquire the network configuration identifier assigned by the identifier allocation device; the network configuration identifier includes the target server identifier and the target port identifier determined by the identifier allocation device according to the identifier increment allocation rule based on the latest server allocation information and the latest port allocation information.

[0102] Optionally, the device may further include:

[0103] The second acquisition module is used to obtain the first network configuration identifier reallocated by the identifier allocation device when the port status is unavailable; the first network configuration identifier includes a first server identifier and a first port identifier, and the first server identifier is determined based on the target server identifier according to a first allocation rule.

[0104] Optionally, the device may further include:

[0105] A first selection module is used for, when receiving a network configuration request sent by a target device, if there is an idle port whose port allocation state is an idle state, selecting a target idle port with a smallest port identifier value from the idle ports with the smallest server identifier value as the target port;

[0106] The second determining module is used to determine the port identifier and the server identifier corresponding to the target port as the target port identifier and the target server identifier.

[0107] Optionally, the device may further include:

[0108] A third determination module is used to determine a historical server identifier and a historical port identifier based on historical network configuration information corresponding to the first device when the target device is a first device; the first device is a re-network configuration device;

[0109] The second sending module is used to send the historical server identifier and the historical port identifier to the first device.

[0110] Optionally, the device may further include:

[0111] A third acquisition module is used to execute the operation of acquiring the network configuration identifier allocated by the identifier allocation device based on the current network configuration information stored in the scheduling server and the preset allocation rule when the port allocation state corresponding to the historical port identifier is the allocated state;

[0112] The second sending module includes:

[0113] The second sending submodule is configured to send the historical server identifier and the historical port identifier to the first device when the port allocation state corresponding to the historical port identifier is an idle state.

[0114] The present invention also provides an electronic device, see Figure 4, including: a processor 801, a memory 802, and a computer program 8021 stored in the memory and executable on the processor, wherein the processor implements the intelligent network distribution method of the aforementioned embodiment when executing the program.

[0115] The present invention also provides a readable storage medium. When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the intelligent network distribution method of the aforementioned embodiment.

[0116] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0117] The algorithm and display provided herein are not inherently related to any particular computer, virtual system or other device. Various general purpose systems can also be used together with the teachings based on this. According to the above description, it is obvious that the structure required for constructing such systems. In addition, the present invention is not directed to any specific programming language either. It should be understood that various programming languages ​​can be utilized to realize the content of the present invention described herein, and the description of the above specific languages ​​is for disclosing the best mode of the present invention.

[0118] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.

[0119] Similarly, it should be understood that in order to streamline the present invention and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, the various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting the following intention: that the claimed invention requires more features than the features explicitly recited in each claim. More specifically, as reflected in the claims below, inventive aspects lie in less than all the features of the individual embodiments disclosed above. Therefore, the claims that follow the specific embodiment are hereby expressly incorporated into the specific embodiment, with each claim itself serving as a separate embodiment of the present invention.

[0120] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.

[0121] The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components in the sorting device according to the present invention. The present invention may also be implemented as a device or apparatus program for executing part or all of the methods described herein. Such a program for implementing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such a signal may be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.

[0122] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be construed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim enumerating a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc., does not indicate any order. These words may be interpreted as names.

[0123] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0124] It should be noted that all actions of acquiring signals, information or data in this application are carried out in compliance with the relevant data protection laws and policies of the country where they are located and with the authorization given by the owner of the corresponding device.

[0125] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

[0126] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A smart distribution network method, characterized in that: Applied to a scheduling server, the method comprises: When receiving a network configuration request sent by a target device, obtaining a network configuration identifier assigned by an identifier allocation device based on current network configuration information stored in the scheduling server and a preset allocation rule; the network configuration identifier includes a target server identifier and a target port identifier; Determine the port status corresponding to the target port identifier based on the port identifier information of the target server corresponding to the target server identifier; When the port status is an available status, the target port identifier and the target server identifier are sent to the target device; the target server identifier and the target port identifier are used for the target device to complete network configuration.

2. The method according to claim 1, characterized in that The acquisition identification allocation device allocates a network identification based on the current network information stored in the scheduling server and a preset allocation rule, including: Sending the current network configuration information stored in the scheduling server to the identification allocation device; the current network configuration information includes the latest server allocation information and the latest port allocation information; Acquire a network configuration identifier assigned by an identifier allocation device; the network configuration identifier includes a target server identifier and a target port identifier determined by the identifier allocation device according to an identifier increment allocation rule based on the latest server allocation information and the latest port allocation information.

3. The method according to claim 1, characterized in that The method further comprises: When the port status is unavailable, a first network configuration identifier reallocated by the identifier allocation device is obtained; the first network configuration identifier includes a first server identifier and a first port identifier, and the first server identifier is determined based on the target server identifier according to a first allocation rule.

4. The method according to claim 1, characterized in that: The method further comprises: When receiving a network configuration request sent by a target device, if there is an idle port whose port allocation state is an idle state, select a target idle port with a smallest port identifier value from the idle ports with the smallest server identifier value as the target port; The port identifier and the server identifier corresponding to the target port are determined as the target port identifier and the target server identifier.

5. The method according to claim 1, characterized in that The method further comprises: In the case where the target device is a first device, determining a historical server identifier and a historical port identifier based on historical network configuration information corresponding to the first device; the first device is a re-network configuration device; The historical server identifier and the historical port identifier are sent to the first device.

6. The method according to claim 5, characterized in that The method further comprises: When the port allocation state corresponding to the historical port identifier is an allocated state, performing the operation of obtaining the network configuration identifier allocated by the identifier allocation device based on the current network configuration information stored in the scheduling server and the preset allocation rule; The sending the history server identifier and the history port identifier to the first device includes: When the port allocation state corresponding to the historical port identifier is an idle state, the historical server identifier and the historical port identifier are sent to the first device.

7. An intelligent distribution network device, characterized in that: Applied to a scheduling server, the device comprises: A first acquisition module is used to obtain a network configuration identifier assigned by an identifier allocation device based on current network configuration information stored in the scheduling server and a preset allocation rule when a network configuration request sent by a target device is received; the network configuration identifier includes a target server identifier and a target port identifier; A first determining module, configured to determine a port state corresponding to the target port identifier based on port identifier information of the target server corresponding to the target server identifier; The first sending module is used to send the target port identifier and the target server identifier to the target device when the port status is an available status; the target server identifier and the target port identifier are used for the target device to complete network configuration.

8. The device according to claim 7, characterized in that The first acquisition module includes: A first sending submodule, configured to send the current network configuration information stored in the scheduling server to the identification allocation device; the current network configuration information includes the latest server allocation information and the latest port allocation information; The first acquisition submodule is used to acquire the network configuration identifier assigned by the identifier allocation device; the network configuration identifier includes the target server identifier and the target port identifier determined by the identifier allocation device according to the identifier increment allocation rule based on the latest server allocation information and the latest port allocation information.

9. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the intelligent distribution network method as described in any one of claims 1 to 6 is implemented.

10. A readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the intelligent network distribution method described in any one of claims 1-6.

Citation Information

Patent Citations

  • Method and system for utilizing idle network resources of networking equipment

    CN111131365A

  • Device network access method and device, storage medium and electronic device

    CN112187751A

  • Internet-of-Things data processing method, device and equipment and storage medium

    CN112688967A

  • Port allocation method and device, electronic equipment and storage medium

    CN113946404A

  • Cloud service control method and related device

    CN114100143A