WO2022048069A1 - 设备跨区域访问方法、装置、电子设备和存储介质 - Google Patents

设备跨区域访问方法、装置、电子设备和存储介质 Download PDF

Info

Publication number
WO2022048069A1
WO2022048069A1 PCT/CN2020/138734 CN2020138734W WO2022048069A1 WO 2022048069 A1 WO2022048069 A1 WO 2022048069A1 CN 2020138734 W CN2020138734 W CN 2020138734W WO 2022048069 A1 WO2022048069 A1 WO 2022048069A1
Authority
WO
WIPO (PCT)
Prior art keywords
cross
target device
target
region
proxy server
Prior art date
Application number
PCT/CN2020/138734
Other languages
English (en)
French (fr)
Inventor
黄诚
Original Assignee
浙江宇视科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 浙江宇视科技有限公司 filed Critical 浙江宇视科技有限公司
Priority to EP20952310.9A priority Critical patent/EP4210275A4/en
Priority to US18/024,714 priority patent/US11838381B2/en
Publication of WO2022048069A1 publication Critical patent/WO2022048069A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/02Network architectures or network communication protocols for network security for separating internal from external traffic, e.g. firewalls
    • H04L63/0281Proxies
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/562Brokering proxy services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/12Discovery or management of network topologies
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • H04L63/107Network architectures or network communication protocols for network security for controlling access to devices or network resources wherein the security policies are location-dependent, e.g. entities privileges depend on current location or allowing specific operations only from locally connected terminals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions

Definitions

  • the embodiments of the present application relate to the technical field of the Internet of Things, for example, to a method, apparatus, electronic device, and storage medium for accessing devices across regions.
  • the solution is to modify the label information set on the device and bound to the access cloud server to achieve the purpose of modifying the address parameters of the specified server. For example, modify the device label of country B to country A, so that the client and device can access A. National cloud server.
  • this method needs to modify the device label for each test, there is a certain workload of manual intervention, resulting in low access efficiency; and because the device label is modified, the customer will think that it is testing with a different device, and the test results recognition is low.
  • Embodiments of the present application provide a method, apparatus, electronic device, and storage medium for cross-area access of a device, so as to improve the efficiency of cross-area access of a device.
  • the embodiment of the present application provides a device cross-region access method, which is executed by a target server, including:
  • the cross-area proxy server is preset in a proxy area different from the target area where the target server is located, and the cross-area proxy server is preset in a proxy area different from the target area where the target server is located, and the cross-area proxy server Distributed deployment of the regional proxy server and the target server;
  • the information of the cross-region proxy server is sent to the target device, so that the target device establishes a connection with the cross-region proxy server.
  • the embodiment of the present application provides a device cross-area access method, which is executed by a cross-area proxy server, including:
  • the cross-region proxy server is preset in a proxy region different from the target region where the target server is located, and the cross-region proxy server and the target Server distributed deployment;
  • the access request is the target device according to the target server
  • the information sent to the cross-region proxy server is determined.
  • the embodiment of the present application provides a device cross-area access method, which is executed by a target device, including:
  • the cross-region proxy server is preset in a proxy region different from the target region where the target server is located, and the cross-region proxy server and the target server are deployed in a distributed manner;
  • the embodiment of the present application also provides a device cross-region access device, which is executed by the target server, including:
  • an access request receiving module configured to receive a cross-regional access request of the target device, and determine the IP address information in the cross-regional access request
  • a proxy server determination module configured to determine information of a cross-region proxy server matching the target device according to the IP address information; wherein, the cross-region proxy server is preset in a different target region from the target server where the target server is located. a proxy area, and the cross-area proxy server and the target server are deployed in a distributed manner;
  • the proxy server sending module is configured to send the information of the cross-region proxy server to the target device, so that the target device establishes a connection with the cross-region proxy server.
  • the embodiment of the present application also provides a device cross-area access device, which is executed by a cross-area proxy server, including:
  • the device identification receiving module is configured to receive the identification information of the target device to be accessed sent by the target server; wherein, the cross-region proxy server is preset in a proxy region different from the target region where the target server is located, and the cross-region proxy server Distributed deployment of the regional proxy server and the target server;
  • An access connection module configured to respond to the access request sent by the target device according to the information of the target device identification, so as to establish a connection between the target device and the cross-region proxy server; wherein, the access request is the target device
  • the device determines according to the information of the cross-region proxy server sent by the target server.
  • the embodiment of the present application also provides a device cross-area access device, which is executed by the target device, including:
  • the target server sending module is configured to send the cross-regional access request to the matching target server, and receive the information of the cross-regional proxy server returned by the target server; wherein, the information of the cross-regional proxy server is the target server according to the Determined by the IP address information in the cross-area access request, the cross-area proxy server is preset in a proxy area different from the target area where the target server is located, and the cross-area proxy server is distributed with the target server. deploy;
  • the proxy server sending module is configured to send an access request to the cross-region proxy server according to the information of the cross-region proxy server, so as to establish a connection with the cross-region proxy server.
  • the embodiment of the present application also provides an electronic device, including:
  • processors one or more processors
  • the one or more processors When the one or more programs are executed by the one or more processors, the one or more processors implement the device cross-region access method according to any embodiment of the present application.
  • Embodiments of the present application further provide a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, implements the device cross-region access method described in any embodiment of the present application.
  • FIG. 1 is a flowchart of a device cross-area access method in Embodiment 1 of the present application
  • FIG. 2 is a flowchart of a device cross-area access method in Embodiment 2 of the present application.
  • FIG. 3 is a flowchart of a device cross-area access method in Embodiment 3 of the present application.
  • FIG. 4 is a schematic structural diagram of a device cross-area access device in Embodiment 4 of the present application.
  • FIG. 5 is a schematic structural diagram of a device cross-region access device in Embodiment 5 of the present application.
  • FIG. 6 is a schematic structural diagram of a device cross-region access device in Embodiment 6 of the present application.
  • FIG. 7 is a sequence diagram of a target device connection in the device cross-region access system in Embodiment 7 of the present application.
  • FIG. 8 is a sequence diagram of client connection in the device cross-region access system in Embodiment 7 of the present application.
  • FIG. 9 is a schematic structural diagram of an electronic device in Embodiment 8 of the present application.
  • FIG. 1 is a flowchart of a device cross-area access method in Embodiment 1 of the present application.
  • This embodiment can be applied to the case of testing equipment in a target area in a proxy area, and is executed by a target server.
  • the target server is set in the target area.
  • the target device is suitable for use in the target area.
  • the method can be performed by a device cross-region access device, which can be implemented in software and/or hardware, and can be configured in an electronic device.
  • the electronic device can be a background server and other devices with communication and computing capabilities. As shown in Figure 1, the method includes:
  • Step 101 Receive a cross-area access request from a target device, and determine Internet Protocol (Internet Protocol, IP) address information in the cross-area access request.
  • Internet Protocol Internet Protocol, IP
  • the target device refers to a functional device that needs to be connected to the server to complete specific functions, such as cameras and mobile phones, and the target device supports use in a specific area.
  • the parameters set by the same camera sold to different countries are different. Therefore, A set of cloud servers will be built in different countries, and the databases in the servers will be independent of each other, so that devices located in a specific area can access the cloud server in that area. Cross-region access requests can be sent as keep-alive messages.
  • these devices that can be accessed in a specific area need to perform short-term access in other areas.
  • customers in some areas will take the initiative to inspect the equipment at the manufacturer's location.
  • the inspected goods are equipment sold to the specific area, and the manufacturer's location is not in the specific area. Therefore, if the equipment in the specific area is directly inspected at the manufacturer's location
  • the test will cause the device in the specific area to connect to the server in the specific area by default. Due to distance, network and other reasons, the access time will be too long or the access will fail.
  • the target device sends a cross-regional access request at the manufacturer's location
  • the target server refers to a server set in the sales region of the target device
  • the target region is the sales region of the target device.
  • the cross-area proxy server refers to a server located near the manufacturer's location.
  • the target device When the target device does not initiate an access request on the target area, and the target area is far from the location where the target device initiates the request, the target device triggers the initiation of a cross-area access request.
  • the distance between the target device and the target area can be determined according to the network transmission situation, which is not limited here. Since the target device is sold to the target region, the cross-region access request is sent to the target server by default.
  • the target server receives the cross-area access request, and obtains IP address information carried in the cross-area access request, where the IP address information represents the location where the target device initiates the cross-area access request.
  • Step 102 determine the information of the cross-regional proxy server matched with the target device according to the IP address information; wherein, the cross-regional proxy server is preset in a proxy region different from the target region where the target server is located, and the cross-regional proxy server is distributed with the target server. deployment.
  • a proxy server is set in advance in areas other than the target area, the proxy server and the target server in the target area form a distributed system, and the database in the proxy server is consistent with the database in the target server, wherein the target server acts as the central server, the proxy server
  • the setting area and number of settings can be set according to the actual situation. Exemplarily, for equipment manufacturers, customers usually choose to go to the manufacturer's location to test the equipment. Therefore, the area where the manufacturer needs to perform equipment testing is set as the proxy area, and the proxy server is set on the proxy area, or in convenient transportation.
  • the proxy server is set in a decentralized area, which is convenient for customers to choose a suitable area for equipment testing.
  • the information of the cross-region proxy server includes address information of the proxy server, so that the target device can determine the proxy server.
  • step 102 includes: determining the home location of the target device according to the IP address information; Regional proxy server.
  • the candidate proxy server refers to a pre-set server node that forms a distributed deployment with the target server. Exemplarily, a mapping relationship between home and candidate proxy servers is established in advance.
  • the proxy server is directly used as the cross-area proxy server; if the proxy area where the target device initiates the cross-area access request is not set with a proxy server node
  • the proxy server node of the target server determines the nearest proxy server in the surrounding area of the proxy area as the proxy server for the cross-area access of the target device.
  • the distance between the target device and the determined cross-region proxy server is guaranteed to be the closest, and the access efficiency of the target device is improved.
  • Step 103 Send the information of the cross-region proxy server to the target device, so that the target device establishes a connection with the cross-region proxy server.
  • the target server After determining the proxy server closest to the home location of the target device, the target server sends the proxy server information to the target device, so that the target device determines the proxy server to be connected to according to the proxy server address in the proxy server information.
  • the target device sends a keep-alive message to the target server, and the target server determines the information of the proxy server corresponding to the home location according to the IP address information in the keep-alive message, and carries the proxy server address information in the keep-alive message for sending. to the target device.
  • a cross-area proxy server is set on the proxy area in advance, and after the target server receives a cross-area access request from the target device, it matches an appropriate cross-area proxy server for the target device, so as to ensure that the target device is connected to a nearby device.
  • the cross-regional proxy server connection avoids that when the target device performs cross-regional access on the proxy area, the access time caused by the connection with the target server is too long and the access efficiency is affected, thereby improving the cross-regional access efficiency of the target device.
  • the cross-region access request further includes identification information of the target device
  • the method further includes: sending the identification information of the target device to the cross-regional proxy server, so that the cross-regional proxy server can make the cross-regional proxy server according to the target device.
  • the identification information of the device establishes a connection with the target device.
  • the identification information of the target device is used to uniquely characterize the identity of the target device.
  • the request will carry the device unique identification code of the target device.
  • the target server After the target server determines the cross-regional proxy server of the target device, it sends the identification information of the target device to the cross-regional proxy server, so that the cross-regional proxy server can establish a connection with the target device according to the identification information of the target device, so as to avoid access failure caused by connection errors , to improve the accuracy of access between the target device and the cross-regional proxy server.
  • the cross-regional access request further includes the cross-regional access duration threshold of the target device and/or the cross-regional access times threshold of the target device; after determining the cross-regional proxy matching the target device according to the IP address information
  • the server information it also includes: sending the cross-regional access duration threshold of the target device and/or the cross-regional access times threshold of the target device to the cross-regional proxy server, so that the cross-regional proxy server can The device's cross-region access threshold controls the cross-region access of the target device.
  • the target device is connected to the target server in the target area to avoid cross-regional access.
  • a cross-region access duration threshold and/or cross-region access number threshold are set for the target device in advance to limit the target device cross-region access. The total duration and the total number of times, so as to achieve the effect of isolation and avoid the phenomenon of serial goods.
  • the cross-region access duration threshold of the target device and/or the cross-region access number threshold of the target device are preset.
  • a limit value is set for the cross-region access of the target device according to the actual scenario, and the size of the limit value is not limited.
  • the target server After determining the cross-regional proxy server of the target device, the target server sends the cross-regional access duration threshold of the target device and/or the cross-regional access number threshold of the target device to the cross-regional proxy server, so that the cross-regional proxy server can communicate with the target device during establishment.
  • the countdown starts, and the connection with the target device is disconnected when the connection duration reaches the duration threshold and/or the number of connections reaches the number threshold, which not only ensures the cross-regional access effect of the target device, but also ensures device isolation.
  • the effect of scheduling is to avoid the phenomenon of equipment serialization.
  • the method further includes: receiving and saving a connection record sent after the cross-region proxy server completes the connection with the target device; after receiving the cross-region access request from the target device, further including: querying the connection record , and control the cross-region access of the target device according to the query result of the connection record.
  • the connection record is sent to the target server after the cross-region proxy server completes the connection with the target device.
  • the cross-region proxy server judges the connection with the target device, and determines that the connection duration reaches the duration threshold and/or the number of connections reaches the number threshold, Then, the historical connection record with the target device is sent to the target server, so that the target server can know that the target device has completed cross-regional access, so as to avoid repeated cross-regional access causing devices to be mixed in the market.
  • the target server After the target server receives the cross-region access request from the target device, it first queries the stored records to determine whether there is a connection record. If there is a connection record, it means that the target device has reached the cross-region access threshold and is no longer allowed to cross-region. access, the target server rejects the cross-regional access of the target device, and keeps the connection between the target device and the target server. If there is no connection record, it means that the target device has not reached the cross-regional access threshold and is still allowed to cross-regional access. The information of the proxy server is sent to the target device to establish the connection between the target device and the cross-regional proxy server.
  • the target server can determine the cross-regional access of the target device, thereby ensuring the precise control of the cross-regional access of the target device and avoiding the phenomenon of cross-regional goods.
  • FIG. 2 is a flowchart of the device cross-area access method in the second embodiment of the present application. This embodiment can be applied to the case where the test is applicable to the target area device in the proxy area.
  • the cross-area proxy server executes the cross-area server.
  • zone the target device suitable for the target zone can establish a connection with the cross-zone proxy server in the proxy zone.
  • the method can be performed by a device cross-region access device, which can be implemented in software and/or hardware, and can be configured in an electronic device.
  • the electronic device can be a background server and other devices with communication and computing capabilities.
  • the method includes:
  • Step 201 Receive the identification information of the target device to be accessed sent by the target server; wherein the cross-region proxy server is preset in a proxy region different from the target region where the target server is located, and the cross-region proxy server and the target server are distributed in a distributed deployment.
  • the cross-area proxy server Since the cross-area proxy server is set in the proxy area, it is close to the home location when the target device initiates the cross-area access request, so the access efficiency of the target device can be guaranteed. At the same time, in order to ensure the accuracy of the connection between the cross-regional proxy server and the target device and avoid the phenomenon of misconnection, the cross-regional proxy server receives the identification information of the target device sent by the target server, and the target device that carries the identification information of the target device only It is the device to be accessed by the cross-region proxy server.
  • Step 202 responding to the access request sent by the target device according to the identification information of the target device to establish a connection between the target device and the cross-region proxy server; wherein, the access request is determined by the target device according to the information of the cross-region proxy server sent by the target server.
  • the cross-region proxy server receives the identification information of the target device sent by the target server.
  • the target device will send access to the cross-region proxy server according to the address of the cross-region proxy server.
  • the cross-regional proxy server determines whether the target device sending the access request is the target device by comparing the identification information of the target device included in the access request with the identification information of the target device sent by the target server. If the target device to be accessed is consistent, the connection between the target device and the cross-region proxy server is established.
  • a cross-area proxy server is set on the proxy area in advance, and the cross-area proxy server establishes a connection with the target device according to the identification information of the target device sent by the target server and the access request sent by the target device, which improves the efficiency of the target device and the cross-area proxy server.
  • the connection accuracy of the regional proxy server avoids that when the target device performs cross-regional access on the proxy area, the access time caused by the connection with the target server is too long and the access efficiency is affected, thereby improving the cross-regional access efficiency of the target device.
  • the method further includes: receiving the cross-region access duration threshold of the target device and/or the cross-region access number threshold of the target device sent by the target server; according to the connection information between the cross-region proxy server and the target device The comparison result with the cross-region access duration threshold and/or the cross-region access number threshold is used to control the connection between the cross-region proxy server and the target device.
  • the target device is connected to the target server in the target area to avoid cross-regional access.
  • a cross-region access duration threshold and/or cross-region access number threshold are set for the target device in advance to limit the target device cross-region access. The total duration and the total number of times, so as to achieve the effect of isolation and avoid the phenomenon of serial goods.
  • the cross-region access duration threshold and/or the cross-region access number threshold of the target device is preset.
  • a limit value is set for the cross-region access of the target device according to the actual scenario, and the size of the limit value is not limited.
  • the target server After the target server determines the cross-regional proxy server of the target device, it sends the cross-regional access duration threshold and/or the cross-regional access number threshold of the target device to the cross-regional proxy server, so that the cross-regional proxy server can establish a connection with the target device. , that is, start the countdown and/or countdown times, and disconnect the connection with the target device when the connection duration reaches the duration threshold and/or the number of connections reaches the number threshold, which not only ensures the cross-regional access effect of the target device, but also ensures that the device Isolate the effect of scheduling to avoid the phenomenon of equipment serialization.
  • connection information includes connection duration and/or connection times between the cross-region proxy server and the target device.
  • connection between the cross-region proxy server and the target device according to the comparison result between the connection information between the cross-region proxy server and the target device and the cross-region access duration threshold and/or the cross-region access number threshold, including: if the connection duration is greater than the access duration threshold and / or the number of connections is greater than the threshold, send a cross-region access prohibition notification to the target device, so that the target device can directly connect with the target server; and/or send a target device connection completion notification and connection record to the target server, so that the target server saves connection records; and/or sending end-of-access notifications to clients connected to the target device.
  • the connection information indicates the duration information and/or the number of times of actual connection between the target device and the cross-region proxy server. Determine whether the actual connection of the target device reaches the access threshold according to the comparison result between the actual connection duration information and the cross-region access duration threshold and/or the comparison result between the actual connection number information and the cross-region access number threshold.
  • a cross-region access prohibition notification is sent to the target device, so that the target device can directly connect with the target server. Send a cross-region access prohibition notification to the target device, so that the target device can no longer send cross-region access requests, but can only send access requests to establish a connection with the target server.
  • the cross-region proxy server sends the historical connection record with the target device to the target server, so as to let the target server know that the target device has completed cross-region access and avoid repeated cross-region access. String goods.
  • the target server can determine the cross-regional access of the target device, thereby ensuring the precise control of the cross-regional access of the target device and avoiding the phenomenon of cross-regional goods.
  • the client refers to a device connected to the target device through a cross-regional proxy server.
  • the target device can be accessed and controlled through the APP.
  • a message is sent to the APP connected to the target device to notify the client that the target device no longer provides cross-region access services.
  • a corresponding interface display may be performed on the client to prompt the user.
  • the cross-regional proxy server and the target device After the connection between the cross-regional proxy server and the target device reaches the threshold, it sends messages to the target server, the target device and the client respectively to notify the participants and improve the mastery of the cross-regional access of the target device.
  • the method further includes: receiving a target device access request sent by a client that establishes a connection with the target device; wherein the target device access request includes identification information of the target device; according to the identification information of the target device Query the connection result between the target device and the cross-region proxy server, and send the connection result to the client, so that the client can access the target device according to the connection result.
  • the client refers to an application that can view and control the target device, such as an APP on a mobile phone.
  • the address information of all servers is pre-stored in the client, so the connection is directly selected according to the server to which the target device is connected.
  • the client queries the home location through Beidou system or Global Positioning System (Global Positioning System, GPS) information or through its own IP address, selects a cross-regional proxy server according to the information of the region where it is located, and communicates with the cross-regional proxy server.
  • the server connects to the server; or after the client pre-determines the information of the cross-regional proxy server connected to the target device, it manually switches to select the connected server, and establishes a connection with the cross-regional proxy server.
  • the client After the client connects to the cross-regional proxy server, it determines the identification information of the connected device through the account system preset by the server, or sends the identification information of the target device that needs to be added to the client by scanning the device QR code of the target device. to a cross-region proxy server. After receiving the access request from the target device, the cross-region proxy server needs to judge the connection status of the target device and the cross-region proxy server. Query the connection between the target device and the cross-region proxy server according to the identification information of the device in the access request of the target device. If the target device and the cross-region proxy server are in a connected state, the connection between the client and the target device is established; If the device is not connected to the cross-region proxy server, it will notify the client that the target device fails to access.
  • the connection between the client and the target device can be realized, the connection link between the client and the target device can be reduced, and the connection efficiency can be improved.
  • FIG. 3 is a flowchart of a method for accessing a device across regions in Embodiment 3 of the present application. This embodiment can be applied to the case where the test in the proxy area is applicable to the device in the target area.
  • cross-regional access can be achieved by setting the cross-regional proxy server in the proxy area.
  • the method can be executed by a device cross-area access device, which can be implemented in software and/or hardware, and can be configured in a terminal device, for example, an electronic device can be a functional device such as a camera.
  • the method includes:
  • Step 301 send the cross-regional access request to the matching target server, and receive the information of the cross-regional proxy server returned by the target server; wherein, the information of the cross-regional proxy server is determined by the target server according to the IP address information in the cross-regional access request , the cross-area proxy server is preset in a proxy area different from the target area where the target server is located, and the cross-area proxy server and the target server are deployed in a distributed manner.
  • the target device When the target device needs to perform cross-regional access, it sends a cross-regional access request to the matching target server, wherein the target server matching the target device is determined in advance, for example, according to the sales region of the target device. After receiving the cross-area access request from the target device, the target server determines the information of the cross-area proxy server that matches the attribution of the target device according to the IP address in the cross-area access request.
  • Step 302 Send an access request to the cross-region proxy server according to the information of the cross-region proxy server, so as to establish a connection with the cross-region proxy server.
  • the target device After receiving the information of the cross-region proxy server, the target device sends an access request to the cross-region proxy server according to the address information of the cross-region proxy server in the information of the cross-region proxy server, so as to request to establish a connection between the target device and the cross-region proxy server. .
  • cross-region proxy server For the description of the cross-region proxy server, the target device, and the target server in the embodiments of the present application, reference may be made to the foregoing embodiments, and details are not repeated here.
  • a cross-area proxy server is set on the proxy area in advance, and the information of the cross-area proxy server is sent to the target device through the target server matching the target device, so as to realize the connection between the target device and the cross-area proxy server in the proxy area. , reducing message interaction links and improving access efficiency.
  • the method further includes: receiving a cross-area access prohibition notification sent by the cross-area proxy server, and establishing a connection with the target server according to the cross-area access prohibition notification.
  • the cross-region proxy server determines that the connection with the target device reaches the access threshold, it sends a cross-region access prohibition notification to the target device, so that the target device directly connects with the target server.
  • a cross-region access prohibition notification is sent to the target device, so that the target device can no longer send a cross-region access request, and can only send an access request for establishing a connection with the target server.
  • FIG. 4 is a schematic structural diagram of the device for cross-area access device in Embodiment 4 of the present application. This embodiment can be applied to the case where the test in the proxy area is applicable to the device in the target area. It is executed by the target server, and the target server is set in the target area. The target device is suitable for use in the target area. As shown in FIG.
  • the device includes: an access request receiving module 410, configured to receive a cross-regional access request from a target device, and determine IP address information in the cross-regional access request; a proxy server determination module 420, configured to The IP address information determines the information of the cross-regional proxy server matching the target device; wherein, the cross-regional proxy server is preset in a proxy region different from the target region where the target server is located, and the cross-regional proxy server Distributed deployment with the target server; the proxy server sending module 430 is configured to send the information of the cross-region proxy server to the target device, so that the target device establishes a connection with the cross-region proxy server.
  • a cross-area proxy server is set on the proxy area in advance, and after the target server receives a cross-area access request from the target device, it matches an appropriate cross-area proxy server for the target device, so as to ensure that the target device is connected to a nearby device.
  • the cross-regional proxy server connection avoids that when the target device performs cross-regional access on the proxy area, the access time caused by the connection with the target server is too long and the access efficiency is affected, thereby improving the cross-regional access efficiency of the target device.
  • the proxy server determination module 420 is configured to: determine the home location of the target device according to the IP address information; A cross-region proxy server that matches the target device is determined.
  • the cross-region access request further includes identification information of the target device.
  • the proxy server sending module 430 is further configured to: send the identification information of the target device to the cross-area proxy server, so that the cross-area proxy server establishes a connection with the target device according to the identification information of the target device. connect.
  • the cross-regional access request further includes a cross-regional access duration threshold of the target device and/or a cross-regional access times threshold of the target device.
  • the device also includes an access threshold sending module, configured to: after determining the information of the cross-region proxy server matching the target device according to the IP address information, send the cross-region access duration threshold and/or The cross-area access times threshold of the target device is sent to the cross-area proxy server, so that the cross-area proxy server controls the target device according to the cross-area access duration threshold and/or the cross-area access times threshold cross-regional access.
  • an access threshold sending module configured to: after determining the information of the cross-region proxy server matching the target device according to the IP address information, send the cross-region access duration threshold and/or The cross-area access times threshold of the target device is sent to the cross-area proxy server, so that the cross-area proxy server controls the target device according to the cross-area access duration threshold and/or the cross-area access times threshold cross-regional access.
  • the device further includes a connection record saving module, configured to: receive and save the connection record sent after the cross-region proxy server completes the connection with the target device; the device further includes a target device access control module. , set to: after receiving the cross-regional access request of the target device, query the connection record, and control the cross-regional access of the target device according to the query result of the connection record.
  • a connection record saving module configured to: receive and save the connection record sent after the cross-region proxy server completes the connection with the target device
  • the device further includes a target device access control module.
  • the device cross-area access device provided by the embodiment of the present application can execute the device cross-area access method provided by any embodiment of the present application, and has functional modules corresponding to executing the device cross-area access method.
  • FIG. 5 is a schematic structural diagram of the device cross-regional access device in the fifth embodiment of the present application. This embodiment can be applied to the case where the test is applicable to the target region device in the proxy region, and is executed by the cross-regional proxy server.
  • the cross-regional server is set in the proxy zone, the target device suitable for the target zone can establish a connection with the cross-zone proxy server in the proxy zone.
  • the apparatus includes: a device identification receiving module 510 configured to receive identification information of a target device to be accessed sent by a target server; wherein, the cross-region proxy server is preset in the same location as the target server.
  • Proxy areas with different target areas, and the cross-area proxy server and the target server are deployed in a distributed manner;
  • the access connection module 520 is configured to respond to the access request sent by the target device according to the identification information of the target device, so as to establish the The connection between the target device and the cross-region proxy server; wherein, the access request is determined by the target device according to the information of the cross-region proxy server sent by the target server.
  • a cross-area proxy server is set on the proxy area in advance, and the cross-area proxy server establishes a connection with the target device according to the identification information of the target device sent by the target server and the access request sent by the target device, which improves the efficiency of the target device and the cross-area proxy server.
  • the connection accuracy of the regional proxy server avoids that when the target device performs cross-regional access on the proxy area, the access time caused by the connection with the target server is too long and the access efficiency is affected, thereby improving the cross-regional access efficiency of the target device.
  • the apparatus further includes a target device control module, including: an access threshold receiving unit configured to receive the cross-regional access duration threshold of the target device and/or the cross-regional access times of the target device sent by the target server. Threshold; an access threshold comparison unit, configured to control the cross-area access time threshold and/or the cross-area access times threshold according to the comparison result of the connection information between the cross-area proxy server and the target device and the cross-area access time threshold The connection between the regional proxy server and the target device.
  • a target device control module including: an access threshold receiving unit configured to receive the cross-regional access duration threshold of the target device and/or the cross-regional access times of the target device sent by the target server. Threshold; an access threshold comparison unit, configured to control the cross-area access time threshold and/or the cross-area access times threshold according to the comparison result of the connection information between the cross-area proxy server and the target device and the cross-area access time threshold The connection between the regional proxy server and the target device.
  • connection information includes connection duration and/or connection times between the cross-region proxy server and the target device.
  • the access threshold comparison unit is set to: if the connection duration is greater than the cross-region access duration threshold and/or the number of connections is greater than the cross-region access number threshold, send a cross-region access prohibition notification to the target device, so that The target device is directly connected to the target server; and/or sends a target device connection completion notification and a connection record to the target server, so that the target server saves the connection record; and/or to the target server.
  • the client connected to the device sends an access end notification.
  • the apparatus further includes a client connection module configured to: receive a target device access request sent by a client that establishes a connection with the target device; wherein the target device access request includes the target device's access request. Identification information; query the connection result between the target device and the cross-area proxy server according to the identification information, and send the connection result to the client, so that the client can access the connection result according to the connection result. the target device.
  • a client connection module configured to: receive a target device access request sent by a client that establishes a connection with the target device; wherein the target device access request includes the target device's access request. Identification information; query the connection result between the target device and the cross-area proxy server according to the identification information, and send the connection result to the client, so that the client can access the connection result according to the connection result. the target device.
  • the device cross-area access device provided by the embodiment of the present application can execute the device cross-area access method provided by any embodiment of the present application, and has functional modules corresponding to executing the device cross-area access method.
  • FIG. 6 is a schematic structural diagram of the device for cross-area access device in Embodiment 6 of the present application. This embodiment can be applied to the case where the test in the proxy area is applicable to the device in the target area. Use, cross-regional access can be achieved by setting the cross-regional proxy server in the proxy area. As shown in FIG.
  • the apparatus includes: a target server sending module 610, configured to send a cross-regional access request to a matching target server, and receive the cross-regional proxy server information returned by the target server; wherein, the cross-regional access request
  • the information of the proxy server is determined by the target server according to the IP address information in the cross-area access request, the cross-area proxy server is preset in a proxy area different from the target area where the target server is located, and the cross-area proxy server
  • the proxy server and the target server are deployed in a distributed manner;
  • the proxy server sending module 620 is configured to send an access request to the cross-region proxy server according to the information of the cross-region proxy server, so as to establish the connection between the target device and the cross-region proxy server. Proxy server connection.
  • a cross-area proxy server is set in the proxy area in advance, and the cross-area proxy server information is sent to the target device through the target server that matches the target device, so as to realize the connection between the target device and the cross-area proxy server in the proxy area, and reduce the A message interaction link is established to improve access efficiency.
  • the device further includes an access prohibition notification receiving module, configured to: receive a cross-area access prohibition notification sent by the cross-regional proxy server, and establish a relationship between the target device and the cross-area access prohibition notification according to the cross-area access prohibition notification. The connection to the target server.
  • an access prohibition notification receiving module configured to: receive a cross-area access prohibition notification sent by the cross-regional proxy server, and establish a relationship between the target device and the cross-area access prohibition notification according to the cross-area access prohibition notification. The connection to the target server.
  • the device cross-area access device provided by the embodiment of the present application can execute the device cross-area access method provided by any embodiment of the present application, and has functional modules corresponding to executing the device cross-area access method.
  • a matching target server is pre-configured for the target device according to the designated sales area of the target device.
  • the cross-regional fast connection of the target device is realized by setting a cross-regional proxy server in the proxy area in the system.
  • the device cross-area access system includes a target device, a cross-area proxy server, a target server, and a client, which are described in the above embodiments, and will not be repeated here.
  • the system can realize the cross-regional fast access between the client and the target device in the proxy area. First, you need to establish a connection between the target device and the cross-regional proxy server.
  • FIG. 7 is a sequence diagram of target device connection in the device cross-region access system in Embodiment 7 of the present application.
  • the target device sends a keep-alive message to a preset target server that matches the target device, where the keep-alive message includes the IP address information of the target device, the device unique identification information, and the cross-region access duration threshold of the target device/or cross-regional access duration threshold of the target device. Threshold for zone visits.
  • the target server queries the IP attribution according to the IP address information of the target device in the keep-alive message.
  • the proxy server in the area is used as a cross-area proxy server, and the address of the cross-area proxy server is carried in the keep-alive response message, and sent to the target device. If no proxy server of the target server is set in the area, the proxy server closest to the IP home location is determined as the cross-regional proxy server according to the IP home location.
  • the target server After the target server determines the cross-regional proxy server, it sends the device unique identification information sent by the target device and the cross-regional access duration threshold of the target device and/or the cross-regional access times threshold to the cross-regional proxy server.
  • the target device After receiving the keep-alive response message sent by the target server, the target device parses the keep-alive response message to obtain the address of the cross-region proxy server in the keep-alive response message, and sends the keep-alive message to the cross-region proxy server.
  • the cross-region proxy server After receiving the keep-alive message sent by the target device, the cross-region proxy server verifies the keep-alive message according to the unique device identifier sent by the target server. If the unique identification information matches, it will respond to the target device with a successful keep-alive message. In addition, before receiving the keep-alive success message responded by the inter-area proxy server, the target device periodically (for example, 30s) sends a keep-alive message to the inter-area proxy server.
  • the target device After the device cross-region access system is scheduled, the target device will establish a connection with the proxy server in the proxy area where it is located, and the proxy server will provide connection services for subsequent connections with the client. It will no longer pass through the target server in the target area. message interaction link.
  • the target server in order to ensure the effect of target device scheduling and isolation, that is, to avoid the phenomenon of device serialization, the target server sends the cross-region access duration threshold of the target device/or cross-region access number threshold to the cross-region proxy server. , to achieve isolation scheduling of devices.
  • the cross-regional proxy server After the target device establishes a connection with the cross-regional proxy server, or the client establishes a connection with the target device through the cross-regional proxy server, the cross-regional proxy server performs the cross-regional access time threshold of the target device and/or the cross-regional access number threshold. Countdown to area access.
  • the cross-region proxy server After the cross-region access duration threshold of the target device/or the cross-region access times threshold is cleared to zero, the cross-region proxy server sends a message to the client, the target device, and the target server respectively.
  • the cross-region proxy server sends a message to the client connected to the target device, notifying that the target device has reached the cross-region access threshold and no longer provides cross-region access services. For example, a corresponding interface is displayed on the client to prompt the user.
  • the cross-region proxy server sends a cross-region access prohibition notification to the target device, so that the target device directly performs a keep-alive connection with the target server next time it connects.
  • the cross-region proxy server sends a notification that the target device has been connected to the target server and sends a connection record.
  • the target server After receiving the connection record, the target server records the connection record of the target device in the database.
  • the cross-region proxy server records the connection record in the database.
  • the device information of the target device is removed from the list of available devices, or backed up to the list of connected devices.
  • the target server finds that the target device already has a connection record, and the connection scheduling operation is no longer performed, and the target device will not be able to connect to the cross-region proxy server. , can be connected with the target server located in the target area, so that the target device can be used normally in the target area.
  • the updated access threshold of the target device can be sent to the cross-region proxy server through the target server, so as to achieve adaptive adjustment of the cross-region access period of the target device.
  • FIG. 8 is a sequence diagram of client connection in the device cross-region access system in Embodiment 7 of the present application.
  • C1 After the client is started, obtain location information through Beidou system, GPS information or through its own IP address and query the home location, and select the nearest proxy server to connect according to the home location; or select the connected proxy server by manually switching to achieve the target device Connected cross-region proxy server connections.
  • the client obtains the unique identification information of the target device through the account system of the server or by scanning the QR code of the target device, and sends the device addition information to the cross-regional proxy server; the device addition information includes the unique identification information of the device .
  • the cross-region proxy server After receiving the device addition information sent by the client, the cross-region proxy server queries the database whether the device is successfully connected to the server and keeps it alive. If the target device and the cross-region proxy server are successfully kept alive, the cross-region proxy server responds to the client that the target device is successfully added.
  • the client connects to the target device through a cross-regional proxy server.
  • the network connection between the client and the target device will switch from the original connection between the client and the target device through the target server in the target area to the connection through the cross-region proxy server in the proxy area where the client and the target device are located. It does not need to go through the target area, and only communicates within the proxy area, which shortens the message transmission link and delay, and greatly improves the demonstration effect.
  • the device cross-region access system in the embodiment of the present application enables the client and the target device to jointly connect to the cross-region proxy server through the scheduling method, so as to form a link that the client, the target device, and the server are all accessed in the same region or a nearby region network, avoiding the need for It solves the problem that both the client and the target device are in the proxy area, but the access through the target area is slow and the success rate is low. In practical applications, there is no manual intervention in the whole process, and it does not affect the software functions of the equipment, and the test customers will not perceive it. This ensures the accuracy of the test results and the reliability of the test results.
  • FIG. 9 is a schematic structural diagram of an electronic device according to Embodiment 8 of the present application.
  • FIG. 9 shows a block diagram of an exemplary electronic device 12 suitable for use in implementing embodiments of the present application.
  • the electronic device 12 shown in FIG. 9 is only an example, and should not impose any limitations on the functions and scope of use of the embodiments of the present application.
  • the electronic device 12 takes the form of a general-purpose computing device.
  • Components of electronic device 12 may include, but are not limited to, one or more processors or processing units 16, system storage 28, and a bus 18 configured to connect various system components including system storage 28 and processing unit 16.
  • the bus 18 represents one or more of several types of bus structures, including a storage device bus or storage device controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of a variety of bus structures.
  • these architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, MicroChannel Architecture (MCA) bus, enhanced ISA bus, Video Electronics Standards Association (Video Electronics Standards Association) , VESA) local bus and Peripheral Component Interconnect (PCI) bus.
  • Electronic device 12 includes a variety of computer system readable media. These media can be any available media that can be accessed by electronic device 12, including both volatile and non-volatile media, removable and non-removable media.
  • System storage 28 may include computer system readable media in the form of volatile storage devices, such as random access memory (RAM) 30 and/or cache memory 32 .
  • Electronic device 12 may also include other removable/non-removable, volatile/non-volatile computer system storage media.
  • storage system 34 may be used to read and write to non-removable, non-volatile magnetic media (not shown in FIG. 9, commonly referred to as a "hard drive").
  • storage system 34 may provide a disk drive for reading and writing to removable non-volatile magnetic disks (eg, "floppy disks"), as well as removable non-volatile optical disks (eg, portable compact disks only) Read memory (Compact Disc Read-Only Memory, CD-ROM), Digital Video Disc Read-Only Memory (Digital Video Disc Read-Only Memory, DVD-ROM) or other optical media) CD-ROM drive for reading and writing.
  • each drive may be connected to bus 18 through one or more data media interfaces.
  • the storage device 28 may include at least one program product having a set (eg, at least one) of program modules configured to perform the functions of various embodiments of the present application.
  • a program/utility 40 having a set (at least one) of program modules 42, which may be stored, for example, in storage device 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and programs Data, each or some combination of these examples may include an implementation of a network environment.
  • Program modules 42 generally perform the functions and/or methods of the embodiments described herein.
  • the electronic device 12 may also communicate with one or more external devices 14 (eg, a keyboard, pointing device, display 24, etc.), may also communicate with one or more devices that enable a user to interact with the device 12, and/or The device 12 can communicate with any device (eg, network card, modem, etc.) that communicates with one or more other computing devices. Such communication may take place through an input/output (I/O) interface 22 .
  • the electronic device 12 may also communicate with one or more networks (eg, a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the Internet) through a network adapter 20. As shown in FIG. 9 , the network adapter 20 communicates with other modules of the electronic device 12 via the bus 18 .
  • LAN Local Area Network
  • WAN Wide Area Network
  • public network such as the Internet
  • the processing unit 16 executes a variety of functional applications and data processing by running the program stored in the system storage device 28 , for example, implements one of the following methods provided by the embodiments of the present application.
  • a device cross-area access method executed by a target server, comprising: receiving a cross-area access request from a target device, and determining IP address information in the cross-area access request; determining a connection with the target device according to the IP address information information of the matching cross-region proxy server; wherein, the cross-region proxy server is preset in a proxy region different from the target region where the target server is located, and the cross-region proxy server and the target server are distributed in a distributed deployment; The information of the cross-region proxy server is sent to the target device, so that the target device establishes a connection with the cross-region proxy server.
  • a device cross-area access method executed by a cross-area proxy server, comprising: receiving identification information of a target device to be accessed sent by a target server; wherein, the cross-area proxy server is preset at the target where the target server is located. Proxy areas with different areas, and the cross-area proxy server and the target server are deployed in a distributed manner; according to the identification information of the target device, the access request sent by the target device is responded to, so as to establish the target device and the cross-area proxy The connection to the server; wherein, the access request is determined by the target device according to the information of the cross-region proxy server sent by the target server.
  • a device cross-area access method executed by a target device, comprising: sending a cross-area access request to a matching target server, and receiving information of a cross-area proxy server returned by the target server; wherein, the cross-area proxy server's information
  • the information is that the target server is determined according to the IP address information in the cross-area access request, the cross-area proxy server is preset in a proxy area different from the target area where the target server is located, and the cross-area proxy server is connected to the The target server is deployed in a distributed manner; an access request is sent to the cross-region proxy server according to the information of the cross-region proxy server, so as to establish a connection with the cross-region proxy server.
  • the ninth embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, one of the following methods provided by the embodiments of the present application is implemented.
  • a device cross-area access method executed by a target server, comprising: receiving a cross-area access request from a target device, and determining IP address information in the cross-area access request; determining a connection with the target device according to the IP address information information of the matching cross-region proxy server; wherein, the cross-region proxy server is preset in a proxy region different from the target region where the target server is located, and the cross-region proxy server and the target server are distributed in a distributed deployment; The information of the cross-region proxy server is sent to the target device, so that the target device establishes a connection with the cross-region proxy server.
  • a device cross-area access method executed by a cross-area proxy server, comprising: receiving identification information of a target device to be accessed sent by a target server; wherein, the cross-area proxy server is preset at the target where the target server is located. Proxy areas with different areas, and the cross-area proxy server and the target server are deployed in a distributed manner; according to the identification information of the target device, the access request sent by the target device is responded to, so as to establish the target device and the cross-area proxy The connection to the server; wherein, the access request is determined by the target device according to the information of the cross-region proxy server sent by the target server.
  • a device cross-area access method executed by a target device, comprising: sending a cross-area access request to a matching target server, and receiving information of a cross-area proxy server returned by the target server; wherein, the cross-area proxy server's information
  • the information is that the target server is determined according to the IP address information in the cross-area access request, the cross-area proxy server is preset in a proxy area different from the target area where the target server is located, and the cross-area proxy server is connected to the The target server is deployed in a distributed manner; an access request is sent to the cross-region proxy server according to the information of the cross-region proxy server, so as to establish a connection with the cross-region proxy server.
  • the computer storage medium of the embodiments of the present application may adopt any combination of one or more computer-readable media.
  • the computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium.
  • the computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or a combination of any of the above.
  • An example (non-exhaustive list) of a computer readable storage medium includes: an electrical connection having one or more wires, a portable computer disk, a hard disk, RAM, Read-Only Memory (ROM), erasable Erasable Programmable Read-Only Memory (EPROM) or flash memory, optical fiber, portable compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above.
  • a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a propagated data signal in baseband or as part of a carrier wave, with computer-readable program code embodied thereon. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • a computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device .
  • the program code embodied on the computer-readable medium can be transmitted by any suitable medium, including but not limited to wireless, wire, optical fiber cable, radio frequency (RF), etc., or any suitable combination of the above.
  • any suitable medium including but not limited to wireless, wire, optical fiber cable, radio frequency (RF), etc., or any suitable combination of the above.
  • Computer program code for carrying out the operations of the present application may be written in one or more programming languages, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedures, or a combination thereof programming language such as C or similar programming languages.
  • the program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server.
  • the remote computer may be connected to the user's computer through any kind of network, including a LAN or WAN, or may be connected to an external computer (eg, through the Internet using an Internet service provider).

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Information Transfer Between Computers (AREA)
  • Computer And Data Communications (AREA)

Abstract

本申请实施例公开了一种设备跨区域访问方法、装置、电子设备和存储介质。该方法包括:接收目标设备的跨区域访问请求,并确定所述跨区域访问请求中的IP地址信息;根据IP地址信息确定与目标设备匹配的跨区域代理服务器的信息;其中,所述跨区域代理服务器预先设置在与目标服务器所在的目标区域不同的代理区域,且跨区域代理服务器与目标服务器分布式部署;将跨区域代理服务器的信息发送至目标设备,以使目标设备建立与跨区域代理服务器的连接。

Description

设备跨区域访问方法、装置、电子设备和存储介质
本申请要求在2020年09月03日提交中国专利局、申请号为202010916688.3的中国专利申请的优先权,该申请的全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及物联网技术领域,例如涉及一种设备跨区域访问方法、装置、电子设备和存储介质。
背景技术
随着物联网的快速发展及全球性市场的开放,物联网电子设备会销往海外各地。在实际的产品销售中,同一款设备在不同的地区和国家销售时,受多个地区和国家经济水平、关税政策、利润分配等因素影响,会存在不同的价格体系。厂家为了避免实际销售过程中串货造成市场紊乱,会根据同一设备销售区域的不同对云服务器进行调整。以A国家和B国家两个区域为例,同一款设备同时在A国家和B国家销售时,会在A国家和B国家均搭建一套云服务器,且彼此数据库独立,并在设备中通过参数设置,销往A国家的设备只能访问A国家的云服务器,销往B国家的设备只能访问B国家的云服务器。以此隔离设备的访问通路,约束指定设备只能销往指定区域,避免串货。
然而在实际的销售场景中,一些区域的客户会主动到厂商所在地对设备进行验货,在验货期间随机抽取设备进行测试,其中包括测试通过客户端访问设备。此时,配套的客户端和设备默认都连接国外的云服务器,因延时或网络限制等原因,无法访问的概率较大,影响测试结果。
解决方案是通过修改设置在设备上的与访问云服务器绑定的标签信息,以达到修改指定服务器地址参数的目的,例如将B国家的设备标签修改为A国家的,使得客户端和设备访问A国家的云服务器。然而,这种方法在每次测试时均需要修改设备标签,存在一定的人工干预工作量,造成访问效率低;并且由于修改了设备标签,客户会认为是用不同的设备在测试,对测试结果的认同性低。
发明内容
本申请实施例提供一种设备跨区域访问方法、装置、电子设备和存储介质,以提高设备跨区域访问的效率。
本申请实施例提供了一种设备跨区域访问方法,由目标服务器执行,包括:
接收目标设备的跨区域访问请求,并确定所述跨区域访问请求中的IP地址信息;
根据所述IP地址信息确定与所述目标设备匹配的跨区域代理服务器的信息;其中,所述跨区域代理服务器预先设置在与所述目标服务器所在的目标区域不同的代理区域,且所述跨区域代理服务器与所述目标服务器分布式部署;
将所述跨区域代理服务器的信息发送至所述目标设备,以使所述目标设备建立与所述跨区域代理服务器的连接。
本申请实施例提供了一种设备跨区域访问方法,由跨区域代理服务器执行,包括:
接收目标服务器发送的待访问的目标设备的标识信息;其中,所述跨区域代理服务器预先设置在与所述目标服务器所在的目标区域不同的代理区域,且所述跨区域代理服务器与所述目标服务器分布式部署;
根据所述目标设备的标识信息响应所述目标设备发送的访问请求,以建立所述目标设备与所述跨区域代理服务器的连接;其中,所述访问请求是所述目标设备根据所述目标服务器发送的跨区域代理服务器的信息确定。
本申请实施例提供了一种设备跨区域访问方法,由目标设备执行,包括:
发送跨区域访问请求至匹配的目标服务器,并接收所述目标服务器返回的跨区域代理服务器的信息;其中,所述跨区域代理服务器的信息是所述目标服务器根据所述跨区域访问请求中的IP地址信息确定的,跨区域代理服务器预先设置在与所述目标服务器所在的目标区域不同的代理区域,且所述跨区域代理服务器与所述目标服务器分布式部署;
根据所述跨区域代理服务器的信息向所述跨区域代理服务器发送访问请求,以建立与所述跨区域代理服务器的连接。
本申请实施例还提供了一种设备跨区域访问装置,由目标服务器执行,包括:
访问请求接收模块,设置为接收目标设备的跨区域访问请求,并确定所述跨区域访问请求中的IP地址信息;
代理服务器确定模块,设置为根据所述IP地址信息确定与所述目标设备匹配的跨区域代理服务器的信息;其中,所述跨区域代理服务器预先设置在与所述目标服务器所在的目标区域不同的代理区域,且所述跨区域代理服务器与所述目标服务器分布式部署;
代理服务器发送模块,设置为将所述跨区域代理服务器的信息发送至所述目标设备,以使所述目标设备建立与所述跨区域代理服务器的连接。
本申请实施例还提供了一种设备跨区域访问装置,由跨区域代理服务器执行,包括:
设备标识接收模块,设置为接收目标服务器发送的待访问的目标设备的标识信息;其中,所述跨区域代理服务器预先设置在与所述目标服务器所在的目标区域不同的代理区域,且所述跨区域代理服务器与所述目标服务器分布式部署;
访问连接模块,设置为根据所述目标设备标识的信息响应所述目标设备发送的访问请求,以建立所述目标设备与所述跨区域代理服务器的连接;其中,所述访问请求是所述目标设备根据所述目标服务器发送的跨区域代理服务器的信息确定。
本申请实施例还提供了一种设备跨区域访问装置,由目标设备执行,包括:
目标服务器发送模块,设置为发送跨区域访问请求至匹配的目标服务器,并接收所述目标服务器返回的跨区域代理服务器的信息;其中,所述跨区域代理服务器的信息是所述目标服务器根据所述跨区域访问请求中的IP地址信息确定的,所述跨区域代理服务器预先设置在与所述目标服务器所在的目标区域不同的代理区域,且所述跨区域代理服务器与所述目标服务器分布式部署;
代理服务器发送模块,设置为根据所述跨区域代理服务器的信息向所述跨区域代理服务器发送访问请求,以建立与所述跨区域代理服务器的连接。
本申请实施例还提供了一种电子设备,包括:
一个或多个处理器;
存储装置,设置为存储一个或多个程序,
当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如本申请任一实施例所述的设备跨区域访问方法。
本申请实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如本申请任一实施例所述的设备跨区域访问方法。
附图说明
图1是本申请实施例一中的设备跨区域访问方法的流程图;
图2是本申请实施例二中的设备跨区域访问方法的流程图;
图3是本申请实施例三中的设备跨区域访问方法的流程图;
图4是本申请实施例四中的设备跨区域访问装置的结构示意图;
图5是本申请实施例五中的设备跨区域访问装置的结构示意图;
图6是本申请实施例六中的设备跨区域访问装置的结构示意图;
图7是本申请实施例七中的设备跨区域访问系统中目标设备连接的时序图;
图8是本申请实施例七中的设备跨区域访问系统中客户端连接的时序图;
图9是本申请实施例八中的电子设备的结构示意图。
具体实施方式
下面结合附图和实施例对本申请进行说明。可以理解的是,此处所描述的实施例仅仅用于解释本申请,而非对本申请的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本申请相关的部分而非全部结构。
实施例一
图1是本申请实施例一中的设备跨区域访问方法的流程图,本实施例可适用于在代理区域测试适用于目标区域设备的情况,由目标服务器执行,目标服务器设置在目标区域,该目标设备适用于在目标区域中使用。该方法可以由设备跨区域访问装置来执行,该装置可以采用软件和/或硬件的方式实现,并可配置在电子设备中,例如电子设备可以是后台服务器等具有通信和计算能力的设备。如图1所示,该方法包括:
步骤101、接收目标设备的跨区域访问请求,并确定跨区域访问请求中的互联网协议(Internet Protocol,IP)地址信息。
目标设备是指需要与服务器连接完成特定功能的功能性设备,例如摄像头以及手机等,且目标设备支持在特定区域上使用,例如销往不同国家的同款摄像头所设置的参数并不相同,因此会在不同国家均搭建一套云服务器,且服务器中的数据库彼此独立,使得位于销往特定区域的设备能访问该区域上的云服务器。跨区域访问请求可以以保活消息的形式发送。
但是在某些特定环境下,这些能在特定区域上访问的设备需要在别的区域上进行短期性的访问。例如一些区域的客户会主动到厂商所在地对设备进行验货,所验的货为销往该特定区域的设备,而厂商所在地不在该特定区域,因此若直接在厂商所在地对该特定区域的设备进行测试,则会造成该特定区域的设备默认连接该特定区域的服务器,由于距离、网络等原因会造成访问时长过长或者访问失败。在本申请实施例中,对于这种情况下,目标设备在厂商所在地发出跨区域访问请求,目标服务器是指设置在该目标设备销往区域上的服务器, 目标区域即该目标设备的销往区域或者该目标设备默认连接的服务器所在的区域,跨区域代理服务器是指设置在厂商所在地附近的服务器。
当目标设备不在目标区域上发起访问请求时,且目标区域距离目标设备发起请求所在位置较远,则目标设备触发发起跨区域访问请求。确定目标设备距离目标区域的距离远近可以根据网络传输情况进行确定,在此不作限制。由于目标设备是销往目标区域的,因此该跨区域访问请求是默认发送至目标服务器的。目标服务器接收到该跨区域访问请求,获取跨区域访问请求中携带的IP地址信息,该IP地址信息表征了目标设备发起跨区域访问请求时的所在位置。
步骤102、根据IP地址信息确定与目标设备匹配的跨区域代理服务器的信息;其中,跨区域代理服务器预先设置在与目标服务器所在的目标区域不同的代理区域,且跨区域代理服务器与目标服务器分布式部署。
预先在目标区域以外的区域上设置代理服务器,该代理服务器与目标区域的目标服务器形成分布式系统,代理服务器中的数据库与目标服务器中的数据库保持一致,其中,目标服务器作为中心服务器,代理服务器的设置区域以及设置数量可以根据实际情况进行设置。示例性的,对于设备厂家来说,客户通常会选择前往厂家所在地对设备进行测试,因此将需要进行设备测试的厂家所在区域设置为代理区域,在代理区域上设置代理服务器,或者在交通便捷的区域分散设置代理服务器,便于客户选择适合的区域进行设备测试。
根据IP地址确定目标设备发起跨区域访问请求时的所在区域,将该区域上的代理服务器作为与该目标设备进行跨区域访问时匹配的跨区域代理服务器。跨区域代理服务器的信息包括代理服务器的地址信息,以便目标设备确定代理服务器。
在一个可选的实施例中,步骤102,包括:根据IP地址信息确定目标设备的归属地;根据归属地与候选代理服务器的设置区域的距离,从候选代理服务器中确定与目标设备匹配的跨区域代理服务器。
候选代理服务器是指预先设置的与目标服务器形成分布式部署的服务器节点。示例性的,预先建立归属地与候选代理服务器的映射关系。
根据IP地址信息确定目标设备发送跨区域访问请求时的归属地,根据归属地与候选代理服务器的设置区域的距离,从候选代理服务器中选取距离归属地最近的候选代理服务器作为与目标设备匹配的跨区域代理服务器。
若目标设备发起跨区域访问请求所在的代理区域上设置有目标服务器的代理服务器节点,则直接将该代理服务器作为跨区域代理服务器;若目标设备发起跨区域访问请求所在的代理区域上没有设置有目标服务器的代理服务器节 点,则在该代理区域的周边区域确定最近的代理服务器作为该目标设备此次跨区域访问的代理服务器。从而保证目标设备与确定的跨区域代理服务器之间的距离最近,提高目标设备的访问效率。
步骤103、将跨区域代理服务器的信息发送至目标设备,以使目标设备建立与跨区域代理服务器的连接。
目标服务器在确定与目标设备的归属地最近的代理服务器后,将该代理服务器的信息发送至目标设备,以便目标设备根据代理服务器的信息中的代理服务器地址确定需要连接的代理服务器。
示例性的,目标设备向目标服务器发送保活消息,目标服务器根据保活消息中的IP地址信息确定该归属地对应的代理服务器的信息,并将该代理服务器地址信息携带在保活消息中发送至目标设备。
本申请实施例预先在代理区域上设置跨区域代理服务器,并且在目标服务器接收到目标设备的跨区域访问请求后,为目标设备匹配合适的跨区域代理服务器,以保证目标设备与距离较近的跨区域代理服务器连接,避免了目标设备在代理区域上进行跨区域访问时,与目标服务器连接造成访问时长过长影响访问效率,从而提高了目标设备跨区域访问的效率。
在一个可选的实施例中,跨区域访问请求中还包括目标设备的标识信息;
在根据所述IP地址信息确定与所述目标设备匹配的跨区域代理服务器的信息之后,所述方法还包括:将目标设备的标识信息发送至跨区域代理服务器,以使跨区域代理服务器根据目标设备的标识信息建立与目标设备的连接。
目标设备的标识信息用于对目标设备的身份进行唯一表征,示例性的,目标设备在向目标服务器发送跨区域访问请求时,在请求中会携带目标设备的设备唯一标识码。
目标服务器在确定目标设备的跨区域代理服务器后,将目标设备的标识信息发送至跨区域代理服务器,以便跨区域代理服务器根据目标设备的标识信息建立与目标设备的连接,避免连接错误造成访问失败,提高目标设备与跨区域代理服务器之间的访问准确性。
在一个可选的实施例中,跨区域访问请求中还包括目标设备的跨区域访问时长阈值和/或目标设备的跨区域访问次数阈值;在根据IP地址信息确定与目标设备匹配的跨区域代理服务器信息之后,还包括:将目标设备的跨区域访问时长阈值和/或目标设备的跨区域访问次数阈值发送至跨区域代理服务器,以使跨区域代理服务器根据跨区域访问时长阈值和/或目标设备的跨区域访问次数阈值控制目标设备的跨区域访问。
目标设备在目标区域上与目标服务器连接是为了避免串货,而为了保证这一特点,预先为目标设备设置跨区域访问时长阈值和/或跨区域访问次数阈值,用于限制目标设备跨区域访问的总时长和总次数,从而起到隔离的效果,避免发生串货的现象。
目标设备的跨区域访问时长阈值和/或目标设备的跨区域访问次数阈值是预先设置的。示例性的,根据实际场景为目标设备的跨区域访问设置一个限制值,对于限制值的大小并不作限制。
目标服务器在确定目标设备的跨区域代理服务器后,将目标设备的跨区域访问时长阈值和/或目标设备的跨区域访问次数阈值发送至跨区域代理服务器,以便跨区域代理服务器在建立与目标设备的连接后,即开始倒计时,并在连接时长达到时长阈值和/或连接次数达到次数阈值时断开与目标设备的连接,实现了既保证了目标设备跨区域的访问效果,也保证了设备隔离调度的效果,避免发生设备串货的现象。
在一个可选的实施例中,该方法还包括:接收并保存跨区域代理服务器完成与目标设备的连接后发送的连接记录;在接收目标设备的跨区域访问请求之后,还包括:查询连接记录,并根据连接记录的查询结果控制目标设备的跨区域访问。
连接记录是跨区域代理服务器完成与目标设备的连接后发送至目标服务器的。示例性的,跨区域代理服务器在接收到跨区域访问时长阈值和/或跨区域访问次数阈值后,对与目标设备的连接进行判断,确定连接时长达到时长阈值和/或连接次数达到次数阈值,则将与目标设备的历史连接记录发送至目标服务器,以便让目标服务器了解该目标设备已经完成跨区域访问,避免重复的跨区域访问造成设备在市场上串货。
在目标服务器接收到目标设备的跨区域访问请求后,先对存储的记录进行查询确定是否存在连接记录,若存在连接记录,表示该目标设备已经达到跨区域访问的阈值,已经不被允许跨区域访问,则目标服务器拒绝所述目标设备的跨区域访问,保持目标设备与目标服务器的连接。若不存在连接记录,表示该目标设备未达到跨区域访问的阈值,仍被允许跨区域访问,则目标服务器根据IP地址信息确定与目标设备匹配的跨区域代理服务器的信息,并将该跨区域代理服务器的信息发送至目标设备,以建立目标设备和跨区域代理服务器的连接。
通过连接记录的保存实现了目标服务器对目标设备的跨区域访问情况进行确定,进而保证对目标设备跨区域访问的精确控制,避免发生串货现象。
实施例二
图2是本申请实施例二中的设备跨区域访问方法的流程图,本实施例可适用于在代理区域测试适用于目标区域设备的情况,由跨区域代理服务器执行,跨区域服务器设置在代理区域,适用于目标区域的目标设备可以在代理区域中与跨区域代理服务器建立连接。该方法可以由设备跨区域访问装置来执行,该装置可以采用软件和/或硬件的方式实现,并可配置在电子设备中,例如电子设备可以是后台服务器等具有通信和计算能力的设备。如图2所示,该方法包括:
步骤201、接收目标服务器发送的待访问的目标设备的标识信息;其中,跨区域代理服务器预先设置在与目标服务器所在的目标区域不同的代理区域,且跨区域代理服务器与目标服务器分布式部署。
由于跨区域代理服务器设置在代理区域,与目标设备发起跨区域访问请求时的归属地相近,因此可以保证目标设备的访问效率。同时为了保证跨区域代理服务器与目标设备之间的连接准确性,避免造成误连接的现象,跨区域代理服务器接收目标服务器发送的目标设备的标识信息,携带该目标设备的标识信息的目标设备才是跨区域代理服务器待访问的设备。
步骤202、根据目标设备的标识信息响应目标设备发送的访问请求,以建立目标设备与跨区域代理服务器的连接;其中,访问请求是目标设备根据目标服务器发送的跨区域代理服务器的信息确定。
跨区域代理服务器接收目标服务器发送的目标设备的标识信息,同时该目标设备在接收到目标服务器发送的跨区域代理服务器的信息后,会根据跨区域代理服务器的地址向该跨区域代理服务器发送访问请求,跨区域代理服务器在接收到该访问请求后,通过对访问请求中包括的目标设备的标识信息和目标服务器发送的目标设备的标识信息的比对结果,确定发送访问请求的目标设备是否是待访问的目标设备,若比对一致,则建立目标设备与跨区域代理服务器的连接。
在本申请实施例中关于跨区域代理服务器、目标设备以及目标服务器的说明可以参考实施例一,在此不再赘述。
本申请实施例预先在代理区域上设置跨区域代理服务器,跨区域代理服务器根据目标服务器发送的目标设备的标识信息和目标设备发送的访问请求,建立与目标设备的连接,提高了目标设备和跨区域代理服务器的连接准确性,避免了目标设备在代理区域上进行跨区域访问时,与目标服务器连接造成访问时长过长影响访问效率,从而提高了目标设备跨区域访问的效率。
在一个可选的实施例中,该方法还包括:接收目标服务器发送的目标设备的跨区域访问时长阈值和/或目标设备的跨区域访问次数阈值;根据跨区域代理 服务器与目标设备的连接信息和跨区域访问时长阈值和/或跨区域访问次数阈值的比较结果,控制跨区域代理服务器与目标设备的连接。
目标设备在目标区域上与目标服务器连接是为了避免串货,而为了保证这一特点,预先为目标设备设置跨区域访问时长阈值和/或跨区域访问次数阈值,用于限制目标设备跨区域访问的总时长和总次数,从而起到隔离的效果,避免发生串货的现象。
目标设备的跨区域访问时长阈值和/或跨区域访问次数阈值是预先设置的。示例性的,根据实际场景为目标设备的跨区域访问设置一个限制值,对于限制值的大小并不作限制。
目标服务器在确定目标设备的跨区域代理服务器后,将目标设备的跨区域访问时长阈值和/或跨区域访问次数阈值发送至跨区域代理服务器,以便跨区域代理服务器在建立与目标设备的连接后,即开始倒计时和/或倒计次数,并在连接时长达到时长阈值和/或连接次数达到次数阈值时断开与目标设备的连接,既保证了目标设备跨区域的访问效果,也保证了设备隔离调度的效果,避免发生设备串货的现象。
在一个可选的实施例中,连接信息中包括跨区域代理服务器和目标设备的连接时长和/或连接次数。
根据跨区域代理服务器与目标设备的连接信息和跨区域访问时长阈值和/或跨区域访问次数阈值的比较结果,控制跨区域代理服务器与目标设备的连接,包括:若连接时长大于访问时长阈值和/或连接次数大于次数阈值,则向目标设备发送跨区域访问禁止通知,以使目标设备直接与目标服务器连接;和/或向目标服务器发送目标设备连接完成通知和连接记录,以使目标服务器保存连接记录;和/或向与目标设备连接的客户端发送访问结束通知。
连接信息表示了目标设备与跨区域代理服务器实际连接的时长信息和/或实际连接的次数信息。根据实际连接的时长信息与跨区域访问时长阈值的比较结果和/或实际连接的次数信息与跨区域访问次数阈值的比较结果,确定目标设备的实际连接是否达到访问阈值。
若达到访问阈值,则向目标设备发送跨区域访问禁止通知,以使目标设备直接与目标服务器连接。向目标设备发送跨区域访问禁止通知,使得目标设备不能再发送跨区域访问请求,只可以发送与目标服务器建立连接的访问请求。
向目标服务器发送目标设备连接完成通知和连接记录,以使目标服务器保存连接记录。跨区域代理服务器在判断目标设备达到访问阈值后,向目标服务器发送与目标设备的历史连接记录,以便让目标服务器了解该目标设备已经完 成跨区域访问,避免重复的跨区域访问造成设备在市场上串货。通过连接记录的发送实现了目标服务器对目标设备的跨区域访问情况进行确定,进而保证对目标设备跨区域访问的精确控制,避免发生串货现象。
向与目标设备连接的客户端发送访问结束通知。客户端是指与目标设备通过跨区域代理服务器连接的装置,例如建立客户端上的应用软件(Application,APP)与目标设备的连接后,通过APP即可实现对目标设备的访问以及控制。当目标设备与跨区域代理服务器的连接达到访问阈值后,向连接该目标设备的APP发送消息,通知客户端目标设备不再提供跨区域访问服务。示例性的,在客户端上可以进行相应的界面展示,以提示用户。
跨区域代理服务器与目标设备的连接达到阈值后,分别向目标服务器、目标设备以及客户端发送消息,以通知参与方,提高对目标设备跨区域访问的掌握程度。
在一个可选的实施例中,该方法还包括:接收与目标设备建立连接的客户端发送的目标设备访问请求;其中,目标设备访问请求中包括目标设备的标识信息;根据目标设备的标识信息查询目标设备与跨区域代理服务器的连接结果,并将连接结果发送至客户端,以使客户端根据连接结果访问目标设备。
客户端是指可以对目标设备进行查看以及控制的应用,例如手机上的APP。对于客户端中预先保存了所有服务器的地址信息,因此直接根据目标设备所连接的服务器进行选择连接。示例性的,当客户端启动后,通过北斗系统或全球定位系统(Global Positioning System,GPS)信息或通过自身IP地址查询归属地,根据所在区域的信息选择跨区域代理服务器,并与跨区域代理服务器进行连接;或者客户端预先确定目标设备所连接的跨区域代理服务器信息后,进行手动切换选择连接的服务器,并建立与跨区域代理服务器的连接。
客户端在与跨区域代理服务器连接后,通过服务器预先设置的账号体系确定连接的设备的标识信息或者通过扫描目标设备的设备二维码等方式,将需要添加至客户端的目标设备的标识信息发送至跨区域代理服务器。跨区域代理服务器在接收到目标设备访问请求后,需要对该目标设备与跨区域代理服务器的连接情况进行判断。根据目标设备访问请求中的设备的标识信息查询该目标设备与跨区域代理服务器的连接情况,若该目标设备与跨区域代理服务器处于连接状态,则建立客户端与目标设备的连接;若该目标设备与跨区域代理服务器不处于连接状态,则通知客户端目标设备访问失败。
通过跨区域代理服务器可以实现客户端与目标设备的连接,减少客户端与目标设备之间的连接链路,提高连接效率。
实施例三
图3是本申请实施例三中的设备跨区域访问方法的流程图,本实施例可适用于在代理区域测试适用于目标区域设备的情况,由目标设备执行,目标设备适用于在目标区域中使用,通过设置在代理区域的跨区域代理服务器可以实现跨区域访问。该方法可以由设备跨区域访问装置来执行,该装置可以采用软件和/或硬件的方式实现,并可配置在终端设备中,例如电子设备可以是摄像头等功能性设备。如图3所示,该方法包括:
步骤301、发送跨区域访问请求至匹配的目标服务器,并接收目标服务器返回的跨区域代理服务器的信息;其中,跨区域代理服务器的信息是目标服务器根据跨区域访问请求中的IP地址信息确定的,跨区域代理服务器预先设置在与目标服务器所在的目标区域不同的代理区域,且跨区域代理服务器与目标服务器分布式部署。
目标设备在需要进行跨区域访问时,向匹配的目标服务器发送跨区域访问请求,其中与目标设备匹配的目标服务器通过预先确定,例如根据目标设备的销售区域进行确定。目标服务器在接收到目标设备的跨区域访问请求后,根据跨区域访问请求中的IP地址确定与目标设备归属地匹配的跨区域代理服务器的信息。
步骤302、根据跨区域代理服务器的信息向跨区域代理服务器发送访问请求,以建立与跨区域代理服务器的连接。
目标设备接收到跨区域代理服务器的信息后,根据跨区域代理服务器的信息中的跨区域代理服务器的地址信息向该跨区域代理服务器发送访问请求,以请求建立目标设备与跨区域代理服务器的连接。
在本申请实施例中关于跨区域代理服务器、目标设备以及目标服务器的说明可以参考上述实施例,在此不再赘述。
本申请实施例预先在代理区域上设置跨区域代理服务器,并通过与目标设备匹配的目标服务器将跨区域代理服务器的信息发送至目标设备,实现目标设备在代理区域上与跨区域代理服务器的连接,减少了消息交互链路,提高访问效率。
在一个可选的实施例中,该方法还包括:接收跨区域代理服务器发送的跨区域访问禁止通知,并根据跨区域访问禁止通知建立与目标服务器的连接。
在跨区域代理服务器判断与目标设备之间的连接达到访问阈值时,向目标设备发送跨区域访问禁止通知,以使目标设备直接与目标服务器连接。示例性的,向目标设备发送跨区域访问禁止通知,使得目标设备不能再发送跨区域访 问请求,只可以发送与目标服务器建立连接的访问请求。通过向目标设备发送跨区域访问禁止通知,避免出现在目标设备不具备跨区域访问的情况下,仍然发送跨区域访问请求,造成资源浪费。
实施例四
图4是本申请实施例四中的设备跨区域访问装置的结构示意图,本实施例可适用于在代理区域测试适用于目标区域设备的情况,由目标服务器执行,目标服务器设置在目标区域,该目标设备适用于在目标区域中使用。如图4所示,该装置包括:访问请求接收模块410,设置为接收目标设备的跨区域访问请求,并确定所述跨区域访问请求中的IP地址信息;代理服务器确定模块420,设置为根据所述IP地址信息确定与所述目标设备匹配的跨区域代理服务器的信息;其中,跨区域代理服务器预先设置在与所述目标服务器所在的目标区域不同的代理区域,且所述跨区域代理服务器与所述目标服务器分布式部署;代理服务器发送模块430,设置为将所述跨区域代理服务器的信息发送至所述目标设备,以使所述目标设备建立与所述跨区域代理服务器的连接。
本申请实施例预先在代理区域上设置跨区域代理服务器,并且在目标服务器接收到目标设备的跨区域访问请求后,为目标设备匹配合适的跨区域代理服务器,以保证目标设备与距离较近的跨区域代理服务器连接,避免了目标设备在代理区域上进行跨区域访问时,与目标服务器连接造成访问时长过长影响访问效率,从而提高了目标设备跨区域访问的效率。
可选的,代理服务器确定模块420,设置为:根据所述IP地址信息确定所述目标设备的归属地;根据所述归属地与候选代理服务器的设置区域的距离,从所述候选代理服务器中确定与所述目标设备匹配的跨区域代理服务器。
可选的,所述跨区域访问请求中还包括目标设备的标识信息。
代理服务器发送模块430,还设置为:将所述目标设备的标识信息发送至所述跨区域代理服务器,以使所述跨区域代理服务器根据所述目标设备的标识信息建立与所述目标设备的连接。
可选的,所述跨区域访问请求中还包括所述目标设备的跨区域访问时长阈值和/或所述目标设备的跨区域访问次数阈值。
所述装置还包括访问阈值发送模块,设置为:在根据所述IP地址信息确定与所述目标设备匹配的跨区域代理服务器的信息之后,将所述目标设备的跨区域访问时长阈值和/或所述目标设备的跨区域访问次数阈值发送至所述跨区域代理服务器,以使所述跨区域代理服务器根据所述跨区域访问时长阈值和/或所述跨区域访问次数阈值控制所述目标设备的跨区域访问。
可选的,所述装置还包括连接记录保存模块,设置为:接收并保存所述跨区域代理服务器完成与所述目标设备的连接后发送的连接记录;所述装置还包括目标设备访问控制模块,设置为:在接收目标设备的跨区域访问请求之后,查询所述连接记录,并根据所述连接记录的查询结果控制所述目标设备的跨区域访问。
本申请实施例所提供的设备跨区域访问装置可执行本申请任意实施例所提供的设备跨区域访问方法,具备执行设备跨区域访问方法相应的功能模块。
实施例五
图5是本申请实施例五中的设备跨区域访问装置的结构示意图,本实施例可适用于在代理区域测试适用于目标区域设备的情况,由跨区域代理服务器执行,跨区域服务器设置在代理区域,适用于目标区域的目标设备可以在代理区域中与跨区域代理服务器建立连接。如图4所示,该装置包括:设备标识接收模块510,设置为接收目标服务器发送的待访问的目标设备的标识信息;其中,所述跨区域代理服务器预先设置在与所述目标服务器所在的目标区域不同的代理区域,且所述跨区域代理服务器与所述目标服务器分布式部署;访问连接模块520,设置为根据所述目标设备的标识信息响应目标设备发送的访问请求,以建立所述目标设备与所述跨区域代理服务器的连接;其中,所述访问请求是目标设备根据所述目标服务器发送的跨区域代理服务器的信息确定的。
本申请实施例预先在代理区域上设置跨区域代理服务器,跨区域代理服务器根据目标服务器发送的目标设备的标识信息和目标设备发送的访问请求,建立与目标设备的连接,提高了目标设备和跨区域代理服务器的连接准确性,避免了目标设备在代理区域上进行跨区域访问时,与目标服务器连接造成访问时长过长影响访问效率,从而提高了目标设备跨区域访问的效率。
可选的,所述装置还包括目标设备控制模块,包括:访问阈值接收单元,设置为接收目标服务器发送的所述目标设备的跨区域访问时长阈值和/或所述目标设备的跨区域访问次数阈值;访问阈值比较单元,设置为根据所述跨区域代理服务器与所述目标设备的连接信息和所述跨区域访问时长阈值和/或所述跨区域访问次数阈值的比较结果,控制所述跨区域代理服务器与所述目标设备的连接。
可选的,所述连接信息中包括所述跨区域代理服务器和所述目标设备的连接时长和/或连接次数。
访问阈值比较单元,设置为:若所述连接时长大于所述跨区域访问时长阈值和/或连接次数大于所述跨区域访问次数阈值,则向所述目标设备发送跨区域 访问禁止通知,以使所述目标设备直接与所述目标服务器连接;和/或向所述目标服务器发送目标设备连接完成通知和连接记录,以使所述目标服务器保存所述连接记录;和/或向与所述目标设备连接的客户端发送访问结束通知。
可选的,所述装置还包括客户端连接模块,设置为:接收与所述目标设备建立连接的客户端发送的目标设备访问请求;其中,所述目标设备访问请求中包括所述目标设备的标识信息;根据所述标识信息查询所述目标设备与所述跨区域代理服务器的连接结果,并将所述连接结果发送至所述客户端,以使所述客户端根据所述连接结果访问所述目标设备。
本申请实施例所提供的设备跨区域访问装置可执行本申请任意实施例所提供的设备跨区域访问方法,具备执行设备跨区域访问方法相应的功能模块。
实施例六
图6是本申请实施例六中的设备跨区域访问装置的结构示意图,本实施例可适用于在代理区域测试适用于目标区域设备的情况,由目标设备执行,目标设备适用于在目标区域中使用,通过设置在代理区域的跨区域代理服务器可以实现跨区域访问。如图6所示,该装置包括:目标服务器发送模块610,设置为发送跨区域访问请求至匹配的目标服务器,并接收所述目标服务器返回的跨区域代理服务器的信息;其中,所述跨区域代理服务器的信息是所述目标服务器根据所述跨区域访问请求中的IP地址信息确定的,跨区域代理服务器预先设置在与所述目标服务器所在的目标区域不同的代理区域,且所述跨区域代理服务器与所述目标服务器分布式部署;代理服务器发送模块620,设置为根据所述跨区域代理服务器的信息向所述跨区域代理服务器发送访问请求,以建立所述目标设备与所述跨区域代理服务器的连接。
本申请实施例预先在代理区域上设置跨区域代理服务器,通过与目标设备匹配的目标服务器将跨区域代理服务器信息发送至目标设备,实现目标设备在代理区域上与跨区域代理服务器的连接,减少了消息交互链路,提高访问效率。
可选的,所述装置还包括访问禁止通知接收模块,设置为:接收所述跨区域代理服务器发送的跨区域访问禁止通知,并根据所述跨区域访问禁止通知建立所述目标设备与所述目标服务器的连接。
本申请实施例所提供的设备跨区域访问装置可执行本申请任意实施例所提供的设备跨区域访问方法,具备执行设备跨区域访问方法相应的功能模块。
实施例七
在目标设备中,根据目标设备的指定销售区域,为目标设备预先配置匹配的目标服务器。为了实现目标设备在代理区域的跨区域快速访问,在系统中通 过在代理区域设置跨区域代理服务器的方式实现目标设备的跨区域快速连接。在设备跨区域访问系统中,包括目标设备、跨区域代理服务器、目标服务器以及客户端,在上述实施例中进行了说明,在此不作赘述。该系统可以实现客户端与目标设备在代理区域的跨区域快速访问。首先需要建立目标设备与跨区域代理服务器的连接。图7是本申请实施例七中的设备跨区域访问系统中目标设备连接的时序图。
D1:目标设备向预先设置的与目标设备匹配的目标服务器发送保活消息,其中,保活消息中包括目标设备的IP地址信息、设备唯一标识信息以及目标设备的跨区域访问时长阈值/或跨区域访问次数阈值。
D2:目标服务器根据保活消息中目标设备的IP地址信息查询IP归属地。将该区域的代理服务器作为跨区域代理服务器,并将该跨区域代理服务器的地址携带在保活响应消息中,发送给目标设备。若该区域没有设置目标服务器的代理服务器,则根据IP归属地确定距离IP归属地最近的代理服务器作为跨区域代理服务器。
D3:目标服务器确定跨区域代理服务器后,将目标设备发送的设备唯一标识信息以及目标设备的跨区域访问时长阈值/或跨区域访问次数阈值发送至跨区域代理服务器。
D4:目标设备在接收到目标服务器发送的保活响应消息后,对保活响应消息进行解析得到保活响应消息中的跨区域代理服务器地址,并发送保活消息给跨区域代理服务器。
D5:跨区域代理服务器在接收到目标设备发送的保活消息后,根据目标服务器发送的设备唯一标识对该保活消息进行验证,若确定目标服务器发送的设备唯一标识与保活消息中的设备唯一标识信息匹配一致,则向目标设备回应保活成功的消息。此外,目标设备在收到跨区域代理服务器回应的保活成功消息前,定期(如30s)向跨区域代理服务器发送保活消息。
经过设备跨区域访问系统调度后,目标设备会与所在的代理区域的代理服务器建立连接,并由该代理服务器提供连接服务,进行后续与客户端的连接,将不再通过目标区域的目标服务器,缩短消息交互链路。
在该设备跨区域访问系统中,为了保证目标设备调度隔离的效果,即避免发生设备串货的现象,目标服务器向跨区域代理服务器发送目标设备的跨区域访问时长阈值/或跨区域访问次数阈值,实现对设备的隔离调度。
在目标设备与跨区域代理服务器建立连接,或者客户端通过跨区域代理服务器与目标设备建立连接后,跨区域代理服务器根据目标设备的跨区域访问时 长阈值/或跨区域访问次数阈值进行目标设备跨区域访问的倒计时。
在目标设备的跨区域访问时长阈值/或跨区域访问次数阈值清零后,跨区域代理服务器分别向客户端、目标设备以及目标服务器发送消息。跨区域代理服务器向连接该目标设备的客户端发送消息,通知该目标设备已经达到跨区域访问阈值,不再提供跨区域访问服务,例如在客户端作相应的界面展示提示用户。跨区域代理服务器向目标设备发送跨区域访问禁止通知,使得目标设备下次连接时直接与目标服务器之间进行保活连接。跨区域代理服务器向目标服务器发送该目标设备已经连接完成的通知并且发送连接记录,目标服务器在接收到连接记录后,在数据库中记录该目标设备的连接记录,同时跨区域代理服务器在数据库中将该目标设备的设备信息从可使用的设备表中移出,或者备份到已经连接的设备列表中。在目标设备再次上电后,向目标服务器发送保活消息时,目标服务器查询到该目标设备已经有连接记录,则不再进行连接调度的操作,该目标设备将无法连接到跨区域代理服务器上,能与位于目标区域的目标服务器连接,实现该目标设备在目标区域上正常使用。
可以结合实际的应用场景,如需调整访问阈值时,可以通过目标服务器向跨区域代理服务器发送目标设备的更新访问阈值,以达到适应性调整目标设备跨区域访问的周期。
在目标设备与跨区域代理服务器连接后,需要建立客户端与目标设备的连接,首先需要建立客户端与跨区域代理服务器的连接,通过跨区域代理服务器实现目标设备与客户端的连接,从而实现通过客户端完成对目标设备的访问和控制。并且由于客户端的流动性,因此对于客户端不需要考虑区域隔离使用,反而客户端可以在多区域进行通用可以达到更好的访问效果。预先将所有服务器的地址保存在客户端中。图8是本申请实施例七中的设备跨区域访问系统中客户端连接的时序图。
C1:客户端启动后,通过北斗系统、GPS信息或通过自身IP地址获取位置信息并查询归属地,根据归属地选择最近的代理服务器连接;或通过手动切换选择连接的代理服务器,实现与目标设备连接的跨区域代理服务器的连接。
C2:客户端通过服务器的账号体系或者扫描目标设备二维码的形式获取目标设备的唯一标识信息,并发送设备添加信息至跨区域代理服务器;其中,设备添加信息中包括该设备的唯一标识信息。
C3:跨区域代理服务器在接收到客户端发送的设备添加信息后,在数据库中查询该设备是否与服务器连接成功保活。若目标设备与跨区域代理服务器成功保活,则跨区域代理服务器响应客户端目标设备添加成功。
C4:客户端通过跨区域代理服务器实现与目标设备的连接。
客户端与目标设备的连接组网将从原先客户端与目标设备都需通过目标区域的目标服务器连接,切换为通过客户端和目标设备都所处的代理区域的跨区域代理服务器连接,网络消息不需经过目标区域,只在代理区域内部通信,缩短了消息传输链路和延时,极大地提升了演示效果。本申请实施例的设备跨区域访问系统通过调度方法,使客户端与目标设备共同与跨区域代理服务器连接,形成客户端、目标设备、服务器都在同一区域或相近区域网络访问的链路,避免了客户端和目标设备都在代理区域,却通过目标区域访问慢、成功率低的问题。在实际应用中,整个过程没有人工干预,不对设备的软件功能产生影响,测试客户不会感知,在保证测试结果准确性的同时还保证了测试结果的可靠性。
实施例八
图9是本申请实施例八提供的一种电子设备的结构示意图。图9示出了适于用来实现本申请实施方式的示例性电子设备12的框图。图9显示的电子设备12仅仅是一个示例,不应对本申请实施例的功能和使用范围带来任何限制。
如图9所示,电子设备12以通用计算设备的形式表现。电子设备12的组件可以包括但不限于:一个或者多个处理器或者处理单元16,系统存储装置28,设置为连接不同系统组件(包括系统存储装置28和处理单元16)的总线18。
总线18表示几类总线结构中的一种或多种,包括存储装置总线或者存储装置控制器,外围总线,图形加速端口,处理器或者使用多种总线结构中的任意总线结构的局域总线。举例来说,这些体系结构包括但不限于工业标准体系结构(Industry Standard Architecture,ISA)总线,微通道体系结构(MicroChannel Architecture,MCA)总线,增强型ISA总线、视频电子标准协会(Video Electronics Standards Association,VESA)局域总线以及外围组件互连(Peripheral Component Interconnect,PCI)总线。
电子设备12包括多种计算机系统可读介质。这些介质可以是任何能够被电子设备12访问的可用介质,包括易失性和非易失性介质,可移动的和不可移动的介质。
系统存储装置28可以包括易失性存储装置形式的计算机系统可读介质,例如随机存取存储器(Random Access Memory,RAM)30和/或高速缓存存储器32。电子设备12还可以包括其它可移动/不可移动的、易失性/非易失性计算机系统存储介质。仅作为举例,存储系统34可以用于读写不可移动的非易失性磁介质(图9未显示,通常称为“硬盘驱动器”)。尽管图9中未示出,存储系统34可以提供用于对可移动非易失性磁盘(例如“软盘”)读写的磁盘驱动器, 以及对可移动非易失性光盘(例如便携式紧凑磁盘只读存储器(Compact Disc Read-Only Memory,CD-ROM),数字视盘只读存储器(Digital Video Disc Read-Only Memory,DVD-ROM)或者其它光介质)读写的光盘驱动器。在这些情况下,每个驱动器可以通过一个或者多个数据介质接口与总线18相连。存储装置28可以包括至少一个程序产品,该程序产品具有一组(例如至少一个)程序模块,这些程序模块被配置以执行本申请多个实施例的功能。
具有一组(至少一个)程序模块42的程序/实用工具40,可以存储在例如存储装置28中,这样的程序模块42包括但不限于操作系统、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。程序模块42通常执行本申请所描述的实施例中的功能和/或方法。
电子设备12也可以与一个或多个外部设备14(例如键盘、指向设备、显示器24等)通信,还可与一个或者多个使得用户能与该设备12交互的设备通信,和/或与使得该设备12能与一个或多个其它计算设备进行通信的任何设备(例如网卡,调制解调器等)通信。这种通信可以通过输入/输出(Input/Output,I/O)接口22进行。电子设备12还可以通过网络适配器20与一个或者多个网络(例如局域网(Local Area Network,LAN),广域网(Wide Area Network,WAN)和/或公共网络,例如因特网)通信。如图9所示,网络适配器20通过总线18与电子设备12的其它模块通信。应当明白,尽管图9中未示出,可以结合电子设备12使用其它硬件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理单元、外部磁盘驱动阵列、独立冗余磁盘阵列(Redundant Arrays of Independent Disks,RAID)系统、磁带驱动器以及数据备份存储系统等。
处理单元16通过运行存储在系统存储装置28中的程序,从而执行多种功能应用以及数据处理,例如实现本申请实施例所提供的如下方法之一。
一种设备跨区域访问方法,由目标服务器执行,包括:接收目标设备的跨区域访问请求,并确定所述跨区域访问请求中的IP地址信息;根据所述IP地址信息确定与所述目标设备匹配的跨区域代理服务器的信息;其中,跨区域代理服务器预先设置在与所述目标服务器所在的目标区域不同的代理区域,且所述跨区域代理服务器与所述目标服务器分布式部署;将所述跨区域代理服务器的信息发送至所述目标设备,以使所述目标设备建立与所述跨区域代理服务器的连接。
一种设备跨区域访问方法,由跨区域代理服务器执行,包括:接收目标服务器发送的待访问的目标设备的标识信息;其中,所述跨区域代理服务器预先设置在与所述目标服务器所在的目标区域不同的代理区域,且所述跨区域代理 服务器与所述目标服务器分布式部署;根据所述目标设备的标识信息响应目标设备发送的访问请求,以建立所述目标设备与所述跨区域代理服务器的连接;其中,所述访问请求是目标设备根据所述目标服务器发送的跨区域代理服务器的信息确定。
一种设备跨区域访问方法,由目标设备执行,包括:发送跨区域访问请求至匹配的目标服务器,并接收所述目标服务器返回的跨区域代理服务器的信息;其中,所述跨区域代理服务器的信息是所述目标服务器根据所述跨区域访问请求中的IP地址信息确定,跨区域代理服务器预先设置在与所述目标服务器所在的目标区域不同的代理区域,且所述跨区域代理服务器与所述目标服务器分布式部署;根据所述跨区域代理服务器的信息向所述跨区域代理服务器发送访问请求,以建立与所述跨区域代理服务器的连接。
实施例九
本申请实施例九还提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如本申请实施例所提供的如下方法之一。
一种设备跨区域访问方法,由目标服务器执行,包括:接收目标设备的跨区域访问请求,并确定所述跨区域访问请求中的IP地址信息;根据所述IP地址信息确定与所述目标设备匹配的跨区域代理服务器的信息;其中,跨区域代理服务器预先设置在与所述目标服务器所在的目标区域不同的代理区域,且所述跨区域代理服务器与所述目标服务器分布式部署;将所述跨区域代理服务器的信息发送至所述目标设备,以使所述目标设备建立与所述跨区域代理服务器的连接。
一种设备跨区域访问方法,由跨区域代理服务器执行,包括:接收目标服务器发送的待访问的目标设备的标识信息;其中,所述跨区域代理服务器预先设置在与所述目标服务器所在的目标区域不同的代理区域,且所述跨区域代理服务器与所述目标服务器分布式部署;根据所述目标设备的标识信息响应目标设备发送的访问请求,以建立所述目标设备与所述跨区域代理服务器的连接;其中,所述访问请求是目标设备根据所述目标服务器发送的跨区域代理服务器的信息确定。
一种设备跨区域访问方法,由目标设备执行,包括:发送跨区域访问请求至匹配的目标服务器,并接收所述目标服务器返回的跨区域代理服务器的信息;其中,所述跨区域代理服务器的信息是所述目标服务器根据所述跨区域访问请求中的IP地址信息确定,跨区域代理服务器预先设置在与所述目标服务器所在的目标区域不同的代理区域,且所述跨区域代理服务器与所述目标服务器分布式部署;根据所述跨区域代理服务器的信息向所述跨区域代理服务器发送访问 请求,以建立与所述跨区域代理服务器的连接。
本申请实施例的计算机存储介质,可以采用一个或多个计算机可读的介质的任意组合。计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质。计算机可读存储介质例如可以是但不限于电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的一个例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、RAM、只读存储器(Read-Only Memory,ROM)、可擦式可编程只读存储器(Erasable Programmable Read-Only Memory,EPROM)或闪存、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本文件中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。
计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。
计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于无线、电线、光缆、射频(Radio Frequency,RF)等,或者上述的任意合适的组合。
可以以一种或多种程序设计语言或其组合来编写用于执行本申请操作的计算机程序代码,所述程序设计语言包括面向对象的程序设计语言诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言诸如C语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络包括LAN或WAN连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。

Claims (10)

  1. 一种设备跨区域访问方法,由目标服务器执行,包括:
    接收目标设备的跨区域访问请求,并确定所述跨区域访问请求中的互联网协议IP地址信息;
    根据所述IP地址信息确定与所述目标设备匹配的跨区域代理服务器的信息;其中,所述跨区域代理服务器预先设置在与所述目标服务器所在的目标区域不同的代理区域,且所述跨区域代理服务器与所述目标服务器分布式部署;
    将所述跨区域代理服务器的信息发送至所述目标设备,以使所述目标设备建立与所述跨区域代理服务器的连接。
  2. 根据权利要求1所述的方法,其中,根据所述IP地址信息确定与所述目标设备匹配的跨区域代理服务器的信息,包括:
    根据所述IP地址信息确定所述目标设备的归属地;
    根据所述目标设备的归属地与候选代理服务器的设置区域的距离,从所述候选代理服务器中确定与所述目标设备匹配的跨区域代理服务器。
  3. 根据权利要求1所述的方法,其中,所述跨区域访问请求中还包括目标设备的标识信息;
    在根据所述IP地址信息确定与所述目标设备匹配的跨区域代理服务器的信息之后,还包括:
    将所述目标设备的标识信息发送至所述跨区域代理服务器,以使所述跨区域代理服务器根据所述目标设备的标识信息建立与所述目标设备的连接。
  4. 根据权利要求1所述的方法,其中,所述跨区域访问请求中还包括所述目标设备的跨区域访问时长阈值和所述目标设备的跨区域访问次数阈值中的至少之一;
    在根据所述IP地址信息确定与所述目标设备匹配的跨区域代理服务器的信息之后,还包括:
    将所述目标设备的跨区域访问时长阈值和所述目标设备的跨区域访问次数阈值中的至少之一发送至所述跨区域代理服务器,以使所述跨区域代理服务器根据所述跨区域访问时长阈值和所述目标设备的跨区域访问次数阈值中的至少之一控制所述目标设备的跨区域访问。
  5. 根据权利要求1所述的方法,还包括:
    接收并保存所述跨区域代理服务器完成与所述目标设备的连接后发送的连接记录;
    在接收所述目标设备的跨区域访问请求之后,还包括:
    查询所述连接记录,并根据所述连接记录的查询结果控制所述目标设备的跨区域访问。
  6. 一种设备跨区域访问方法,由跨区域代理服务器执行,包括:
    接收目标服务器发送的待访问的目标设备的标识信息;其中,所述跨区域代理服务器预先设置在与所述目标服务器所在的目标区域不同的代理区域,且所述跨区域代理服务器与所述目标服务器分布式部署;
    根据所述目标设备的标识信息响应所述目标设备发送的访问请求,以建立所述目标设备与所述跨区域代理服务器的连接;其中,所述访问请求是所述目标设备根据所述目标服务器发送的跨区域代理服务器的信息确定。
  7. 根据权利要求6所述的方法,还包括:
    接收与所述目标设备建立连接的客户端发送的目标设备访问请求;其中,所述目标设备访问请求中包括所述目标设备的标识信息;
    根据所述目标设备的标识信息查询所述目标设备与所述跨区域代理服务器的连接结果,并将所述连接结果发送至所述客户端,以使所述客户端根据所述连接结果访问所述目标设备。
  8. 一种设备跨区域访问装置,由目标服务器执行,包括:
    访问请求接收模块,设置为接收目标设备的跨区域访问请求,并确定所述跨区域访问请求中的互联网协议IP地址信息;
    代理服务器确定模块,设置为根据所述IP地址信息确定与所述目标设备匹配的跨区域代理服务器的信息;其中,所述跨区域代理服务器预先设置在与所述目标服务器所在的目标区域不同的代理区域,且所述跨区域代理服务器与所述目标服务器分布式部署;
    代理服务器发送模块,设置为将所述跨区域代理服务器的信息发送至所述目标设备,以使所述目标设备建立与所述跨区域代理服务器的连接。
  9. 一种电子设备,包括:
    至少一个处理器;
    存储装置,设置为存储至少一个程序,
    当所述至少一个程序被所述至少一个处理器执行,使得所述至少一个处理器实现如权利要求1-5中任一所述的设备跨区域访问方法或如权利要求6-7中任一所述的设备跨区域访问方法。
  10. 一种计算机可读存储介质,其上存储有计算机程序,其中,所述计算机程序被处理器执行时实现如权利要求1-5中任一所述的设备跨区域访问方法或如权利要求6-7中任一所述的设备跨区域访问方法。
PCT/CN2020/138734 2020-09-03 2020-12-23 设备跨区域访问方法、装置、电子设备和存储介质 WO2022048069A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP20952310.9A EP4210275A4 (en) 2020-09-03 2020-12-23 METHOD AND DEVICE FOR ACCESS THROUGH A DEVICE CROSS SECTION, ELECTRONIC DEVICE AND STORAGE MEDIUM
US18/024,714 US11838381B2 (en) 2020-09-03 2020-12-23 Device cross-area access method, electronic device, and non-transitory computer-readable storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010916688.3 2020-09-03
CN202010916688.3A CN114221955B (zh) 2020-09-03 2020-09-03 设备跨区域访问方法、装置、电子设备和存储介质

Publications (1)

Publication Number Publication Date
WO2022048069A1 true WO2022048069A1 (zh) 2022-03-10

Family

ID=80492283

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/138734 WO2022048069A1 (zh) 2020-09-03 2020-12-23 设备跨区域访问方法、装置、电子设备和存储介质

Country Status (4)

Country Link
US (1) US11838381B2 (zh)
EP (1) EP4210275A4 (zh)
CN (1) CN114221955B (zh)
WO (1) WO2022048069A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114513695A (zh) * 2022-04-19 2022-05-17 深圳市华曦达科技股份有限公司 一种ott行业视频内容跨区域运营的方法与装置
CN114979099A (zh) * 2022-04-14 2022-08-30 天津车之家软件有限公司 一种目标服务访问方法、模块及系统

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111193614A (zh) * 2019-12-12 2020-05-22 贵阳语玩科技有限公司 连接全球不同地区网络环境的跨区域服务器系统和方法
CN114726850B (zh) * 2022-04-02 2024-01-05 福达新创通讯科技(厦门)有限公司 一种vnc远程访问的方法、装置及存储介质
CN117640667B (zh) * 2023-12-20 2024-07-12 河北网新科技集团股份有限公司 交易信息访问方法及装置、终端设备、存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140082140A1 (en) * 2012-09-17 2014-03-20 Alex Toussaint Cross domain in-browser proxy
CN107360249A (zh) * 2017-08-02 2017-11-17 国电南瑞科技股份有限公司 一种适用于调变一体化系统的广域分布式服务调用方法
CN109150677A (zh) * 2017-06-19 2019-01-04 阿里巴巴集团控股有限公司 跨域访问的处理方法、装置及电子设备
CN109327542A (zh) * 2018-11-19 2019-02-12 网易(杭州)网络有限公司 游戏业务访问响应方法、请求转发方法、连接方法、装置
CN110247944A (zh) * 2018-03-09 2019-09-17 阿里巴巴集团控股有限公司 跨区域的服务调用方法、装置、系统及电子设备
US20200112639A1 (en) * 2018-10-03 2020-04-09 Echo SmartLab LLC. System and method for providing voice communication between sender users, recipient users and external network entities

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7630986B1 (en) * 1999-10-27 2009-12-08 Pinpoint, Incorporated Secure data interchange
WO2002103997A2 (en) * 2001-06-14 2002-12-27 Dizpersion Group, L.L.C. Method and system for providing network based target advertising
US7660296B2 (en) * 2005-12-30 2010-02-09 Akamai Technologies, Inc. Reliable, high-throughput, high-performance transport and routing mechanism for arbitrary data flows
US11265673B2 (en) * 2012-06-15 2022-03-01 Qualcomm Incorporated Client access to mobile location services
US10419890B2 (en) * 2012-06-15 2019-09-17 Qualcomm Incorporated Client access to mobile location services
US8824751B2 (en) * 2013-01-07 2014-09-02 MTN Satellite Communications Digital photograph group editing and access
US10333789B1 (en) * 2013-12-18 2019-06-25 Amazon Technologies, Inc. Client-directed placement of remotely-configured service instances
CN104158891B (zh) * 2014-08-21 2016-02-03 腾讯科技(深圳)有限公司 一种跨区域数据传输方法、装置、系统及服务器
EP3269159A4 (en) * 2015-03-09 2019-01-16 OnePin, Inc. AUTOMATIC NETWORK MONITORING BASED ON EVENTS
US10382461B1 (en) * 2016-05-26 2019-08-13 Amazon Technologies, Inc. System for determining anomalies associated with a request
US10587449B2 (en) * 2016-07-18 2020-03-10 Avaya Inc. System and method to use location-aware DNS responses as input to media relay selection for WebRTC
US9924340B1 (en) * 2016-12-06 2018-03-20 Verizon Patent And Licensing Inc. Toll-free data for a targeted geographic region
EP3647984A1 (en) * 2018-10-31 2020-05-06 Hewlett-Packard Development Company, L.P. Region restricted data routing

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140082140A1 (en) * 2012-09-17 2014-03-20 Alex Toussaint Cross domain in-browser proxy
CN109150677A (zh) * 2017-06-19 2019-01-04 阿里巴巴集团控股有限公司 跨域访问的处理方法、装置及电子设备
CN107360249A (zh) * 2017-08-02 2017-11-17 国电南瑞科技股份有限公司 一种适用于调变一体化系统的广域分布式服务调用方法
CN110247944A (zh) * 2018-03-09 2019-09-17 阿里巴巴集团控股有限公司 跨区域的服务调用方法、装置、系统及电子设备
US20200112639A1 (en) * 2018-10-03 2020-04-09 Echo SmartLab LLC. System and method for providing voice communication between sender users, recipient users and external network entities
CN109327542A (zh) * 2018-11-19 2019-02-12 网易(杭州)网络有限公司 游戏业务访问响应方法、请求转发方法、连接方法、装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4210275A4

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114979099A (zh) * 2022-04-14 2022-08-30 天津车之家软件有限公司 一种目标服务访问方法、模块及系统
CN114979099B (zh) * 2022-04-14 2024-02-23 天津车之家软件有限公司 一种目标服务访问方法、模块及系统
CN114513695A (zh) * 2022-04-19 2022-05-17 深圳市华曦达科技股份有限公司 一种ott行业视频内容跨区域运营的方法与装置
CN114513695B (zh) * 2022-04-19 2022-06-17 深圳市华曦达科技股份有限公司 一种ott行业视频内容跨区域运营的方法与装置

Also Published As

Publication number Publication date
CN114221955B (zh) 2023-01-20
EP4210275A1 (en) 2023-07-12
US11838381B2 (en) 2023-12-05
US20230319157A1 (en) 2023-10-05
CN114221955A (zh) 2022-03-22
EP4210275A4 (en) 2024-02-21

Similar Documents

Publication Publication Date Title
WO2022048069A1 (zh) 设备跨区域访问方法、装置、电子设备和存储介质
US10958524B2 (en) Method for generating network slice template and for applying network slice template, and apparatus
US9002932B2 (en) Cloud computing access gateway and method for providing a user terminal access to a cloud provider
WO2021135299A1 (zh) 一种设备配网绑定方法、系统、移动终端及存储介质
CN106888233B (zh) 数据更新系统及方法
US20170230308A1 (en) Cloud-based service resource provisioning based on network characteristics
JP2019092147A (ja) 情報交換方法、装置、オーディオ端末及びコンピュータ可読記憶媒体
US20130346591A1 (en) Clientless Cloud Computing
CN108540674B (zh) 自动化测试方法、装置、计算机设备以及存储介质
US20070282964A1 (en) Method and apparatus for processing remote shell commands
US12041688B2 (en) Screen projection method and system
US10924590B1 (en) Virtual workspace experience visualization and optimization
CN115114044B (zh) 消息推送方法、装置、设备和介质
KR20210130225A (ko) 서비스 요청 처리 방법 및 관련 디바이스
CN110730197B (zh) 一种服务发现方法和系统
US20230254381A1 (en) Service Request Handling
CN111930625B (zh) 基于云服务平台的日志获取方法、装置及系统
JP2013535736A (ja) 端末管理パッケージを提供する装置及び前記端末管理パッケージを受信する方法
WO2022073196A1 (zh) 信息处理方法、装置及存储介质
CN113422791B (zh) 云服务配置方法和装置、电子设备以及计算机可读存储介质
CN109327517B (zh) 获取无线接入点网络状态的方法及设备
CN111629421B (zh) 一种用于管理无线接入点的方法与设备
US11811596B1 (en) System and method for automating the remote provisioning of data processing systems
CN114827283B (zh) 资源访问方法、装置、介质及机器人
CN112055083B (zh) 请求处理方法、装置、电子设备和介质

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2020952310

Country of ref document: EP

Effective date: 20230403