Methods and apparatus for locating computer equipment, storage media, computer equipment
By recording the location information of the gateway device, the problem of inaccurate positioning of computer devices is solved, and accurate positioning is achieved in different network environments, thereby improving the security and reliability of the device.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 成都安易迅科技有限公司
- Filing Date
- 2023-07-11
- Publication Date
- 2026-06-30
Smart Images

Figure CN117097700B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer positioning technology, and in particular to a positioning method and apparatus for a computer device, a storage medium, and a computer device. Background Technology
[0002] The principle behind computers locating themselves via IP addresses is based on the Internet Protocol (IP) address. Every device connected to the internet has a unique IP address, consisting of 32 bits of binary digits, typically represented in dotted decimal notation (e.g., 192.168.0.1). IP addresses are assigned to each device by its Internet Service Provider (ISP). When using the internet, the device sends a request to its ISP, which forwards the request to the appropriate server, which then returns a response to the device. In this process, the IP address is transmitted at every step, allowing the server to determine the device's location.
[0003] However, it's important to note that IP addresses are not a precise method of location tracking, as they can only determine the city or region where a device is located, not its exact location. Furthermore, if tools like Virtual Private Networks (VPNs) are used, IP addresses can no longer be used to pinpoint the device's location. The location associated with an IP address can change, leading to inaccuracies. For example, a computer might be connected to the internet in Jiangsu province, but the IP address might sometimes be registered in Jiangsu and sometimes in Anhui province. This is because internet data requests services through gateways during transmission. If the device is closer to a gateway in Anhui, it will request services through that gateway, resulting in the IP address being registered in Anhui.
[0004] The inventors realized that there was a problem of inaccurate positioning in the current field of computer equipment positioning technology. Summary of the Invention
[0005] In view of this, this application provides a method and apparatus for locating computer devices, a storage medium, and a computer device, which transforms the original method of determining the location information of a computer device based on its IP address into recording the location information of a gateway device, thereby determining the location information of the computer device based on the gateway device to which the computer device is connected, which helps to improve the location accuracy of the computer device.
[0006] According to one aspect of this application, a method for locating a computer device is provided, the method comprising:
[0007] The computer device runs a location program to obtain the network address of the gateway device currently connected to the computer device, and sends the network address to the server.
[0008] The server queries the location information corresponding to the network address in the gateway device location information, and determines the current location information of the computer device based on the location information corresponding to the network address. The gateway device location information is used to associate and store the network address and location information of the gateway device.
[0009] Optionally, after determining the current location information of the computer device based on the location information corresponding to the network address, the method further includes:
[0010] The server sends the current location information to the computer device;
[0011] The computer device displays the current location information and, in response to a location information correction instruction, generates a first image identification code, the first image identification code carrying the network address;
[0012] The mobile device scans the first image identification code to display the location information correction interface pointed to by the first image identification code. If authorized to obtain location information, the mobile device's location information is obtained and displayed in the location information correction interface. In response to the location information submission command, the mobile device sends location correction information containing the mobile device's location information and the network address to the server.
[0013] The server receives the location correction information, corrects the location information corresponding to the network address in the gateway device location information based on the mobile device location information, and corrects the corrected location information to the current location information of the computer device.
[0014] Optionally, the server corrects the location information corresponding to the network address in the gateway device location information based on the mobile device location information, including:
[0015] Based on the location information of the mobile device and the location information of the network address, calculate the distance deviation between the mobile device and the gateway device;
[0016] If the distance deviation between the mobile device and the gateway device is less than a preset distance, the location information of the mobile device is used as the new location information corresponding to the network address, and the location information of the gateway device is corrected.
[0017] Optionally, the method further includes:
[0018] When the server does not find the network address in the gateway device location information, it sends a gateway device add instruction to the computer device.
[0019] In response to the add command from the gateway device, the computer device generates a second image identification code, which carries the network address.
[0020] The mobile device scans the second image identification code to display the gateway device addition interface pointed to by the second image identification code. If authorized to obtain location information, the mobile device location information is obtained and displayed in the gateway device addition interface. In response to the gateway device addition instruction, the mobile device sends gateway device addition information containing the mobile device location information and the network address to the server.
[0021] The server receives the gateway device addition information, uses the mobile device location information as the location information corresponding to the network address, stores it in the gateway device location information, and uses the location information corresponding to the network address as the current location information of the computer device.
[0022] Optionally, after the server receives the gateway device addition information, the method further includes:
[0023] The server determines whether the gateway device is within a preset geographical range based on the location information of the mobile device.
[0024] If the gateway device is within a preset geographical range, the server performs the step of using the location information of the mobile device as the location information corresponding to the network address and associating it with the location information of the gateway device.
[0025] If the gateway device is not within the preset geographical range, the server sends a usage error message to the computer device; the computer device displays the usage error message and restricts its use.
[0026] Optionally, after the computer device runs the positioning program, the method further includes:
[0027] The computer device sends a computer device identifier to the server and imposes usage restrictions on the computer device;
[0028] The server verifies whether the computer device is an unbound device based on the computer device identifier, and sends a binding verification command to the computer device when it determines that the computer device is a bound device.
[0029] In response to the binding verification command, the computer device generates a third image identification code, which carries the computer device identifier.
[0030] The mobile terminal scans the third image identification code to display the binding verification interface pointed to by the third image identification code. Based on the current logged-in user information corresponding to the binding verification interface, it obtains the list of bound computer devices of the current logged-in user. When verifying that the computer device belongs to the current logged-in user's bound computer device, it sends a binding verification success signal to the server.
[0031] In response to the successful binding verification signal, the server sends a successful binding verification message to the computer device;
[0032] Upon receiving the successful binding verification information, the computer device removes the usage restrictions.
[0033] Optionally, the method further includes:
[0034] When the server determines that the computer device is an unbound device, it sends a device binding instruction to the computer device.
[0035] In response to the device binding command, the computer device generates a fourth image identification code, which carries the computer device identifier.
[0036] The mobile terminal scans the fourth image identification code to display the device binding interface pointed to by the fourth image identification code. The device binding interface includes a computer device identifier and login user information. In response to the device binding instruction, the mobile terminal sends device binding information containing the computer device identifier and the login user information to the server.
[0037] The server binds the computer device identifier and the login user information according to the device binding information, and sends a binding verification command to the computer device.
[0038] Optionally, after the computer device runs the positioning program, the method further includes:
[0039] The computer device sends a computer device identifier to the server and imposes usage restrictions on the computer device;
[0040] The server verifies whether the computer device is within the authorized geographical range corresponding to the computer device based on the computer device identifier and the current location information, and sends a usage error prompt message to the computer device when it is determined that the computer device is outside the authorized geographical range;
[0041] The computer device displays the usage error message and maintains usage restrictions on the computer device.
[0042] Optionally, the method further includes:
[0043] When the server determines that the computer device is within the authorized geographical area, it sends a permission message to the computer device.
[0044] The computer device displays the permission prompt and removes the restriction on its use.
[0045] According to another aspect of this application, a positioning system for a computer device is provided, comprising:
[0046] A computer device is used to run a positioning program, obtain the network address of the gateway device currently connected to the computer device, and send the network address to a server.
[0047] The server is used to query the location information corresponding to the network address in the gateway device location information, and determine the current location information of the computer device based on the location information corresponding to the network address, wherein the gateway device location information is used to associate and store the network address and location information of the gateway device.
[0048] Optionally, the server is configured to send the current location information to the computer device;
[0049] The computer device is configured to display the current location information and, in response to a location information correction instruction, generate a first image identification code, wherein the first image identification code carries the network address;
[0050] The mobile device is configured to display a location information correction interface pointed to by the first image identification code by scanning the first image identification code, and, when authorized to obtain location information, obtain the location information of the mobile device and display it in the location information correction interface, and, in response to the location information submission instruction, send location correction information containing the location information of the mobile device and the network address to the server.
[0051] The server is configured to receive the location correction information, correct the location information corresponding to the network address in the location information of the gateway device based on the location information of the mobile device, and correct the corrected location information to the current location information of the computer device.
[0052] Optionally, the server is configured to calculate the distance deviation between the mobile device and the gateway device based on the location information of the mobile device and the location information of the network address;
[0053] If the distance deviation between the mobile device and the gateway device is less than a preset distance, the location information of the mobile device is used as the new location information corresponding to the network address, and the location information of the gateway device is corrected.
[0054] Optionally, the server is configured to send a gateway device addition instruction to the computer device when the network address is not found in the gateway device location information;
[0055] The computer device is configured to generate a second image identification code in response to an add instruction from the gateway device, the second image identification code carrying the network address;
[0056] The mobile device is used to display the gateway device addition interface pointed to by the second image identification code by scanning the second image identification code. When authorized to obtain location information, the location information of the mobile device is obtained and displayed in the gateway device addition interface. In response to the gateway device addition instruction, the mobile device adds gateway device information containing the location information of the mobile device and the network address to the server.
[0057] The server is configured to receive the gateway device adding information, associate the mobile device location information with the location information corresponding to the network address and store it in the gateway device location information, and use the location information corresponding to the network address as the current location information of the computer device.
[0058] Optionally, the server is configured to determine whether the gateway device is within a preset geographical range based on the location information of the mobile device;
[0059] If the gateway device is within a preset geographical range, the server performs the step of using the location information of the mobile device as the location information corresponding to the network address and associating it with the location information of the gateway device.
[0060] If the gateway device is not within the preset geographical range, the server sends a usage error message to the computer device; the computer device displays the usage error message and restricts its use.
[0061] Optionally, the computer device is configured to send a computer device identifier to the server and impose usage restrictions on the computer device;
[0062] The server is configured to verify whether the computer device is an unbound device based on the computer device identifier, and send a binding verification command to the computer device when it is determined that the computer device is a bound device.
[0063] The computer device is configured to generate a third image identification code in response to the binding verification command, the third image identification code carrying the computer device identifier;
[0064] The mobile terminal is used to display the binding verification interface pointed to by the third image identification code by scanning the third image identification code, obtain the list of bound computer devices of the current logged-in user based on the current logged-in user information corresponding to the binding verification interface, and send a binding verification success signal to the server when verifying that the computer device belongs to the current logged-in user's bound computer device;
[0065] The server is configured to send binding verification success information to the computer device in response to the binding verification success signal;
[0066] The computer device is used to remove the usage restriction upon receiving the binding verification success information.
[0067] Optionally, the server is configured to send a device binding instruction to the computer device when it is determined that the computer device is an unbound device;
[0068] The computer device is configured to generate a fourth image identification code in response to the device binding instruction, the fourth image identification code carrying a computer device identifier;
[0069] A mobile terminal is configured to display a device binding interface pointed to by the fourth image identification code by scanning the fourth image identification code. The device binding interface includes a computer device identifier and login user information. In response to a device binding instruction, the mobile terminal sends device binding information containing the computer device identifier and the login user information to the server.
[0070] The server is configured to bind the computer device identifier and the login user information according to the device binding information, and send a binding verification command to the computer device.
[0071] Optionally, the computer device is configured to send a computer device identifier to the server and impose usage restrictions on the computer device;
[0072] The server is configured to verify whether the computer device is within the authorized geographical range corresponding to the computer device based on the computer device identifier and the current location information, and send an abnormal usage prompt message to the computer device when it is determined that the computer device is outside the authorized geographical range;
[0073] The computer device is used to display the usage error message and maintain usage restrictions on the computer device.
[0074] Optionally, the server is configured to send a permission prompt message to the computer device when it is determined that the computer device is within the authorized geographical range;
[0075] The computer device is used to display the permission prompt and remove the restrictions on the use of the computer device.
[0076] According to another aspect of this application, a storage medium is provided that stores a computer program thereon, which, when executed by a processor, implements the above-described method for locating the computer device.
[0077] According to another aspect of this application, a computer device is provided, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor executes the program to implement the positioning method of the computer device described above.
[0078] By utilizing the above technical solutions, the computer device positioning method and apparatus, storage medium, and computer device provided in this application transform the original method of determining the positioning information of the computer device based on the computer device's IP address into recording the positioning information of the gateway device. This allows the positioning information of the computer device to be determined based on the gateway device to which the computer device is connected, thereby helping to improve the positioning accuracy of the computer device.
[0079] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description
[0080] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0081] Figure 1 A flowchart illustrating a method for locating a computer device according to an embodiment of this application is shown.
[0082] Figure 2 A flowchart illustrating another method for locating a computer device provided in an embodiment of this application is shown.
[0083] Figure 3 This illustration shows a structural schematic diagram of a positioning system for a computer device according to an embodiment of this application;
[0084] Figure 4 A schematic diagram of the device structure of a computer device provided in an embodiment of this application is shown. Detailed Implementation
[0085] The present application will be described in detail below with reference to the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in the embodiments of the present application can be combined with each other.
[0086] This embodiment provides a method for locating a computer device, such as... Figure 1 As shown, the method includes:
[0087] Step 101: The computer device runs a location program to obtain the network address of the gateway device currently connected to the computer device, and sends the network address to the server.
[0088] Step 102: The server queries the location information corresponding to the network address in the gateway device location information, and determines the current location information of the computer device based on the location information corresponding to the network address. The gateway device location information is used to associate and store the network address and location information of the gateway device.
[0089] In the above embodiments, the original method of determining the location information of a computer device based on its IP address is replaced by recording the location information of the gateway device. This allows the computer device's location to be determined based on the gateway device it connects to. Because the probability of a gateway device moving is much lower than that of a computer or laptop, accurately recording the geographical location of a gateway device allows all other devices connected to the internet through it to determine their location.
[0090] Computer devices include laptops, desktop computers, etc. When a computer device with a location tracking program installed starts up, the program runs and obtains the MAC network address of the gateway device currently connected to the computer device. This MAC address is then sent to the server corresponding to the location tracking program. The server identifies the gateway device to which the computer device is connected based on the MAC address and determines the current location information of the computer device based on the pre-recorded location information of that gateway device.
[0091] By applying the technical solution of this embodiment, the original method of determining the location information of a computer device based on its IP address is transformed into recording the location information of the gateway device. This allows the location information of the computer device to be determined based on the gateway device to which it is connected, thus helping to improve the accuracy of the computer device's location.
[0092] Optionally, in this embodiment of the application, step 102 may be followed by:
[0093] Step 103: The server sends the current location information to the computer device.
[0094] Step 104: The computer device displays the current location information and, in response to the location information correction instruction, generates a first image identification code, the first image identification code carrying the network address.
[0095] Step 105: The mobile device scans the first image identification code to display the location information correction interface pointed to by the first image identification code. If authorized to obtain location information, the mobile device's location information is obtained and displayed in the location information correction interface. In response to the location information submission command, the mobile device sends location correction information containing the mobile device's location information and the network address to the server.
[0096] Step 106: The server receives the location correction information, corrects the location information corresponding to the network address in the gateway device location information based on the mobile device location information, and corrects the corrected location information to the current location information of the computer device.
[0097] In the above embodiments, to ensure positioning accuracy, the server can determine the current location information of the computer device and send it to the computer device for user confirmation. After receiving the current location information determined by the server, the computer device displays it. If the user believes the current location information determined by the server is inaccurate, they can select a positioning correction function in the positioning program to generate a positioning information correction instruction. The positioning program generates a first image identification code (specifically, a QR code, etc.). After scanning the QR code with a mobile device with positioning capabilities, the user enters the positioning information correction interface. On this interface, the user can authorize the location information acquisition function. After authorization, the mobile device automatically acquires its location information and fills it in on the interface. After confirmation, the user can submit the mobile device's location information to the server, and can also submit the network address of the gateway device currently connected to the computer device. After receiving the network address and mobile device positioning information, the server corrects the gateway device's positioning information stored locally on the server to correct the positioning information of the currently connected gateway device, ensuring that the gateway device's positioning information is more accurate so that the computer device can be accurately located the next time it connects to the gateway device. Furthermore, the user-corrected positioning information is determined as the computer device's current positioning information.
[0098] Optionally, in this embodiment, the server corrects the location information corresponding to the network address in the gateway device location information based on the mobile device location information, including: calculating the distance deviation between the mobile device and the gateway device based on the mobile device location information and the network address location information; if the distance deviation between the mobile device and the gateway device is less than a preset distance, then the mobile device location information is used as the new location information corresponding to the network address to correct the gateway device location information.
[0099] In the above embodiments, when correcting the location information of mobile devices within the server, the distance deviation between the mobile device and the gateway device is first calculated based on the mobile device's location information and the originally stored gateway device's location information. If the distance deviation is less than a preset distance (e.g., less than 500 meters), it may indicate that the gateway device has been slightly moved or that the user is using the computer at a distance slightly from the gateway device. This distance deviation is considered to be within a reasonable range, and the gateway device's location information can be corrected to match the mobile device's location information. However, if the distance deviation exceeds the preset distance, it may indicate that the gateway device has been improperly moved or stolen. In this case, a notification message can be sent to the administrator so that the administrator can promptly investigate the problem.
[0100] In this embodiment of the application, optionally, after the server queries the location information corresponding to the network address in the gateway device location information in step 102, the method further includes:
[0101] Step 201: When the server does not find the network address in the gateway device location information, it sends a gateway device add instruction to the computer device.
[0102] Step 202: In response to the add instruction from the gateway device, the computer device generates a second image identification code, which carries the network address.
[0103] Step 203: The mobile device scans the second image identification code to display the gateway device addition interface pointed to by the second image identification code. If authorized to obtain location information, the mobile device location information is obtained and displayed in the gateway device addition interface. In response to the gateway device addition instruction, the mobile device sends gateway device addition information containing the mobile device location information and the network address to the server.
[0104] Step 204: The server receives the gateway device addition information, associates the mobile device location information with the location information corresponding to the network address in the gateway device location information, and uses the location information corresponding to the network address as the current location information of the computer device.
[0105] In the above embodiments, if the gateway device location information in the server does not contain the network address sent by the computer device, it indicates that the gateway device currently connected to the computer device has not been recorded. In this case, a gateway device addition command can be sent to the computer device to request the user's assistance in recording the currently connected gateway device. The computer device generates a second image identification code. The user scans the second image identification code with their mobile device to enter the gateway device addition interface. After authorizing the location information acquisition function of the mobile device, the mobile device acquires the location information and displays it on the interface. After the user confirms that the mobile device's location information is correct, they submit the mobile device's location information and the gateway device's network address to the server. The server treats the gateway device corresponding to the network address as a new gateway device, uses the mobile device's location information as the gateway device's location information, and stores the gateway device's network address and its location information in the gateway device location information. In addition, this location information serves as the computer device's current location information.
[0106] In this embodiment of the application, optionally, after the server receives the gateway device addition information in step 204, the method further includes: the server determining whether the gateway device is within a preset geographical range based on the mobile device location information; if the gateway device is within the preset geographical range, the server performs the step of associating the mobile device location information as the location information corresponding to the network address with the location information stored in the gateway device location information; if the gateway device is not within the preset geographical range, the server sends a usage error message to the computer device; the computer device displays the usage error message and restricts the use of the computer device.
[0107] In the above embodiments, when the server adds a gateway device, it can also verify whether the gateway device to be added is within a certain preset geographical range. If it is within the range, the network address and location information of the gateway device are added directly. If it is not within the range, a usage error message is sent to the computer device. In addition, if the location of the computer device cannot be located because the gateway device currently connected to the computer device cannot be recorded, in order to ensure the security of the computer device, the user's use of the computer device can be restricted by executing the usage restriction function of the location program installed in the computer device.
[0108] Optionally, after the computer device runs the location program, the method further includes: the computer device sending a computer device identifier to the server and imposing usage restrictions on the computer device; the server verifying whether the computer device is an unbound device based on the computer device identifier, and sending a binding verification instruction to the computer device when it determines that the computer device is a bound device; the computer device generating a third image identifier code in response to the binding verification instruction, the third image identifier code carrying the computer device identifier; the mobile terminal scanning the third image identifier code to display the binding verification interface pointed to by the third image identifier code, obtaining the list of bound computer devices of the currently logged-in user based on the currently logged-in user information corresponding to the binding verification interface, and sending a binding verification success signal to the server when verifying that the computer device belongs to the currently logged-in user's bound computer device; the server sending binding verification success information to the computer device in response to the binding verification success signal; and the computer device removing the usage restrictions upon receiving the binding verification success information.
[0109] In the above embodiments, to enhance the security of computer equipment, further verification of the computer equipment can be performed. In specific application scenarios, a location program can be installed on enterprise computer equipment. This location program runs automatically when the computer equipment starts up. After running, the location program restricts the use of the computer equipment (specifically, it can set restricted functions or restricted programs, or restrict all programs except the location program), obtains the computer equipment identifier (each device identifier is unique), and sends the computer equipment identifier to the server. The server determines whether the computer equipment is a bound device based on the computer equipment identifier, and if it confirms that the computer equipment is bound, it returns a binding verification command to the computer equipment. The location program in the computer equipment responds to this binding verification command, generates a third image identification code, and automatically displays the identification code in a pop-up window. The user scans the third image identification code with their mobile device to enter the binding verification interface. After logging in on the binding verification interface by entering login information, the mobile device obtains the list of bound computer equipment for the logged-in user and displays it on the interface. If the currently used computer device is among the devices in this list, it means that the device has already been bound to the currently logged-in user, who has permission to use it. In this case, the mobile device sends a binding verification success signal to the server. Upon receiving this signal, the server sends a binding verification success message to the computer device. The location program on the computer device receives this message and determines that the device is being used in a secure environment, allowing the restrictions on its use to be lifted.
[0110] Optionally, in this embodiment, the method further includes: when the server determines that the computer device is an unbound device, it sends a device binding instruction to the computer device; in response to the device binding instruction, the computer device generates a fourth image identification code, the fourth image identification code carrying a computer device identifier; the mobile terminal scans the fourth image identification code to display a device binding interface pointed to by the fourth image identification code, the device binding interface including a computer device identifier and login user information, and in response to the device binding instruction, sends device binding information containing the computer device identifier and the login user information to the server; the server binds the computer device identifier and the login user information according to the device binding information, and sends a binding verification instruction to the computer device.
[0111] In the above embodiment, if the server determines that the currently used computer device is an unbound device that has not been pre-bound, it sends a device binding command to the computer device. The location program in the computer device responds to this binding command, generates a fourth image identification code, and displays it in a pop-up window. The user scans the fourth image identification code with their mobile device to enter the device binding interface. The user logs in on the device binding interface (if already logged in, no further login is required). The mobile device displays the logged-in user information and the computer device identifier on the interface for user confirmation. After confirmation, the user enters the device binding command, and the mobile device sends the logged-in user information and the computer device identifier to the server, enabling the server to bind the computer device as the user's bound device. After binding the device to the user, the server sends a binding verification command to the computer device to enter the binding verification process described above. By binding the computer device to the user, the restrictions on the use of the computer device can only be lifted after the binding verification is successful, which helps improve the security of computer device use and prevents the user's device from being stolen.
[0112] Furthermore, as a refinement and extension of the specific implementation of the above embodiments, and to fully illustrate the specific implementation process of this embodiment, another method for locating a computer device is provided, such as... Figure 2 As shown, the method includes:
[0113] Step 301: The computer device runs a location program, sends the computer device identifier to the server, and restricts the use of the computer device; obtains the network address of the gateway device currently connected to the computer device, and sends the network address to the server.
[0114] Step 302: The server queries the location information corresponding to the network address in the gateway device location information, and determines the current location information of the computer device based on the location information corresponding to the network address. The gateway device location information is used to associate and store the network address and location information of the gateway device.
[0115] Step 303: The server verifies whether the computer device is within the authorized geographical range corresponding to the computer device based on the computer device identifier and the current location information, and sends a usage error message to the computer device when it is determined that the computer device is outside the authorized geographical range; the computer device displays the usage error message and maintains the usage restrictions on the computer device.
[0116] Step 304: When the server determines that the computer device is within the authorized geographical range, it sends a permission prompt message to the computer device; the computer device displays the permission prompt message and removes the restriction on the use of the computer device.
[0117] In this embodiment, the geographical range of use for different computer devices can also be restricted. For example, some computer devices can only be used in the office area and cannot be used outside the office area. After the computer device starts and automatically runs the location program, the location program restricts the use of the computer device and sends the computer device identifier and the network address of the currently connected gateway device to the server. The server determines the current location information of the computer device based on the network address and further obtains the authorized geographical range corresponding to the computer device identifier. If the current location of the computer device is within the authorized geographical range, a permission prompt message is sent to the computer device to inform the user that they are currently in an authorized usage environment. At the same time, the location program removes the usage restriction on the computer device based on the permission prompt message. If the computer device is outside the authorized geographical range, an abnormal usage prompt message is sent to the computer device, and the usage restriction on the computer device remains. This ensures that the computer device can only be used in a secure environment, improves the security of computer device use, and protects the data security within the computer device. In addition, if the computer device is repeatedly or for an extended period of time outside the authorized geographical range, an alarm message can also be sent to the administrator.
[0118] It should be noted that the above verification of whether the computer device is within the authorized geographical range and the authentication of the binding relationship between the computer device and the user can be performed simultaneously. If it is ensured that the computer device belongs to the user's bound device and the computer device is within the authorized geographical range, the restriction on the use of the computer device will be lifted; otherwise, the restriction on the use of the computer device will remain.
[0119] Furthermore, as Figure 1 In terms of specific implementation of the method, embodiments of this application provide a positioning system for a computer device, such as... Figure 3 As shown, the system includes:
[0120] A computer device is used to run a positioning program, obtain the network address of the gateway device currently connected to the computer device, and send the network address to a server.
[0121] The server is used to query the location information corresponding to the network address in the gateway device location information, and determine the current location information of the computer device based on the location information corresponding to the network address, wherein the gateway device location information is used to associate and store the network address and location information of the gateway device.
[0122] Optionally, the server is configured to send the current location information to the computer device;
[0123] The computer device is configured to display the current location information and, in response to a location information correction instruction, generate a first image identification code, wherein the first image identification code carries the network address;
[0124] The mobile device is configured to display a location information correction interface pointed to by the first image identification code by scanning the first image identification code, and, when authorized to obtain location information, obtain the location information of the mobile device and display it in the location information correction interface, and, in response to the location information submission instruction, send location correction information containing the location information of the mobile device and the network address to the server.
[0125] The server is configured to receive the location correction information, correct the location information corresponding to the network address in the location information of the gateway device based on the location information of the mobile device, and correct the corrected location information to the current location information of the computer device.
[0126] Optionally, the server is configured to calculate the distance deviation between the mobile device and the gateway device based on the location information of the mobile device and the location information of the network address;
[0127] If the distance deviation between the mobile device and the gateway device is less than a preset distance, the location information of the mobile device is used as the new location information corresponding to the network address, and the location information of the gateway device is corrected.
[0128] Optionally, the server is configured to send a gateway device addition instruction to the computer device when the network address is not found in the gateway device location information;
[0129] The computer device is configured to generate a second image identification code in response to an add instruction from the gateway device, the second image identification code carrying the network address;
[0130] The mobile device is used to display the gateway device addition interface pointed to by the second image identification code by scanning the second image identification code. When authorized to obtain location information, the location information of the mobile device is obtained and displayed in the gateway device addition interface. In response to the gateway device addition instruction, the mobile device adds gateway device information containing the location information of the mobile device and the network address to the server.
[0131] The server is configured to receive the gateway device adding information, associate the mobile device location information with the location information corresponding to the network address and store it in the gateway device location information, and use the location information corresponding to the network address as the current location information of the computer device.
[0132] Optionally, the server is configured to determine whether the gateway device is within a preset geographical range based on the location information of the mobile device;
[0133] If the gateway device is within a preset geographical range, the server performs the step of using the location information of the mobile device as the location information corresponding to the network address and associating it with the location information of the gateway device.
[0134] If the gateway device is not within the preset geographical range, the server sends a usage error message to the computer device; the computer device displays the usage error message and restricts its use.
[0135] Optionally, the computer device is configured to send a computer device identifier to the server and impose usage restrictions on the computer device;
[0136] The server is configured to verify whether the computer device is an unbound device based on the computer device identifier, and send a binding verification command to the computer device when it is determined that the computer device is a bound device.
[0137] The computer device is configured to generate a third image identification code in response to the binding verification command, the third image identification code carrying the computer device identifier;
[0138] The mobile terminal is used to display the binding verification interface pointed to by the third image identification code by scanning the third image identification code, obtain the list of bound computer devices of the current logged-in user based on the current logged-in user information corresponding to the binding verification interface, and send a binding verification success signal to the server when verifying that the computer device belongs to the current logged-in user's bound computer device;
[0139] The server is configured to send binding verification success information to the computer device in response to the binding verification success signal;
[0140] The computer device is used to remove the usage restriction upon receiving the binding verification success information.
[0141] Optionally, the server is configured to send a device binding instruction to the computer device when it is determined that the computer device is an unbound device;
[0142] The computer device is configured to generate a fourth image identification code in response to the device binding instruction, the fourth image identification code carrying a computer device identifier;
[0143] A mobile terminal is configured to display a device binding interface pointed to by the fourth image identification code by scanning the fourth image identification code. The device binding interface includes a computer device identifier and login user information. In response to a device binding instruction, the mobile terminal sends device binding information containing the computer device identifier and the login user information to the server.
[0144] The server is configured to bind the computer device identifier and the login user information according to the device binding information, and send a binding verification command to the computer device.
[0145] Optionally, the computer device is configured to send a computer device identifier to the server and impose usage restrictions on the computer device;
[0146] The server is configured to verify whether the computer device is within the authorized geographical range corresponding to the computer device based on the computer device identifier and the current location information, and send an abnormal usage prompt message to the computer device when it is determined that the computer device is outside the authorized geographical range;
[0147] The computer device is used to display the usage error message and maintain usage restrictions on the computer device.
[0148] Optionally, the server is configured to send a permission prompt message to the computer device when it is determined that the computer device is within the authorized geographical range;
[0149] The computer device is used to display the permission prompt and remove the restrictions on the use of the computer device.
[0150] This application also provides a computer device, which may specifically be a personal computer, a server, a network device, etc. Figure 4 As shown, the computer device includes a bus, a processor, memory, and a communication interface, and may also include an input / output interface and a display device. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database stores location information. The network interface allows communication with external terminals via a network connection. When the computer program is executed by the processor, it implements the steps in the various method embodiments.
[0151] Those skilled in the art will understand that Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0152] In one embodiment, a computer-readable storage medium is provided, which may be non-volatile or volatile, having stored thereon a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0153] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0154] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0155] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0156] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0157] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for locating a computer device, characterized in that, The method includes: The computer device runs a location program to obtain the network address of the gateway device currently connected to the computer device, and sends the network address to the server. The server queries the location information corresponding to the network address in the gateway device location information, and determines the current location information of the computer device based on the location information corresponding to the network address. The gateway device location information is used to associate and store the network address and location information of the gateway device. The server sends the current location information to the computer device; The computer device displays the current location information and, in response to a location information correction instruction, generates a first image identification code, the first image identification code carrying the network address; The mobile device scans the first image identification code to display the location information correction interface pointed to by the first image identification code. If authorized to obtain location information, the mobile device's location information is obtained and displayed in the location information correction interface. In response to the location information submission command, the mobile device sends location correction information containing the mobile device's location information and the network address to the server. The server receives the location correction information, corrects the location information corresponding to the network address in the gateway device location information based on the mobile device location information, and corrects the corrected location information to the current location information of the computer device.
2. The method according to claim 1, characterized in that, Based on the location information of the mobile device, the server corrects the location information corresponding to the network address in the location information of the gateway device, including: Based on the location information of the mobile device and the location information of the network address, calculate the distance deviation between the mobile device and the gateway device; If the distance deviation between the mobile device and the gateway device is less than a preset distance, the location information of the mobile device is used as the new location information corresponding to the network address, and the location information of the gateway device is corrected.
3. The method according to claim 1, characterized in that, The method further includes: When the server does not find the network address in the gateway device location information, it sends a gateway device add instruction to the computer device. In response to the add command from the gateway device, the computer device generates a second image identification code, which carries the network address. The mobile device scans the second image identification code to display the gateway device addition interface pointed to by the second image identification code. If authorized to obtain location information, the mobile device location information is obtained and displayed in the gateway device addition interface. In response to the gateway device addition instruction, the mobile device sends gateway device addition information containing the mobile device location information and the network address to the server. The server receives the gateway device addition information, uses the mobile device location information as the location information corresponding to the network address, stores it in the gateway device location information, and uses the location information corresponding to the network address as the current location information of the computer device.
4. The method according to claim 3, characterized in that, After the server receives the gateway device add information, the method further includes: The server determines whether the gateway device is within a preset geographical range based on the location information of the mobile device. If the gateway device is within a preset geographical range, the server performs the step of using the location information of the mobile device as the location information corresponding to the network address and associating it with the location information of the gateway device. If the gateway device is not within the preset geographical range, the server sends a usage error message to the computer device; the computer device displays the usage error message and restricts its use.
5. The method according to claim 1, characterized in that, After the computer device runs the positioning program, the method further includes: The computer device sends a computer device identifier to the server and imposes usage restrictions on the computer device; The server verifies whether the computer device is an unbound device based on the computer device identifier, and sends a binding verification command to the computer device when it determines that the computer device is a bound device. In response to the binding verification command, the computer device generates a third image identification code, which carries the computer device identifier. The mobile terminal scans the third image identification code to display the binding verification interface pointed to by the third image identification code. Based on the current logged-in user information corresponding to the binding verification interface, it obtains the list of bound computer devices of the current logged-in user. When verifying that the computer device belongs to the current logged-in user's bound computer device, it sends a binding verification success signal to the server. In response to the successful binding verification signal, the server sends a successful binding verification message to the computer device; Upon receiving the successful binding verification information, the computer device removes the usage restrictions.
6. The method according to claim 5, characterized in that, The method further includes: When the server determines that the computer device is an unbound device, it sends a device binding instruction to the computer device. In response to the device binding command, the computer device generates a fourth image identification code, which carries the computer device identifier. The mobile terminal scans the fourth image identification code to display the device binding interface pointed to by the fourth image identification code. The device binding interface includes a computer device identifier and login user information. In response to the device binding instruction, the mobile terminal sends device binding information containing the computer device identifier and the login user information to the server. The server binds the computer device identifier and the login user information according to the device binding information, and sends a binding verification command to the computer device.
7. The method according to any one of claims 1 to 6, characterized in that, After the computer device runs the positioning program, the method further includes: The computer device sends a computer device identifier to the server and imposes usage restrictions on the computer device; The server verifies whether the computer device is within the authorized geographical range corresponding to the computer device based on the computer device identifier and the current location information, and sends a usage error prompt message to the computer device when it is determined that the computer device is outside the authorized geographical range; The computer device displays the usage error message and maintains usage restrictions on the computer device.
8. The method according to claim 7, characterized in that, The method further includes: When the server determines that the computer device is within the authorized geographical area, it sends a permission message to the computer device. The computer device displays the permission prompt and removes the restriction on its use.
9. A positioning system for a computer device, characterized in that, include: A computer device is used to run a positioning program, obtain the network address of the gateway device currently connected to the computer device, and send the network address to a server. The server is used to query the location information corresponding to the network address in the gateway device location information, and determine the current location information of the computer device based on the location information corresponding to the network address, wherein the gateway device location information is used to associate and store the network address and location information of the gateway device; The server is used to send the current location information to the computer device; The computer device is configured to display the current location information and, in response to a location information correction instruction, generate a first image identification code, wherein the first image identification code carries the network address; The mobile device is configured to display a location information correction interface pointed to by the first image identification code by scanning the first image identification code, and, when authorized to obtain location information, obtain the location information of the mobile device and display it in the location information correction interface, and, in response to the location information submission instruction, send location correction information containing the location information of the mobile device and the network address to the server. The server is configured to receive the location correction information, correct the location information corresponding to the network address in the location information of the gateway device based on the location information of the mobile device, and correct the corrected location information to the current location information of the computer device.