Kit information processing method, system, device and server
By storing the hardware information of historical network devices and their package information in the server, and directly using the historical package information to generate device identification information when the hardware information of the device to be connected has not changed, the problem of resource waste in each connection request of the network device is solved. , improve efficiency.
Patent Information
- Application Number
- CN202010858026.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-24
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2040-08-24
AI Technical Summary
In the field of network services, the server generates new device identification information every time a network device makes a connection request, resulting in a waste of resources, especially when the hardware has not changed.
The server locally stores the hardware information of historical network devices and their corresponding package information. When receiving the hardware information of the network device to be connected, if the difference with the historical information does not meet the preset conditions, the historical package information is directly sent to the device to be connected to generate device identification. information to avoid redistributing new package information.
This effectively avoids resource waste and improves the efficiency of generating device identification information, especially when the device hardware has not changed.
Smart Images

Figure CN112003939B_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to the field of computer technology, and in particular to a method, system, device and server for processing suite information. [Background technology]
[0002] Currently, in the field of network services, it is necessary to generate device identification information for network devices, and the device identification information is used to identify the network devices.
[0003] In the related art, the network device sends a connection request to the server during the software initialization process, and the server dynamically sends device identification information to the network device. Regardless of whether the hardware of the network device has changed, the server will generate a new device identification information each time it receives a connection request, resulting in a waste of resources. [Summary of the invention]
[0004] In view of this, an embodiment of the present invention provides a method, system, device and server for processing suite information, so as to avoid wasting resources.
[0005] On the one hand, an embodiment of the present invention provides a method for processing suite information, wherein the hardware information of historical network devices and their corresponding suite information are stored locally, and the method includes:
[0006] Receiving a connection request sent by a network device to be connected, wherein the connection request includes hardware information of multiple hardware on the network device to be connected;
[0007] When the difference between the hardware information of the network device to be connected and the hardware information of the historical network device does not reach a preset difference condition, the suite information corresponding to the hardware information of the historical network device is sent to the network device to be connected, so that the network device to be connected can generate device identification information based on the suite information and the hardware information of the multiple hardware.
[0008] Optionally, the difference between the hardware information of the network device to be connected and the hardware information of the historical network device does not meet a preset difference condition, including:
[0009] According to the stored hardware information of the historical network device and multiple hardware information of the network device to be connected, the changed hardware information of the network device to be connected is queried, and according to the changed hardware information, it is determined that the network device to be connected has not changed.
[0010] Optionally, the difference between the hardware information of the network device to be connected and the hardware information of the historical network device does not meet a preset difference condition, including:
[0011] According to the stored hardware information of the historical network device and multiple pieces of hardware information of the network device to be connected, the hardware information of the network device to be connected that has not changed is queried.
[0012] Optionally, determining that the network device to be connected has not changed according to the changed hardware information includes:
[0013] According to the changed hardware information, counting the number of changes of different types of hardware of the network device to be connected, wherein the number of changes of different types of hardware includes the number of changed hardware information of different types of hardware;
[0014] It is determined according to the change quantities of the multiple types of hardware that the network device to be connected has not changed.
[0015] Optionally, the changed hardware information includes unstored hardware information; or,
[0016] The changed hardware information includes hardware information that is not possessed by the network device to be connected in the stored hardware information of the historical network devices.
[0017] Optionally, determining that the network device to be connected has not changed according to the number of changes in the multiple types of hardware includes:
[0018] Perform weighted sum calculation on the change quantities of multiple types of hardware according to the set hardware type weights to generate the hardware sum;
[0019] If the hardware sum is less than the weighted threshold value, it is determined that the network device to be connected has not changed.
[0020] Optionally, it also includes:
[0021] When the difference between the hardware information of the network device to be connected and the hardware information of the historical network device reaches a preset difference condition, allocating kit information to the network device to be connected;
[0022] The allocated suite information is sent to the network device to be connected.
[0023] Optionally, the hardware information of the multiple hardware includes a motherboard number, a CPU number and a MAC address;
[0024] The suite information includes one of a device identification, a random code, a manufacturer type, and a tunnel code, or any combination thereof.
[0025] On the other hand, an embodiment of the present invention provides a system for processing suite information, including: a server and a network device to be connected, wherein the server locally stores hardware information of a historical network device and its corresponding suite information;
[0026] The server is configured to receive a connection request sent by a network device to be connected, wherein the connection request includes hardware information of multiple hardware on the network device to be connected; when the difference between the hardware information of the network device to be connected and the hardware information of the historical network device does not meet a preset difference condition, send the suite information corresponding to the hardware information of the historical network device to the network device to be connected;
[0027] The network device to be connected is used to generate device identification information according to the suite information and the hardware information of the multiple hardware.
[0028] Optionally, it also includes: a client;
[0029] The network device to be connected is also used to convert the device identification information into an identification code and display the identification code;
[0030] The client is used to scan the identification code to obtain the device identification information.
[0031] Optionally, the client is further used to multicast or broadcast a protocol message in a local area network, the protocol message including hardware information; whether a response message returned by the network device to be connected when the hardware information in the protocol message is compared with its own hardware information to be consistent within a set time period; if the response message is received, establish a local area network connection with the network device to be connected; if the response message is not received, send a query request to the server, the query request including the suite information;
[0032] The server is further used to query the status information of the network device to be connected and the connection information of the network device to be connected corresponding to the suite information; and send the status information of the network device to be connected and the connection information of the network device to be connected to the client;
[0033] The client is further configured to establish a P2P connection or a Relay connection with the network device to be connected according to the state information of the network device to be connected and the connection information of the network device to be connected.
[0034] Optionally, the network device to be connected is also used to detect hardware information of multiple hardware during software initialization.
[0035] On the other hand, an embodiment of the present invention provides a device for processing suite information, including:
[0036] A receiving module, configured to receive a connection request sent by a network device to be connected, wherein the connection request includes hardware information of multiple hardware on the network device to be connected;
[0037] A sending module is used to send the kit information corresponding to the hardware information of the historical network device to the network device to be connected if the difference between the hardware information of the network device to be connected and the hardware information of the historical network device does not meet the preset difference condition, so that the network device to be connected can generate device identification information according to the kit information and the hardware information of the multiple hardware.
[0038] On the other hand, an embodiment of the present invention provides a server including a memory and a processor, wherein the memory is used to store information including program instructions, and the processor is used to control the execution of the program instructions, and the program instructions, when loaded and executed by the processor, implement the steps of the above-mentioned kit information processing method.
[0039] In the technical solution provided by the embodiment of the present invention, the network device to be connected sends a connection request including multiple hardware information of the network device to be connected to the server. When the difference between the hardware information of the network device to be connected and the hardware information of the historical network device does not reach a preset difference condition, the server sends the suite information corresponding to the hardware information of the historical network device to the network device to be connected. At this time, there is no need to allocate new suite information to the network device to be connected, and the original suite information is still used as the suite information of the network device to be connected, so that the network device to be connected can generate device identification information according to the original suite information and the hardware information of multiple hardware, thereby avoiding waste of resources.
Brief Description of the Drawings
[0040] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0041] Figure 1 A schematic diagram of the structure of a system for processing suite information provided by an embodiment of the present invention;
[0042] Figure 2 A flowchart of a method for processing suite information provided by an embodiment of the present invention;
[0043] Figure 3 A flowchart of another method for processing kit information provided by an embodiment of the present invention;
[0044] Figure 4 This is a schematic diagram of the application of device identification information in an embodiment of the present invention;
[0045] Figure 5 A schematic diagram of the structure of a device for processing suite information provided by an embodiment of the present invention;
[0046] Figure 6 A schematic diagram of a server provided in an embodiment of the present invention. [Specific implementation method]
[0047] In order to better understand the technical solution of the present invention, the embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0048] It should be clear that the described embodiments are only some embodiments of the present invention, not all 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.
[0049] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms "a", "said" and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.
[0050] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0051] Figure 1 A schematic diagram of a system for processing suite information provided by an embodiment of the present invention is shown in FIG. Figure 1 As shown, the system includes: a server 1 and a network device to be connected 2. The server 1 locally stores the hardware information of the historical network device and its corresponding suite information.
[0052] The server 1 is used to receive a connection request sent by the network device 2 to be connected, wherein the connection request includes hardware information of multiple hardware on the network device 2 to be connected; when the difference between the hardware information of the network device 2 to be connected and the hardware information of the historical network device does not meet the preset difference condition, the server 1 sends the suite information corresponding to the hardware information of the historical network device to the network device 2 to be connected. The network device 2 to be connected is used to generate device identification information according to the suite information and the hardware information of the multiple hardware.
[0053] In the embodiment of the present invention, the server 1 is specifically used to query the hardware information of the network device to be connected 2 that has changed based on the stored hardware information of the historical network device and the multiple hardware information of the network device to be connected, and determine that the network device to be connected 2 has not changed based on the changed hardware information. Alternatively, the server 1 is specifically used to query the hardware information of the network device to be connected that has not changed based on the stored hardware information of the historical network device and the multiple hardware information of the network device to be connected.
[0054] In an embodiment of the present invention, server 1 is specifically used to count the number of changes in different types of hardware of the network device to be connected based on the changed hardware information, wherein the number of changes in different types of hardware includes the number of changes in hardware information of different types of hardware; and determine that the network device 2 to be connected has not changed based on the number of changes in multiple types of hardware.
[0055] In the embodiment of the present invention, the changed hardware information includes hardware information that is not stored; or, the changed hardware information includes hardware information that is not possessed by the network device to be connected in the stored hardware information of the historical network device.
[0056] In an embodiment of the present invention, server 1 is specifically used to perform weighted sum calculation on the number of changes in multiple types of hardware according to the set hardware type weights to generate a hardware sum; if the hardware sum is less than the weighted threshold value, it is determined that the network device 2 to be connected has not changed.
[0057] In an embodiment of the present invention, the server 1 is also used to allocate kit information to the network device 2 to be connected when the difference between the hardware information of the network device 2 to be connected and the hardware information of the historical network device reaches a preset difference condition; and send the allocated kit information to the network device 2 to be connected.
[0058] In the embodiment of the present invention, the server 1 is specifically used to query the hardware information of the network device to be connected that has changed based on the hardware information of the historical network device and multiple hardware information of the network device to be connected, and determine that the network device to be connected 2 has changed based on the changed hardware information.
[0059] In an embodiment of the present invention, server 1 is specifically used to perform weighted sum calculation on the number of changes in multiple types of hardware according to the set hardware type weights to generate a hardware sum; if the hardware sum is greater than or equal to the weighted threshold value, it is determined that the network device 2 to be connected has changed.
[0060] In an embodiment of the present invention, server 1 is also used to continue to execute the step of querying whether there is any changed hardware information of the network device to be connected based on the stored hardware information of the historical network device and multiple hardware information of the network device to be connected if at least one hardware information of the network device to be connected is stored locally.
[0061] In the embodiment of the present invention, the server 1 is further configured to continue to execute the step of allocating the suite information for the network device to be connected if any hardware information of the network device to be connected is not stored locally.
[0062] In an embodiment of the present invention, the server 1 is also used to query the suite information corresponding to the hardware information of the historical network device when the difference between the hardware information of the network device 2 to be connected and the hardware information of the historical network device does not reach a preset difference condition, and continue to execute the step of sending the queried suite information to the network device to be connected.
[0063] In the embodiment of the present invention, the system further comprises: a client 3. The network device 2 to be connected is further configured to convert the device identification information into an identification code and display the identification code. The client 3 is configured to scan the identification code to obtain the device identification information.
[0064] In an embodiment of the present invention, the client 3 is also used to multicast or broadcast a protocol message in a local area network, the protocol message includes hardware information; whether the response information returned by the network device 2 to be connected when the hardware information in the protocol message is compared with its own hardware information within a set time period is received; if the response information is received, a local area network connection is established with the network device 2 to be connected; if the response information is not received, a query request is sent to the server 1, the query request includes the suite information. The server 1 is also used to query the status information of the network device to be connected and the connection information of the network device to be connected corresponding to the suite information; and send the status information of the network device to be connected and the connection information of the network device to be connected to the client 3. The client 3 is also used to establish a P2P connection or a Relay connection with the network device according to the status information of the network device to be connected and the connection information of the network device to be connected.
[0065] In the technical solution provided by the embodiment of the present invention, the network device to be connected sends a connection request including hardware information of multiple hardware of the network device to be connected to the server. When the difference between the hardware information of the network device to be connected and the hardware information of the historical network device does not reach a preset difference condition, the server sends the suite information corresponding to the hardware information of the historical network device to the network device to be connected. At this time, there is no need to allocate new suite information to the network device to be connected, and the original suite information is still used as the suite information of the network device to be connected, so that the network device to be connected can generate device identification information according to the original suite information and the hardware information of multiple hardware, thereby avoiding waste of resources.
[0066] Figure 2 A flowchart of a method for processing suite information provided by an embodiment of the present invention is applied to a server, and the server locally stores hardware information of historical network devices and their corresponding suite information, such as Figure 2 As shown, the method includes:
[0067] Step 101: Receive a connection request sent by a network device to be connected, where the connection request includes hardware information of multiple hardware on the network device to be connected.
[0068] Step 102: When the difference between the hardware information of the network device to be connected and the hardware information of the historical network device does not reach a preset difference condition, send the suite information corresponding to the hardware information of the historical network device to the network device to be connected, so that the network device to be connected can generate device identification information according to the suite information and the hardware information of multiple hardware.
[0069] In an embodiment of the present invention, before step 101, the historical network device sends a connection request to the server, and the connection request includes hardware information of multiple hardware on the historical network device; the server allocates suite information to the historical network device, establishes a correspondence between the hardware information and suite information of the historical network device, and locally stores the hardware information of the historical network device and its corresponding suite information.
[0070] In an embodiment of the present invention, the difference between the hardware information of the network device to be connected and the hardware information of the historical network device does not meet the preset difference condition, which may specifically include: querying the hardware information of the network device to be connected that has changed based on the stored hardware information of the historical network device and multiple hardware information of the network device to be connected, and determining that the network device to be connected has not changed based on the changed hardware information; or, querying the hardware information of the network device to be connected that has not changed based on the stored hardware information of the historical network device and multiple hardware information of the network device to be connected. Wherein, the changed hardware information includes hardware information that is not stored; or, the changed hardware information includes hardware information that the network device to be connected does not have in the stored hardware information of the historical network device.
[0071] In the technical solution provided by the embodiment of the present invention, the network device to be connected sends a connection request including multiple hardware information of the network device to be connected to the server. When the difference between the hardware information of the network device to be connected and the hardware information of the historical network device does not reach a preset difference condition, the server sends the suite information corresponding to the hardware information of the historical network device to the network device to be connected. At this time, there is no need to allocate new suite information to the network device to be connected, and the original suite information is still used as the suite information of the network device to be connected, so that the network device to be connected can generate device identification information according to the original suite information and the hardware information of multiple hardware, thereby avoiding waste of resources.
[0072] Figure 3 A flowchart of another method for processing kit information provided by an embodiment of the present invention is shown in FIG. Figure 3 As shown, the method includes:
[0073] Step 201: The network device to be connected detects hardware information of multiple hardware during software initialization.
[0074] In an embodiment of the present invention, the network device may include a network device to be connected or a historical network device. The network device may include a mobile phone, a computer, or a tablet computer. If the network device has sent hardware information of multiple hardware of the network device to the server, and the server has also allocated suite information to the network device, the network device may be used as a historical network device.
[0075] The software initialization process may include software installation, software startup, software activation or software registration process. As an alternative, the software may include embedded software.
[0076] A network device may include multiple types of hardware, for example, the hardware may include a motherboard, a central processing unit (CPU), a network card, or a hard disk. The number of each type of hardware may be one or more, so the network device may include multiple hardware. Each hardware has a hardware information, for example, the motherboard has a motherboard number, the CPU has a CPU number, and the network card has a Media Access Control (MAC) address. The network device detects its own hardware, and the multiple hardware information detected may include the motherboard number, the CPU number, and the MAC address. For example, if the number of motherboards is one and the number of network cards is two, the detected hardware information may include the motherboard number of one motherboard and the MAC addresses of two network cards.
[0077] Step 202: The network device to be connected sends a connection request to the server, where the connection request includes hardware information of multiple hardware on the network device to be connected.
[0078] Each time the software of the network device to be connected is started, it will try to connect to the server, and the network device to be connected will send a connection request to the server.
[0079] Step 203 , the server queries whether at least one piece of hardware information of the network device to be connected is stored locally, and if so, executes step 204 ; if not, executes step 209 .
[0080] If the server has previously received multiple hardware information sent by a historical network device, it will store the multiple hardware information of the historical network device. After receiving the connection request, the server will query whether the multiple hardware information of the historical network device stored locally includes at least one hardware information of the network device to be connected carried in the connection request.
[0081] If the server queries and finds that at least one piece of hardware information of the network device to be connected is stored locally, it indicates that the server has sent kit information to the network device to be connected. For example, the server queries and finds that at least one piece of hardware information of the network device to be connected is stored locally, including the motherboard number, CPU number and MAC address.
[0082] If the server finds that any hardware information of the network device to be connected is not stored locally, it means that the server has not sent the kit information to the network device to be connected. For example: if the server finds that any hardware information of the motherboard number, CPU number and MAC address of the network device to be connected is not stored locally, it means that the server has not sent the kit information to the network device to be connected.
[0083] Step 204 , the server queries whether there is any changed hardware information of the network device to be connected based on the stored hardware information of the historical network device and multiple hardware information of the network device to be connected. If so, execute step 205 ; if not, execute step 208 .
[0084] In the embodiment of the present invention, compared with the historical network device, the changed hardware information may be the hardware information of the replaced hardware of the network device to be connected, the hardware information of the reduced hardware, or the hardware information of the increased hardware.
[0085] As an optional solution, the changed hardware information includes unstored hardware information. For example, multiple hardware information of the network device to be connected includes a motherboard number of a motherboard, a MAC address of network card A, and a MAC address of network card B, and the stored hardware information of the historical network device includes a motherboard number of a motherboard, a MAC address of network card A, and a MAC address of network card C, wherein the unstored hardware information includes the MAC address of network card B, and the changed hardware information includes the MAC address of network card B. This situation indicates that the network device to be connected has replaced a network card relative to the historical network device, and the replaced network card includes network card B.
[0086] As another optional solution, the changed hardware information includes unstored hardware information. For example, the multiple hardware information of the network device to be connected includes a motherboard number of a motherboard, a MAC address of network card A, and a MAC address of network card B, and the stored hardware information of the historical network device includes a motherboard number of a motherboard and a MAC address of network card A, wherein the unstored hardware information includes the MAC address of network card B, and the changed hardware information includes the MAC address of network card B. This situation indicates that the network device to be connected has added a network card relative to the historical network device, and the added network card includes network card B.
[0087] As another optional solution, the changed hardware information includes hardware information that the network device to be connected does not have in the hardware information of the historical network device. For example: the multiple hardware information of the network device to be connected includes a motherboard number of a motherboard and a MAC address of network card A, and the stored hardware information of the historical network device includes a motherboard number of a motherboard, a MAC address of network card A, and a MAC address of network card B, wherein the hardware information that the network device to be connected does not have in the hardware information of the historical network device includes the MAC address of network card B, and the changed hardware information includes the MAC address of network card B. This situation indicates that the network device to be connected has one less network card compared to the historical network device, and the reduced network card includes network card B.
[0088] If the server queries and finds that the hardware information of the network device to be connected has changed, it indicates that the hardware of the network device to be connected has changed compared with the historical network device; if the server queries and finds that the hardware information of the network device to be connected has not changed, it indicates that the hardware of the network device to be connected has not changed compared with the historical network device.
[0089] Step 205: The server counts the number of changes in different types of hardware of the network device to be connected based on the changed hardware information. The number of changes in different types of hardware includes the number of changed hardware information of the different types of hardware.
[0090] For example: there are three hardware changes in the network device to be connected, and the hardware information of the three hardware changes includes the CPU number of a CPU, the MAC address of network card B, and the MAC address of network card C. Then the counted number of changes in different types of hardware of the network device to be connected includes the number of changes in the CPU and the number of changes in the network card, among which the number of changes in the CPU is 1, and the number of changes in the network card is 2.
[0091] Step 206: The server performs a weighted sum calculation on the change quantities of multiple types of hardware according to the set hardware type weights to generate a hardware sum.
[0092] In the embodiment of the present invention, corresponding hardware type weights may be set for different types of hardware. When the importance of a certain type of hardware is higher, the set hardware type weight is larger. For example, if the importance of the motherboard is higher than the importance of the network card, the hardware type weight corresponding to the motherboard is greater than the hardware type weight corresponding to the network card.
[0093] The hardware total is calculated by the formula SUM=number of changes in hardware 1*K1+number of changes in hardware 2*K2+…+number of changes in hardware n*Kn, where SUM is the total hardware, hardware 1, hardware 2, …, hardware n are different types of hardware in the network device, K1, K2, …, Kn are the hardware type weights corresponding to hardware 1, hardware 2 and hardware n respectively, and n is a positive integer.
[0094] For example: SUM = CPU change number * K2 + network card change number * K3, where K2> K3. The larger the hardware type weight, the more important the hardware corresponding to the hardware type weight in the network device is, and the greater the impact when the hardware is replaced.
[0095] Step 207 , the server determines whether the hardware sum is less than the weighted threshold value, if so, executes step 208 ; if not, executes step 209 .
[0096] If the server determines that the hardware sum is less than the weighted threshold value, it indicates that the network device to be connected has not changed relative to the historical network device. For example, if the network device to be connected has replaced the hardware network card, the network card in the network device to be connected has changed, but the motherboard number and the CPU number have not changed. Since the weight of the hardware type corresponding to the MAC address is small, the hardware sum calculated according to the calculation method of step 206 is less than the weighted threshold value, and the network device to be connected with the replaced network card is still determined to be unchanged.
[0097] If the server determines that the hardware sum is greater than or equal to the weighted threshold value, it indicates that the network device to be connected has changed relative to the historical network device. For example, if the network device to be connected has replaced the hardware motherboard, the motherboard in the hardware information has changed, while the CPU number and MAC address have not changed. Since the weight of the hardware type corresponding to the motherboard is relatively large, the hardware sum calculated according to the calculation method of step 206 is greater than or equal to the weighted threshold value, and the network device to be connected with the replaced motherboard is determined to have changed.
[0098] It should be noted that: the change of the device to be connected means that the device to be connected has undergone substantial changes, and the unchanged device to be connected means that the device to be connected has not undergone substantial changes. If the hardware in the device to be connected has changed, for example, the hardware has been added, reduced or replaced, it does not indicate whether the device to be connected has changed. The embodiment of the present invention needs to determine whether the device to be connected has undergone substantial changes through the changed hardware information. Only when it is determined that the device to be connected has undergone substantial changes can it be determined that the device to be connected has changed.
[0099] Step 208 , the server queries the suite information corresponding to the hardware information of the historical network device, sends the query suite information to the network device to be connected, and continues to execute step 211 .
[0100] In the embodiment of the present invention, the suite information may include one of a device identification, a random code, a service provider and a tunnel code or any combination thereof. As an optional solution, the suite information may include a device identification, a random code, a manufacturer and a tunnel code.
[0101] In the embodiment of the present invention, the device identification includes a device identification code or a serial number, and the device identification is used to identify the network device.
[0102] In the embodiment of the present invention, the service provider may provide different functions for the network device. For example, the function may include a remote function, and different service providers may provide the same function for the network device.
[0103] The service provider randomly assigns a function identification code to a function provided by a network device, and the random code includes the function identification code randomly assigned by the service provider to a function provided by the network device, for example: the service provider assigns a random code to the remote function of network device A.
[0104] When a service provider provides a function for a network device, a tunnel code is allocated for the function provided by the network device. For example, the service provider provides a tunnel code for a remote function for network device A. The network device can perform function operations according to the tunnel identified by the tunnel code. For example, network device A can perform remote function operations according to the tunnel identified by the tunnel code.
[0105] In this step, since the server has allocated suite information to the historical network device and stored the suite information, the suite information of the historical network device may have a corresponding relationship with any hardware information of the historical network device, and the suite information of the historical network device may have a corresponding relationship with at least one stored hardware information of the historical network device. Since the network device to be connected has not changed relative to the historical network device, the network device to be connected is equivalent to the historical network device, and the server may directly query the suite information corresponding to the hardware information of the historical network device from the stored suite information, that is, send the query stored suite information to the network device to be connected, without the need to allocate new suite information to the network device to be connected.
[0106] Step 209: The server distributes suite information to the network device to be connected.
[0107] In this step, since the network device to be connected has changed compared to the historical network device, the server needs to allocate a set of information to the new network device to be connected. Specifically, the server can select a set of information for the network device to be connected from the set information in the information pool and allocate the selected set of information to the network device to be connected.
[0108] Step 210: The server sends the allocated suite information to the network device to be connected.
[0109] Step 211: The network device to be connected generates device identification information according to the suite information and hardware information of the multiple hardware, and converts the device identification information into an identification code.
[0110] In this step, the network device to be connected may combine the hardware information and the suite information to generate the device identification information. As an optional solution, the hardware information and the suite information may be combined to generate the device identification information in the order in which the hardware information and the suite information are set or in the order in which the suite information and the hardware information are set. In other words, the device identification information includes the hardware information + the suite information, or the device identification information includes the suite information + the hardware information. As another optional solution, the order of some fields in the hardware information may be reversed and / or the order of some fields in the suite information may be reversed, and then the hardware information and the suite information may be combined to generate the device identification information.
[0111] In the embodiment of the present invention, the identification code includes a one-dimensional code or a two-dimensional code.
[0112] In the embodiment of the present invention, after the network device to be connected generates device identification information and converts the device identification information into an identification code, the network connection can be achieved through the identification code. Figure 4 FIG. 1 is a schematic diagram of the application of device identification information in an embodiment of the present invention. Figure 4 As shown, the method includes:
[0113] Step 301: The client scans the identification code displayed by the network device to be connected to obtain device identification information, which includes hardware information and kit information.
[0114] As an optional solution, if the order of some fields in the hardware information is reversed and / or the order of some fields in the suite information is reversed, some fields in the hardware information can be restored to their original order and / or some fields in the suite information can be restored to their original order to obtain the hardware information and suite information.
[0115] Step 302: The client multicasts or broadcasts a protocol message in the local area network, where the protocol message includes hardware information.
[0116] As an optional solution, in step 302, the hardware information includes a MAC address, and the protocol message includes the MAC address.
[0117] Step 303: Whether the client receives the response information returned by the network device to be connected within the set time period when the hardware information in the protocol message is compared with its own hardware information and is consistent, if so, execute step 304; if not, execute step 305.
[0118] In the embodiment of the present invention, after receiving the protocol message, the network device to be connected in the local area network compares the hardware information in the protocol message with its own hardware information to see if they are consistent. If they are consistent, the network device to be connected returns response information to the client. As an optional solution, the network device to be connected compares the MAC address in the protocol message with its own MAC address to see if they are consistent. If they are consistent, the network device to be connected returns response information to the client.
[0119] In this step, if the client receives the response information returned by the network device to be connected within the set time period, it indicates that the network device to be connected is found in the local area network; if the client does not receive the response information returned by the network device to be connected within the set time period, it indicates that the network device to be connected is not found in the local area network.
[0120] Step 304: The client establishes a local area network connection with the network device to be connected, and the process ends.
[0121] Step 305: The client sends a query request to the server, where the query request includes suite information.
[0122] As an optional solution, the suite information includes a tunnel code, and the query request includes the tunnel code.
[0123] Step 306: The server queries the status information of the network device to be connected and the connection information of the network device to be connected corresponding to the suite information.
[0124] As an optional solution, the server queries the state information of the network device to be connected and the connection information of the network device to be connected corresponding to the tunnel code, wherein the state information of the network device to be connected may include whether the network device to be connected is online, and the connection information of the network device to be connected includes the external network IP address and port number.
[0125] Step 307: The server sends the status information of the network device to be connected and the connection information of the network device to be connected to the client.
[0126] Step 308: The client establishes a P2P connection or a Relay connection with the network device to be connected according to the state information of the network device to be connected and the connection information of the network device to be connected.
[0127] When the status information of the network to be connected includes that the network device is online, the client establishes a P2P connection or a Relay connection with the network device to be connected according to the connection information of the network device to be connected.
[0128] In the technical solution provided by the embodiment of the present invention, the server queries the locally stored at least one piece of hardware information of the network device to be connected and if the hardware information of multiple hardware is queried, including the unstored hardware information, the number of changes of different types of hardware is counted according to the unstored hardware information, the number of changes of multiple types of hardware is weighted and summed according to the set hardware type weight to generate the hardware sum, and it is judged whether the sum of the hardware information is less than the weighted threshold value and the suite information is sent to the network device to be connected according to the judgment result, so that if part of the hardware of the network device to be connected is damaged or replaced and the network device to be connected is judged as unchanged, the server can still send the original suite information to the network device, thereby further avoiding the waste of resources. In the embodiment of the present invention, the device identification information generated according to the hardware information and the suite information can support the establishment of a connection between the client and the network device in a local area network or in a non-local area network.
[0129] Figure 5 A schematic diagram of a device for processing suite information provided by an embodiment of the present invention, the device is applied to a server, such as Figure 5 As shown, the device includes: a receiving module 11 and a sending module 13.
[0130] The receiving module 11 is used to receive a connection request sent by the network device to be connected, wherein the connection request includes hardware information of multiple hardware on the network device to be connected. The sending module 13 is used to send the suite information corresponding to the hardware information of the historical network device to the network device to be connected if the difference between the hardware information of the network device to be connected and the hardware information of the historical network device does not meet the preset difference condition, so that the network device to be connected can generate device identification information according to the suite information and the hardware information of the multiple hardware.
[0131] In the embodiment of the present invention, the device further includes: a judgment module 12. The judgment module 12 is used to judge whether the difference between the hardware information of the network device to be connected and the hardware information of the historical network device meets a preset difference condition.
[0132] In the embodiment of the present invention, the determination module 12 includes a query submodule 121 and a determination submodule 122 .
[0133] The query submodule 121 is used to query whether there is any changed hardware information of the network device to be connected based on the stored hardware information of the historical network device and the multiple hardware information of the network device to be connected. The judgment submodule 122 is used to determine whether the network device to be connected has changed based on the changed hardware information if the query submodule 121 queries the changed hardware information of the network device to be connected based on the stored hardware information of the historical network device and the multiple hardware information of the network device to be connected, and if it is determined that the network device to be connected has not changed based on the changed hardware information, trigger the sending module 13 to execute the step of sending the suite information corresponding to the hardware information of the historical network device to the network device to be connected.
[0134] The query submodule 121 is used to query the hardware information of the network device to be connected that has not changed based on the stored hardware information of the historical network device and multiple hardware information of the network device to be connected, and trigger the sending module 13 to execute the step of sending the suite information corresponding to the hardware information of the historical network device to the network device to be connected.
[0135] In the embodiment of the present invention, the judgment submodule 122 is used to count the number of changes in different types of hardware of the network device to be connected according to the changed hardware information, and the number of changes in different types of hardware includes the number of changed hardware information of different types of hardware; and judge whether the network device to be connected has changed according to the number of changes in multiple types of hardware. Specifically, the judgment submodule 122 is specifically used to perform weighted sum calculation on the number of changes in multiple types of hardware according to the set hardware type weights to generate a hardware sum; and judge whether the hardware sum is less than a weighted threshold value to determine whether the network device to be connected has changed.
[0136] In an embodiment of the present invention, the device further includes: an allocation module 14. The allocation module 14 is used to allocate suite information to the network device to be connected if the judgment module 12 determines that the difference between the hardware information of the network device to be connected and the hardware information of the historical network device reaches a preset difference condition. The sending module 13 is also used to send the allocated suite information to the network device to be connected.
[0137] In an embodiment of the present invention, the judgment submodule 122 is used to, if the query submodule 121 queries the hardware information of the network device to be connected based on the stored hardware information of the historical network device and multiple hardware information of the network device to be connected, determine whether the network device to be connected has changed based on the changed hardware information; if it is determined that the network device to be connected has changed based on the changed hardware information, trigger the allocation module 14 to execute the step of allocating the kit information to the network device to be connected.
[0138] In an embodiment of the present invention, the device further includes: a first query module 15. The first query module 15 is used to query whether at least one piece of hardware information of the network device to be connected is stored locally, and if it is found that at least one piece of hardware information of the network device to be connected is stored locally, the query submodule 121 is triggered to execute the step of querying whether the multiple pieces of hardware information of the network device to be connected include unstored hardware information based on the stored hardware information of the historical network device; if it is found that any piece of hardware information of the network device to be connected is not stored locally, the allocation module 14 is triggered to execute the step of allocating the kit information to the network device to be connected.
[0139] In an embodiment of the present invention, the device further includes: a second query module 16. The second query module 16 is used to query the suite information corresponding to the hardware information of the historical network device if the judgment module 12 judges that the difference between the hardware information of the network device to be connected and the hardware information of the historical network device does not meet the preset difference condition, and trigger the sending module 13 to send the suite information corresponding to the hardware information of the historical network device to the network device to be connected.
[0140] In the technical solution provided by the embodiment of the present invention, the network device to be connected sends a connection request including multiple hardware information of the network device to be connected to the server. When the server determines that the difference between the hardware information of the network device to be connected and the hardware information of the historical network device does not reach the preset difference condition, the server sends the suite information corresponding to the hardware information of the historical network device to the network device to be connected. At this time, there is no need to allocate new suite information to the network device to be connected, and the original suite information is still used as the suite information of the network device to be connected, so that the network device to be connected can generate device identification information according to the original suite information and the hardware information of multiple hardware, thereby avoiding waste of resources.
[0141] An embodiment of the present invention provides a storage medium, which includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the steps of the various embodiments of the above-mentioned method for processing suite information. For specific descriptions, please refer to the various embodiments of the above-mentioned method for processing suite information.
[0142] An embodiment of the present invention provides a server, including a memory and a processor, the memory is used to store information including program instructions, the processor is used to control the execution of the program instructions, and the program instructions, when loaded and executed by the processor, implement the steps of the embodiment of the above-mentioned method for processing suite information. For a specific description, please refer to the embodiment of the above-mentioned method for processing suite information.
[0143] Figure 6 A schematic diagram of a server provided by an embodiment of the present invention. Figure 6 As shown, the server 1 of this embodiment includes: a processor 31, a memory 32, and a computer program 33 stored in the memory 32 and executable on the processor 31. When the computer program 33 is executed by the processor 31, the processing method applied to the kit information in the embodiment is implemented. To avoid repetition, it is not described one by one here. Alternatively, when the computer program is executed by the processor 31, the functions of each model / unit in the processing device applied to the kit information in the embodiment are implemented. To avoid repetition, it is not described one by one here.
[0144] The server 1 includes, but is not limited to, a processor 31 and a memory 32. Those skilled in the art will appreciate that Figure 6 It is only an example of server 1 and does not constitute a limitation of server 1. Server 1 may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, server 1 may also include input and output devices, network access devices, buses, etc.
[0145] The processor 31 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0146] The memory 32 may be an internal storage unit of the network device 3, such as a hard disk or memory of the server 1. The memory 32 may also be an external storage device of the network device 3, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the server 1. Further, the memory 32 may also include both an internal storage unit of the server 1 and an external storage device. The memory 32 is used to store computer programs and other programs and data required by the server 1. The memory 32 may also be used to temporarily store data that has been output or is to be output.
[0147] 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.
[0148] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0149] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0150] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0151] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (Processor) to perform some steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program codes.
[0152] 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, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for processing package information, characterized in that: The hardware information of the historical network device and its corresponding kit information are stored locally, and the method includes: Receiving a connection request sent by a network device to be connected, wherein the connection request includes hardware information of multiple hardware on the network device to be connected; When the difference between the hardware information of the network device to be connected and the hardware information of the historical network device does not reach a preset difference condition, sending the suite information corresponding to the hardware information of the historical network device to the network device to be connected; when the difference between the hardware information of the network device to be connected and the hardware information of the historical network device reaches a preset difference condition, allocating the suite information to the network device to be connected, and sending the allocated suite information to the network device to be connected; so that the network device to be connected generates device identification information according to the suite information and the hardware information of the multiple hardware; The difference between the hardware information of the network device to be connected and the hardware information of the historical network device does not meet the preset difference condition, including: According to the stored hardware information of the historical network device and multiple hardware information of the network device to be connected, query the changed hardware information of the network device to be connected, and determine that the network device to be connected has not changed according to the changed hardware information; The determining that the network device to be connected has not changed according to the changed hardware information includes: According to the changed hardware information, counting the number of changes of different types of hardware of the network device to be connected, wherein the number of changes of different types of hardware includes the number of changed hardware information of different types of hardware; Perform weighted sum calculation on the change quantities of multiple types of hardware according to the set hardware type weights to generate the hardware sum; If the hardware sum is less than the weighted threshold value, it is determined that the network device to be connected has not changed.
2. The method according to claim 1, characterized in that The difference between the hardware information of the network device to be connected and the hardware information of the historical network device does not meet the preset difference condition, including: According to the stored hardware information of the historical network device and multiple pieces of hardware information of the network device to be connected, the hardware information of the network device to be connected that has not changed is queried.
3. The method according to claim 1, characterized in that The changed hardware information includes unstored hardware information; or, The changed hardware information includes hardware information that is not possessed by the network device to be connected in the stored hardware information of the historical network devices.
4. The method according to any one of claims 1 to 3, characterized in that: The hardware information of the multiple hardware includes a motherboard number, a CPU number and a MAC address; The suite information includes one of a device identification, a random code, a manufacturer type, and a tunnel code, or any combination thereof.
5. A system for processing package information, characterized in that: include: A server and a network device to be connected, wherein the server locally stores hardware information of historical network devices and corresponding kit information; The server is used to receive a connection request sent by a network device to be connected, wherein the connection request includes hardware information of multiple hardware on the network device to be connected; When the difference between the hardware information of the network device to be connected and the hardware information of the historical network device does not reach a preset difference condition, sending the suite information corresponding to the hardware information of the historical network device to the network device to be connected; when the difference between the hardware information of the network device to be connected and the hardware information of the historical network device reaches a preset difference condition, allocating the suite information to the network device to be connected, and sending the allocated suite information to the network device to be connected; The network device to be connected is used to generate device identification information according to the suite information and the hardware information of the plurality of hardware; The server is specifically used to query the hardware information of the network device to be connected that has changed according to the stored hardware information of the historical network device and multiple hardware information of the network device to be connected, and determine that the network device to be connected has not changed according to the changed hardware information; The server is specifically used to count the number of changes in different types of hardware of the network device to be connected according to the changed hardware information, wherein the number of changes in different types of hardware includes the number of changed hardware information of different types of hardware; and determine that the network device to be connected has not changed according to the number of changes in multiple types of hardware; The server is specifically used to perform weighted sum calculation on the number of changes in multiple types of hardware according to the set hardware type weights to generate a hardware sum; if the hardware sum is less than a weighted threshold value, it is determined that the network device to be connected has not changed.
6. The system according to claim 5, characterized in that Also includes: Client side; The network device to be connected is also used to convert the device identification information into an identification code and display the identification code; The client is used to scan the identification code to obtain the device identification information.
7. The system according to claim 6, characterized in that The client is also used to multicast or broadcast a protocol message in the local area network, the protocol message including hardware information; whether a response message returned by the network device to be connected when the hardware information in the protocol message is compared with the hardware information of the network device to be connected and is consistent with the hardware information of the network device to be connected within a set time period; If the response information is received, a local area network connection is established with the network device to be connected; if the response information is not received, a query request is sent to a server, the query request including the suite information; The server is further used to query the status information of the network device to be connected and the connection information of the network device to be connected corresponding to the suite information; and send the status information of the network device to be connected and the connection information of the network device to be connected to the client; The client is further configured to establish a P2P connection or a Relay connection with the network device to be connected according to the state information of the network device to be connected and the connection information of the network device to be connected.
8. The system according to claim 5, characterized in that The network device to be connected is also used to detect hardware information of multiple hardware during the software initialization process.
9. A device for processing kit information, characterized in that: include: A receiving module, configured to receive a connection request sent by a network device to be connected, wherein the connection request includes hardware information of multiple hardware on the network device to be connected; a sending module, configured to send the suite information corresponding to the hardware information of the historical network device to the network device to be connected, if the difference between the hardware information of the network device to be connected and the hardware information of the historical network device does not reach a preset difference condition, so that the network device to be connected can generate device identification information according to the suite information and the hardware information of the multiple hardware; The device also includes: A judgment module, used to judge whether the difference between the hardware information of the network device to be connected and the hardware information of the historical network device reaches a preset difference condition; an allocation module, configured to allocate kit information to the network device to be connected if the determination module determines that the difference between the hardware information of the network device to be connected and the hardware information of the historical network device reaches a preset difference condition; The sending module is further used to send the allocated suite information to the network device to be connected, so that the network device to be connected generates device identification information according to the suite information and the hardware information of the multiple hardware; The judgment module includes a query submodule and a judgment submodule; The query submodule is used to query the hardware information of the network device to be connected that has changed based on the stored hardware information of the historical network device and multiple hardware information of the network device to be connected; the judgment submodule is used to judge that the network device to be connected has not changed based on the changed hardware information; The judgment submodule is used to count the number of changes in different types of hardware of the network device to be connected according to the changed hardware information, wherein the number of changes in different types of hardware includes the number of changed hardware information of different types of hardware; and determine that the network device to be connected has not changed according to the number of changes in multiple types of hardware; The judgment submodule is used to perform weighted summation calculation on the number of changes in multiple types of hardware according to the set hardware type weights to generate a hardware sum; if it is judged that the hardware sum is less than the weighted threshold value, it is determined that the network device to be connected has not changed.
10. A server comprising a memory and a processor, wherein the memory is used to store information including program instructions, and the processor is used to control the execution of the program instructions, characterized in that: When the program instructions are loaded and executed by the processor, the steps of the method for processing kit information described in any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Terminal identifier processing method, server and terminal
CN108540582A
