[go: up one dir, main page]

CN108337148A - Method and device for obtaining information - Google Patents

Method and device for obtaining information Download PDF

Info

Publication number
CN108337148A
CN108337148A CN201810121458.0A CN201810121458A CN108337148A CN 108337148 A CN108337148 A CN 108337148A CN 201810121458 A CN201810121458 A CN 201810121458A CN 108337148 A CN108337148 A CN 108337148A
Authority
CN
China
Prior art keywords
information
virtual private
address
tunnel
private networks
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN201810121458.0A
Other languages
Chinese (zh)
Other versions
CN108337148B (en
Inventor
雷思源
周磊
杨光
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201810121458.0A priority Critical patent/CN108337148B/en
Publication of CN108337148A publication Critical patent/CN108337148A/en
Application granted granted Critical
Publication of CN108337148B publication Critical patent/CN108337148B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4641Virtual LANs, VLANs, e.g. virtual private networks [VPN]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4633Interconnection of networks using encapsulation techniques, e.g. tunneling

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Small-Scale Networks (AREA)

Abstract

本申请实施例公开了用于获取信息的方法及装置。该方法的一具体实施方式包括:首先接收通过虚拟私有网络隧道发来的信息查询请求信息;然后,查询隧道表中对应信息查询请求信息中目标地址的虚拟私有网络隧道的第一编号,并通过第一编号对应的虚拟私有网络隧道发送信息查询请求信息;之后,接收对应上述信息查询请求信息的结果信息;最后,查询隧道表中对应结果信息中更新目标地址的虚拟私有网络隧道的第二编号,并通过上述第二编号对应的虚拟私有网络隧道发送上述结果信息。该实施方式实现了在虚拟私有网络环境下,未建立虚拟私有网络隧道的终端设备之间的信息传输,提高了虚拟私有网络中信息的传输效率和利用率。

The embodiment of the present application discloses a method and a device for acquiring information. A specific implementation of the method includes: first receiving the information query request information sent through the virtual private network tunnel; then, querying the first number of the virtual private network tunnel corresponding to the target address in the information query request information in the tunnel table, and passing The virtual private network tunnel corresponding to the first number sends information query request information; afterward, receiving the result information corresponding to the above information query request information; finally, querying the second number of the virtual private network tunnel of the target address in the corresponding result information in the query tunnel table , and send the result information through the virtual private network tunnel corresponding to the second number. This embodiment realizes information transmission between terminal devices that have not established virtual private network tunnels in the virtual private network environment, and improves the transmission efficiency and utilization rate of information in the virtual private network.

Description

用于获取信息的方法及装置Method and device for obtaining information

技术领域technical field

本申请实施例涉及计算机技术领域,具体涉及互联网技术领域,尤其涉及用于获取信息的方法及装置。The embodiments of the present application relate to the field of computer technology, specifically to the field of Internet technology, and in particular to methods and devices for obtaining information.

背景技术Background technique

云技术(Cloud technology)是基于云计算模式应用的网络技术、信息技术、整合技术、管理平台技术、应用技术等的总称,可以组成资源池,按需所用,灵活便利。通过云技术构建的网络可以成为云网络,接入云网络的设备需要通过虚拟私有网络(VirtualPrivate Network,简称VPN)隧道进行信息的传递。在云网络中,进行信息传递的两个设备之间首先要建立虚拟私有网络隧道,该虚拟私有网络隧道作为这两个设备之间的信息通道,具有较好的安全性。Cloud technology (Cloud technology) is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on cloud computing model applications. It can form a resource pool and be used on demand, which is flexible and convenient. A network constructed through cloud technology can become a cloud network, and devices connected to the cloud network need to transmit information through a virtual private network (Virtual Private Network, VPN for short) tunnel. In the cloud network, a virtual private network tunnel must first be established between two devices for information transmission. The virtual private network tunnel serves as an information channel between the two devices and has better security.

发明内容Contents of the invention

本申请实施例的目的在于提出了用于获取信息的方法及装置。The purpose of the embodiments of the present application is to propose a method and device for acquiring information.

第一方面,本申请实施例提供了一种用于获取信息的方法,该方法包括:接收通过虚拟私有网络隧道发来的信息查询请求信息,上述信息查询请求信息包括标题信息、源地址和目标地址;从上述信息查询请求信息中提取目标地址,查询隧道表中对应上述目标地址的虚拟私有网络隧道的第一编号,并通过上述第一编号对应的虚拟私有网络隧道发送上述信息查询请求信息,上述隧道表用于表征虚拟私有网络隧道的编号与地址之间的对应关系;接收通过上述第一编号对应的虚拟私有网络隧道发来的对应上述信息查询请求信息的结果信息,上述结果信息包括目标信息、更新目标地址和更新源地址;查询隧道表中对应上述更新目标地址的虚拟私有网络隧道的第二编号,并通过上述第二编号对应的虚拟私有网络隧道发送上述结果信息。In the first aspect, the embodiment of the present application provides a method for obtaining information, the method includes: receiving information query request information sent through a virtual private network tunnel, the information query request information includes title information, source address and target address; extracting the target address from the above-mentioned information query request information, querying the first number of the virtual private network tunnel corresponding to the above-mentioned target address in the tunnel table, and sending the above-mentioned information query request information through the virtual private network tunnel corresponding to the above-mentioned first number, The above-mentioned tunnel table is used to represent the corresponding relationship between the number and the address of the virtual private network tunnel; receive the result information corresponding to the above-mentioned information query request information sent by the virtual private network tunnel corresponding to the above-mentioned first number, and the above-mentioned result information includes the target Information, update target address and update source address; query the second number of the virtual private network tunnel corresponding to the above update target address in the tunnel table, and send the above result information through the virtual private network tunnel corresponding to the above second number.

在一些实施例中,上述方法还包括构建隧道表的步骤,上述构建隧道表的步骤包括:对于至少一个虚拟私有网络隧道中的每个虚拟私有网络隧道,为该虚拟私有网络隧道设置编号,并接收该虚拟私有网络隧道对端发来的地址;建立每个编号和对应该编号的地址之间的第一对应关系,并通过第一对应关系建立隧道表。In some embodiments, the above method further includes the step of constructing a tunnel table, and the above step of constructing the tunnel table includes: for each virtual private network tunnel in at least one virtual private network tunnel, setting a number for the virtual private network tunnel, and Receive the address sent from the opposite end of the virtual private network tunnel; establish a first correspondence between each number and the address corresponding to the number, and establish a tunnel table through the first correspondence.

在一些实施例中,上述方法还包括构建信息查询表的步骤,上述构建信息查询表的步骤包括:接收信息共享请求,上述信息共享请求包括共享信息的标题信息和共享信息对应的地址;建立每个标题信息和对应该标题信息的地址之间的第二对应关系,并通过第二对应关系建立信息查询表。In some embodiments, the above method further includes the step of constructing an information query table. The above step of constructing an information query table includes: receiving an information sharing request, and the above information sharing request includes the title information of the shared information and the address corresponding to the shared information; A title information and a second correspondence between the address corresponding to the title information, and establish an information lookup table through the second correspondence.

在一些实施例中,上述方法还包括:通过虚拟私有网络隧道发送上述信息查询表。In some embodiments, the above method further includes: sending the above information lookup table through a virtual private network tunnel.

第二方面,本申请实施例提供了一种用于获取信息的方法,该方法包括:接收信息获取请求信息,上述信息获取请求信息用于指示获取虚拟私有网络上指定的目标信息;响应于信息查询表中存在上述目标信息的标题信息,将上述信息查询表中对应上述目标信息的地址设置为目标地址,并将本地地址设置为源地址,上述信息查询表用于表征标题信息和对应该标题信息的地址之间的对应关系;将上述标题信息、源地址和目标地址封装成信息查询请求信息,并通过虚拟私有网络隧道发送上述信息查询请求信息;接收通过上述虚拟私有网络隧道发来的对应上述信息查询请求信息的结果信息,并从上述结果信息中解析出目标信息。In the second aspect, the embodiment of the present application provides a method for obtaining information, the method includes: receiving information obtaining request information, the above information obtaining request information is used to indicate to obtain the specified target information on the virtual private network; responding to the information The title information of the above-mentioned target information exists in the look-up table, and the address corresponding to the above-mentioned target information in the above-mentioned information look-up table is set as the target address, and the local address is set as the source address, and the above-mentioned information look-up table is used to represent the title information and correspond to the title information The corresponding relationship between the addresses of the information; encapsulate the above title information, source address and target address into information query request information, and send the above information query request information through the virtual private network tunnel; receive the corresponding information sent through the above virtual private network tunnel The above information queries the result information of the requested information, and parses out the target information from the above result information.

第三方面,本申请实施例提供了一种用于获取信息的方法,该方法包括:接收通过虚拟私有网络隧道发来的信息查询请求信息,上述信息查询请求信息包括标题信息、源地址和目标地址;从上述信息查询请求信息中解析出标题信息、源地址和目标地址,并将源地址和目标地址分别设置为更新目标地址和更新源地址;将上述标题信息对应的目标信息、更新目标地址和更新源地址封装成结果信息,并通过上述虚拟私有网络隧道发送上述结果信息。In the third aspect, the embodiment of the present application provides a method for obtaining information, the method includes: receiving information query request information sent through a virtual private network tunnel, the information query request information includes title information, source address and target address; analyze the title information, source address and target address from the above information query request information, and set the source address and target address as the update target address and update source address respectively; set the target information corresponding to the above title information, update target address and the update source address are encapsulated into result information, and the above result information is sent through the virtual private network tunnel.

在一些实施例中,上述方法还包括:通过上述虚拟私有网络隧道发送信息共享请求,上述信息共享请求包括共享信息的标题信息和共享信息对应的地址。In some embodiments, the method further includes: sending an information sharing request through the virtual private network tunnel, where the information sharing request includes title information of the shared information and an address corresponding to the shared information.

在一些实施例中,上述方法还包括:为共享信息设置权限,以及,上述将上述标题信息对应的目标信息、更新目标地址和更新源地址封装成结果信息包括:响应于上述源地址在设定地址范围内,则将上述标题信息对应的目标信息、更新目标地址和更新源地址封装成结果信息。In some embodiments, the above-mentioned method further includes: setting permissions for shared information, and the above-mentioned encapsulation of the target information corresponding to the above-mentioned title information, the update target address, and the update source address into result information includes: responding to the above-mentioned source address in setting Within the address range, the target information corresponding to the above title information, the update target address and the update source address are encapsulated into result information.

第四方面,本申请实施例提供了一种用于获取信息的装置,该装置包括:信息查询请求信息接收单元,用于接收通过虚拟私有网络隧道发来的信息查询请求信息,上述信息查询请求信息包括标题信息、源地址和目标地址;信息查询请求信息发送单元,用于从上述信息查询请求信息中提取目标地址,查询隧道表中对应上述目标地址的虚拟私有网络隧道的第一编号,并通过上述第一编号对应的虚拟私有网络隧道发送上述信息查询请求信息,上述隧道表用于表征虚拟私有网络隧道的编号与地址之间的对应关系;结果信息接收单元,用于接收通过上述第一编号对应的虚拟私有网络隧道发来的对应上述信息查询请求信息的结果信息,上述结果信息包括目标信息、更新目标地址和更新源地址;结果信息发送单元,用于查询隧道表中对应上述更新目标地址的虚拟私有网络隧道的第二编号,并通过上述第二编号对应的虚拟私有网络隧道发送上述结果信息。In a fourth aspect, the embodiment of the present application provides a device for obtaining information, the device includes: an information query request information receiving unit, configured to receive information query request information sent through a virtual private network tunnel, the above information query request The information includes title information, source address and target address; the information query request information sending unit is used to extract the target address from the above information query request information, query the first number of the virtual private network tunnel corresponding to the above target address in the tunnel table, and The above-mentioned information query request information is sent through the virtual private network tunnel corresponding to the above-mentioned first number, and the above-mentioned tunnel table is used to represent the corresponding relationship between the number and the address of the virtual private network tunnel; the result information receiving unit is used to receive the above-mentioned first number The result information corresponding to the above information query request information sent by the virtual private network tunnel corresponding to the number, the above result information includes target information, update target address and update source address; the result information sending unit is used to query the corresponding update target in the tunnel table The second number of the virtual private network tunnel of the address, and send the above result information through the virtual private network tunnel corresponding to the second number.

在一些实施例中,上述装置还包括隧道表构建单元,用于构建隧道表,上述隧道表构建单元包括:隧道编号设备子单元,对于至少一个虚拟私有网络隧道中的每个虚拟私有网络隧道,用于为该虚拟私有网络隧道设置编号,并接收该虚拟私有网络隧道对端发来的地址;隧道表构建子单元,用于建立每个编号和对应该编号的地址之间的第一对应关系,并通过第一对应关系建立隧道表。In some embodiments, the above-mentioned apparatus further includes a tunnel table construction unit for constructing a tunnel table, and the above-mentioned tunnel table construction unit includes: a tunnel numbering device subunit, for each virtual private network tunnel in at least one virtual private network tunnel, It is used to set the number for the virtual private network tunnel and receive the address sent by the peer end of the virtual private network tunnel; the tunnel table construction subunit is used to establish the first correspondence between each number and the address corresponding to the number , and establish a tunnel table through the first correspondence.

在一些实施例中,上述装置还包括信息查询表构建单元,用于构建信息查询表,上述信息查询表构建单元包括:信息共享请求接收子单元,用于接收信息共享请求,上述信息共享请求包括共享信息的标题信息和共享信息对应的地址;信息查询表构建子单元,用于建立每个标题信息和对应该标题信息的地址之间的第二对应关系,并通过第二对应关系建立信息查询表。In some embodiments, the above device further includes an information lookup table construction unit for building an information lookup table, the above information lookup table construction unit includes: an information sharing request receiving subunit, for receiving an information sharing request, the above information sharing request includes The title information of the shared information and the address corresponding to the shared information; the information query table construction subunit is used to establish a second correspondence between each title information and the address corresponding to the title information, and establish an information query through the second correspondence surface.

在一些实施例中,上述装置还包括:信息查询表发送单元,用于通过虚拟私有网络隧道发送上述信息查询表。In some embodiments, the above-mentioned apparatus further includes: an information look-up table sending unit, configured to send the above-mentioned information look-up table through a virtual private network tunnel.

第五方面,本申请实施例提供了一种用于获取信息的装置,该装置包括:信息获取请求信息接收单元,用于接收信息获取请求信息,上述信息获取请求信息用于指示获取虚拟私有网络上指定的目标信息;地址设置单元,响应于信息查询表中存在上述目标信息的标题信息,用于将上述信息查询表中对应上述目标信息的地址设置为目标地址,并将本地地址设置为源地址,上述信息查询表用于表征标题信息和对应该标题信息的地址之间的对应关系;第一信息发送单元,用于将上述标题信息、源地址和目标地址封装成信息查询请求信息,并通过虚拟私有网络隧道发送上述信息查询请求信息;第一信息接收单元,用于接收通过上述虚拟私有网络隧道发来的对应上述信息查询请求信息的结果信息,并从上述结果信息中解析出目标信息。In the fifth aspect, the embodiment of the present application provides a device for obtaining information, the device comprising: an information obtaining request information receiving unit, configured to receive information obtaining request information, the information obtaining request information is used to instruct to obtain a virtual private network The target information specified above; the address setting unit, in response to the title information of the above-mentioned target information in the information look-up table, is used to set the address corresponding to the above-mentioned target information in the above-mentioned information look-up table as the target address, and set the local address as the source address, the above-mentioned information query table is used to represent the corresponding relationship between the title information and the address corresponding to the title information; the first information sending unit is used to encapsulate the above-mentioned title information, source address and target address into information query request information, and Send the above-mentioned information query request information through the virtual private network tunnel; the first information receiving unit is used to receive the result information corresponding to the above-mentioned information query request information sent through the above-mentioned virtual private network tunnel, and parse out the target information from the above-mentioned result information .

第六方面,本申请实施例提供了一种用于获取信息的装置,该装置包括:第二信息接收单元,用于接收通过虚拟私有网络隧道发来的信息查询请求信息,上述信息查询请求信息包括标题信息、源地址和目标地址;地址修改单元,用于从上述信息查询请求信息中解析出标题信息、源地址和目标地址,并将源地址和目标地址分别设置为更新目标地址和更新源地址;第二信息发送单元,用于将上述标题信息对应的目标信息、更新目标地址和更新源地址封装成结果信息,并通过上述虚拟私有网络隧道发送上述结果信息。In the sixth aspect, the embodiment of the present application provides a device for obtaining information, the device includes: a second information receiving unit, configured to receive information query request information sent through a virtual private network tunnel, the information query request information Including title information, source address and target address; the address modification unit is used to resolve the title information, source address and target address from the above information query request information, and set the source address and target address as the update target address and update source respectively address; a second information sending unit, configured to encapsulate the target information, update target address, and update source address corresponding to the above-mentioned title information into result information, and send the above-mentioned result information through the above-mentioned virtual private network tunnel.

在一些实施例中,上述装置还包括:信息共享请求发送单元,用于通过上述虚拟私有网络隧道发送信息共享请求,上述信息共享请求包括共享信息的标题信息和共享信息对应的地址。In some embodiments, the above-mentioned apparatus further includes: an information sharing request sending unit, configured to send an information sharing request through the above-mentioned virtual private network tunnel, and the above-mentioned information sharing request includes title information of the shared information and an address corresponding to the shared information.

在一些实施例中,上述装置还包括:为共享信息设置权限,以及,上述第二信息发送单元包括:响应于上述源地址在设定地址范围内,则将上述标题信息对应的目标信息、更新目标地址和更新源地址封装成结果信息。In some embodiments, the above-mentioned device further includes: setting permissions for shared information, and the above-mentioned second information sending unit includes: in response to the above-mentioned source address being within the set address range, updating the target information corresponding to the above-mentioned title information The destination address and update source address are encapsulated into result information.

第七方面,本申请实施例提供了一种服务器,包括:一个或多个处理器;存储器,用于存储一个或多个程序,当上述一个或多个程序被上述一个或多个处理器执行时,使得上述一个或多个处理器执行上述第一方面的用于获取信息的方法。In a seventh aspect, the embodiment of the present application provides a server, including: one or more processors; a memory for storing one or more programs, when the above one or more programs are executed by the above one or more processors , causing the one or more processors to execute the method for acquiring information in the first aspect above.

第八方面,本申请实施例提供了一种计算机可读介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现上述第一方面的用于获取信息的方法。In an eighth aspect, the embodiment of the present application provides a computer-readable medium, on which a computer program is stored, wherein, when the program is executed by a processor, the above-mentioned method for obtaining information in the first aspect is implemented.

本申请实施例提供的用于获取信息的方法及装置,首先接收通过虚拟私有网络隧道发来的信息查询请求信息;然后,查询隧道表中对应信息查询请求信息中目标地址的虚拟私有网络隧道的第一编号,并通过第一编号对应的虚拟私有网络隧道发送信息查询请求信息;之后,接收对应上述信息查询请求信息的结果信息;最后,查询隧道表中对应结果信息中更新目标地址的虚拟私有网络隧道的第二编号,并通过上述第二编号对应的虚拟私有网络隧道发送上述结果信息。本申请方法实现了在虚拟私有网络环境下,未建立虚拟私有网络隧道的终端设备之间的信息传输,提高了虚拟私有网络中信息的传输效率和利用率。The method and device for obtaining information provided by the embodiments of the present application firstly receive the information query request information sent through the virtual private network tunnel; then, query the virtual private network tunnel corresponding to the target address in the information query request information in the tunnel table The first number, and send information query request information through the virtual private network tunnel corresponding to the first number; after that, receive the result information corresponding to the above information query request information; finally, update the virtual private address of the target address in the corresponding result information in the query tunnel table The second number of the network tunnel, and send the above result information through the virtual private network tunnel corresponding to the second number. The method of the present application realizes the information transmission between the terminal devices that have not established virtual private network tunnels in the virtual private network environment, and improves the transmission efficiency and utilization rate of information in the virtual private network.

附图说明Description of drawings

通过阅读参照以下附图所作的对非限制性实施例所作的详细描述,本申请的其它特征、目的和优点将会变得更明显:Other characteristics, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:

图1是本申请可以应用于其中的示例性系统架构图;FIG. 1 is an exemplary system architecture diagram to which the present application can be applied;

图2是根据本申请的用于获取信息的方法的一个实施例的流程图;FIG. 2 is a flowchart of an embodiment of a method for obtaining information according to the present application;

图3是根据本申请的用于获取信息的方法的另一个实施例的流程图;FIG. 3 is a flowchart of another embodiment of a method for obtaining information according to the present application;

图4是根据本申请的用于获取信息的方法的又一个实施例的流程图;FIG. 4 is a flowchart of another embodiment of a method for obtaining information according to the present application;

图5是根据本申请的用于获取信息的方法的一个应用场景的示意图;FIG. 5 is a schematic diagram of an application scenario of a method for obtaining information according to the present application;

图6是根据本申请的用于获取信息的装置的一个实施例的结构示意图;Fig. 6 is a schematic structural diagram of an embodiment of a device for obtaining information according to the present application;

图7是根据本申请的用于获取信息的装置的另一个实施例的结构示意图;Fig. 7 is a schematic structural diagram of another embodiment of a device for obtaining information according to the present application;

图8是根据本申请的用于获取信息的装置的又一个实施例的结构示意图;Fig. 8 is a schematic structural diagram of another embodiment of a device for obtaining information according to the present application;

图9是适于用来实现本申请实施例的服务器的计算机系统的结构示意图。FIG. 9 is a schematic structural diagram of a computer system suitable for implementing the server of the embodiment of the present application.

具体实施方式Detailed ways

下面结合附图和实施例对本申请作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释相关发明,而非对该发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与有关发明相关的部分。The application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain related inventions, rather than to limit the invention. It should also be noted that, for the convenience of description, only the parts related to the related invention are shown in the drawings.

需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本申请。It should be noted that, in the case of no conflict, the embodiments in the present application and the features in the embodiments can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and embodiments.

图1示出了可以应用本申请的用于获取信息的方法或用于获取信息的装置的实施例的示例性系统架构100。FIG. 1 shows an exemplary system architecture 100 to which embodiments of the method for obtaining information or the device for obtaining information of the present application can be applied.

如图1所示,系统架构100可以包括终端设备101、102、103,网络104和服务器105。网络104用以在终端设备101、102、103和服务器105之间提供通信链路的介质。网络104可以包括各种连接类型,例如有线、无线通信链路或者光纤电缆等等。As shown in FIG. 1 , a system architecture 100 may include terminal devices 101 , 102 , 103 , a network 104 and a server 105 . The network 104 is used as a medium for providing communication links between the terminal devices 101 , 102 , 103 and the server 105 . Network 104 may include various connection types, such as wires, wireless communication links, or fiber optic cables, among others.

用户可以使用终端设备101、102、103通过网络104与服务器105交互,以接收或发送消息等。终端设备101、102、103上可以安装有各种信息处理应用,例如网页浏览器应用、信息查询类应用、即时通信工具、邮箱客户端、社交平台软件等。Users can use terminal devices 101 , 102 , 103 to interact with server 105 via network 104 to receive or send messages and the like. Various information processing applications can be installed on the terminal devices 101 , 102 , and 103 , such as web browser applications, information query applications, instant messaging tools, email clients, social platform software, and the like.

终端设备101、102、103可以是具有显示屏并且支持信息传输的各种电子设备,包括但不限于智能手机、平板电脑、膝上型便携计算机和台式计算机等等。The terminal devices 101, 102, 103 may be various electronic devices with display screens and supporting information transmission, including but not limited to smart phones, tablet computers, laptop computers, desktop computers and the like.

服务器105可以是提供各种服务的服务器,例如对终端设备101、102、103通过虚拟私有网络隧道发来的信息查询请求信息进行数据处理的服务器。服务器可以对接收到的信息查询请求信息等数据进行分析等处理,并将处理结果反馈给终端设备。The server 105 may be a server that provides various services, for example, a server that performs data processing on the information query request information sent by the terminal devices 101, 102, 103 through the virtual private network tunnel. The server can analyze and process the received data such as information inquiry request information, and feed back the processing result to the terminal device.

需要说明的是,本申请实施例所提供的用于获取信息的方法可以由终端设备101、102、103单独执行,或者也可以由终端设备101、102、103和服务器105共同执行。相应地,用于获取信息的装置可以设置于终端设备101、102、103中,也可以设置于服务器105中。It should be noted that the method for obtaining information provided by the embodiment of the present application may be executed by the terminal devices 101 , 102 , 103 alone, or jointly executed by the terminal devices 101 , 102 , 103 and the server 105 . Correspondingly, the means for obtaining information may be set in the terminal devices 101 , 102 , 103 or in the server 105 .

应该理解,图1中的终端设备、网络和服务器的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、网络和服务器。It should be understood that the numbers of terminal devices, networks and servers in Fig. 1 are only illustrative. According to the implementation needs, there can be any number of terminal devices, networks and servers.

继续参考图2,示出了根据本申请的用于获取信息的方法的一个实施例的流程200。该用于获取信息的方法包括以下步骤:Continuing to refer to FIG. 2 , a flow 200 of an embodiment of the method for obtaining information according to the present application is shown. The method for obtaining information includes the following steps:

步骤201,接收通过虚拟私有网络隧道发来的信息查询请求信息。Step 201, receiving information query request information sent through a virtual private network tunnel.

在本实施例中,用于获取信息的方法运行于其上的电子设备(例如图1所示的服务器105)可以通过有线连接方式或者无线连接方式接收通过虚拟私有网络隧道发来的信息查询请求信息,其中,上述信息查询请求信息包括标题信息、源地址和目标地址。需要指出的是,上述无线连接方式可以包括但不限于3G/4G连接、WiFi连接、蓝牙连接、WiMAX连接、Zigbee连接、UWB(ultra wideband)连接、以及其他现在已知或将来开发的无线连接方式。In this embodiment, the electronic device (such as the server 105 shown in FIG. 1 ) on which the method for obtaining information runs can receive the information query request sent through the virtual private network tunnel through a wired connection or a wireless connection. information, wherein the above-mentioned information query request information includes title information, source address and target address. It should be pointed out that the above wireless connection methods may include but not limited to 3G/4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods known or developed in the future .

现有的云网络中,云网络中的虚拟私有网络网关只能连接虚拟私有网络隧道对端的一个虚拟私有网络网关。当云网络中的某一终端设备与多个云网络中的其他终端设备建立虚拟私有网络连接时,该终端设备上就需要建立多个相对独立的虚拟私有网络隧道,即,该终端设备上需要建立多个虚拟私有网络网关。并且,云网络中信息的传递是通过虚拟私有网络隧道的一端到达另一端。如此,使得云网络中终端设备只能获取到与之建立虚拟私有网络隧道的终端设备上信息,而无法获取到没有建立虚拟私有网络隧道的终端设备上的信息,导致云网络中终端设备上信息的利用率不高。In the existing cloud network, the virtual private network gateway in the cloud network can only connect to one virtual private network gateway at the opposite end of the virtual private network tunnel. When a terminal device in the cloud network establishes a virtual private network connection with other terminal devices in multiple cloud networks, multiple relatively independent virtual private network tunnels need to be established on the terminal device, that is, the terminal device needs to Create multiple virtual private network gateways. Moreover, the transmission of information in the cloud network is through one end of the virtual private network tunnel to the other end. In this way, the terminal device in the cloud network can only obtain the information on the terminal device with which the virtual private network tunnel is established, but cannot obtain the information on the terminal device that has not established a virtual private network tunnel, resulting in the information on the terminal device in the cloud network The utilization rate is not high.

为此,本申请可以在服务器105上设置虚拟私有网络网关,该虚拟私有网络网关可以与云网络中的多个终端设备通过虚拟私有网络隧道进行信息传输。并通过虚拟私有网络隧道接收云网络中其他终端设备发来的信息查询请求信息。其中,信息查询请求信息可以包括标题信息、源地址和目标地址。标题信息为发送信息查询请求信息的终端设备想要获取的目标信息的标题;源地址为发送信息查询请求信息的终端设备在云网络中的地址;目标地址为目标信息在云网络中的地址。由于目标信息通常位于某一云网络中的终端设备上,因此,目标地址可以与目标信息所在的终端设备在云网络中的地址相同。To this end, the present application can set a virtual private network gateway on the server 105, and the virtual private network gateway can perform information transmission with multiple terminal devices in the cloud network through a virtual private network tunnel. And receive information query request information sent by other terminal devices in the cloud network through the virtual private network tunnel. Wherein, the information query request information may include title information, source address and target address. The title information is the title of the target information that the terminal device that sends the information query request information wants to obtain; the source address is the address in the cloud network of the terminal device that sends the information query request message; the target address is the address of the target information in the cloud network. Since the target information is usually located on a terminal device in a certain cloud network, the target address may be the same as the address in the cloud network of the terminal device where the target information is located.

在本实施例的一些可选的实现方式中,上述方法还可以包括构建隧道表的步骤,上述构建隧道表的步骤可以包括以下步骤:In some optional implementations of this embodiment, the above method may also include the step of constructing a tunnel table, and the above step of constructing a tunnel table may include the following steps:

第一步,对于至少一个虚拟私有网络隧道中的每个虚拟私有网络隧道,为该虚拟私有网络隧道设置编号,并接收该虚拟私有网络隧道对端发来的地址。In the first step, for each virtual private network tunnel in at least one virtual private network tunnel, set a number for the virtual private network tunnel, and receive an address sent from the opposite end of the virtual private network tunnel.

服务器105上设置的虚拟私有网络网关可以与云网络中的其他终端设备建立虚拟私有网络隧道。对于每个虚拟私有网络隧道,服务器105可以为该虚拟私有网络隧道设置编号。之后,该虚拟私有网络隧道对端的终端设备可以发送其在云网络中的地址给服务器105。如此,服务器105可以得到每个虚拟私有网络隧道对端的终端设备的地址。The virtual private network gateway set on the server 105 can establish virtual private network tunnels with other terminal devices in the cloud network. For each virtual private network tunnel, the server 105 can set a number for the virtual private network tunnel. Afterwards, the terminal device at the opposite end of the virtual private network tunnel can send its address in the cloud network to the server 105 . In this way, the server 105 can obtain the address of the terminal device at the opposite end of each virtual private network tunnel.

第二步,建立每个编号和对应该编号的地址之间的第一对应关系,并通过第一对应关系建立隧道表。In the second step, a first corresponding relationship between each number and the address corresponding to the number is established, and a tunnel table is established through the first corresponding relationship.

得到每个虚拟私有网络隧道对端的终端设备的地址后,可以建立每个编号和对应该编号的地址之间的第一对应关系。之后,可以通过第一对应关系建立包含编号和对应编号的地址之间的第一对应关系的隧道表。得到上述的隧道表后,服务器105可以实现通过不同的虚拟私有网络隧道与对应的终端设备进行通信。当信息需要在没有建立虚拟私有网络隧道的不同终端设备之间传输时,服务器105接收该信息,并根据信息中包含的地址将信息通过对应的虚拟私有网络隧道传输到对应的终端设备。即,服务器105可以实现信息在云网络中的中继传输功能。After obtaining the address of the terminal device at the opposite end of each virtual private network tunnel, a first correspondence between each number and the address corresponding to the number can be established. Afterwards, a tunnel table including the first correspondence between numbers and addresses corresponding to the numbers may be established through the first correspondence. After obtaining the above tunnel table, the server 105 can communicate with corresponding terminal devices through different virtual private network tunnels. When information needs to be transmitted between different terminal devices that have not established a VPN tunnel, the server 105 receives the information, and transmits the information to the corresponding terminal device through the corresponding virtual private network tunnel according to the address contained in the information. That is, the server 105 can realize the relay transmission function of information in the cloud network.

在本实施例的一些可选的实现方式中,上述方法还可以包括构建信息查询表的步骤,上述构建信息查询表的步骤可以包括以下步骤:In some optional implementations of this embodiment, the above method may also include the step of constructing an information lookup table, and the above step of constructing an information lookup table may include the following steps:

第一步,接收信息共享请求。The first step is to receive an information sharing request.

由上述描述可知,现有的云网络中,终端设备之间的信息利用率不高。为此,服务器105在建立了多个虚拟私有网络隧道后,每个终端设备就可以向服务器105发送信息共享请求。其中,信息共享请求可以包括共享信息的标题信息和共享信息对应的地址。如此,有利于提高终端设备之间的信息利用率。It can be seen from the above description that in the existing cloud network, the utilization rate of information between terminal devices is not high. For this reason, after the server 105 establishes multiple virtual private network tunnels, each terminal device can send an information sharing request to the server 105 . Wherein, the information sharing request may include title information of the shared information and an address corresponding to the shared information. In this way, it is beneficial to improve the utilization rate of information between terminal devices.

第二步,建立每个标题信息和对应该标题信息的地址之间的第二对应关系,并通过第二对应关系建立信息查询表。In the second step, a second corresponding relationship between each title information and the address corresponding to the title information is established, and an information lookup table is established through the second corresponding relationship.

得到信息共享请求后,服务器105可以建立每个标题信息和对应该标题信息的地址之间的第二对应关系;之后,再通过第二对应关系建立信息查询表。即,信息查询表中包含了分布于不同终端设备上的信息的标题信息和信息的地址。After receiving the information sharing request, the server 105 may establish a second correspondence between each title information and the address corresponding to the title information; then, establish an information lookup table through the second correspondence. That is, the information lookup table includes title information and addresses of information distributed on different terminal devices.

在本实施例的一些可选的实现方式中,上述方法还可以包括:通过虚拟私有网络隧道发送上述信息查询表。In some optional implementation manners of this embodiment, the above method may further include: sending the above information lookup table through a virtual private network tunnel.

得到信息查询表后,服务器105可以将信息查询表通过每个虚拟私有网络隧道发送到虚拟私有网络隧道对端的终端设备上,使得该终端设备可以查询云网络中的信息。After obtaining the information query table, the server 105 can send the information query table to the terminal device at the opposite end of the virtual private network tunnel through each virtual private network tunnel, so that the terminal device can query the information in the cloud network.

由上述描述可知,服务器105可以实现信息在云网络中的中继传输功能。结合信息查询表,本实施例方法可以使得云网络中的终端设备获取到与其没有建立虚拟私有网络隧道的终端设备上的信息,提高了信息在云网络中的利用率。It can be seen from the above description that the server 105 can realize the relay transmission function of information in the cloud network. Combined with the information lookup table, the method of this embodiment can enable the terminal device in the cloud network to obtain information on the terminal device with which no virtual private network tunnel has been established, thereby improving the utilization rate of information in the cloud network.

步骤202,从上述信息查询请求信息中提取目标地址,查询隧道表中对应上述目标地址的虚拟私有网络隧道的第一编号,并通过上述第一编号对应的虚拟私有网络隧道发送上述信息查询请求信息。Step 202, extracting the target address from the above-mentioned information query request information, querying the first number of the virtual private network tunnel corresponding to the above-mentioned target address in the tunnel table, and sending the above-mentioned information query request information through the virtual private network tunnel corresponding to the above-mentioned first number .

由上述描述可知,服务器105上存储有隧道表,隧道表用于表征虚拟私有网络隧道的编号与地址之间的对应关系。服务器105可以查询隧道表中对应目标地址的虚拟私有网络隧道的编号,该编号对应的虚拟私有网络隧道的对端就是信息查询请求信息需要到达的终端设备(即标题信息对应的目标信息所在的终端设备)。服务器105可以通过第一编号对应的虚拟私有网络隧道发送上述信息查询请求信息。It can be seen from the above description that a tunnel table is stored on the server 105, and the tunnel table is used to represent the corresponding relationship between the number and the address of the virtual private network tunnel. The server 105 can query the number of the virtual private network tunnel corresponding to the target address in the tunnel table. The opposite end of the virtual private network tunnel corresponding to the number is the terminal device that the information query request information needs to reach (that is, the terminal where the target information corresponding to the title information is located. equipment). The server 105 may send the above information query request information through the virtual private network tunnel corresponding to the first number.

步骤203,接收通过上述第一编号对应的虚拟私有网络隧道发来的对应上述信息查询请求信息的结果信息。Step 203, receiving the result information corresponding to the information query request information sent through the virtual private network tunnel corresponding to the first number.

第一编号对应的虚拟私有网络隧道对端的终端设备在接收到信息查询请求信息后,会对信息查询请求信息内的地址进行修改;然后,该终端设备可以查询信息查询请求信息中标题信息对应的目标信息;最后,通过第一编号对应的虚拟私有网络隧道将修改后的地址和目标信息封装成结果信息发送给服务器105。其中,上述结果信息包括目标信息、更新目标地址和更新源地址。After receiving the information query request information, the terminal device at the opposite end of the virtual private network tunnel corresponding to the first number will modify the address in the information query request information; then, the terminal device can query the address corresponding to the title information in the information query request information. target information; finally, the modified address and target information are encapsulated into result information and sent to the server 105 through the virtual private network tunnel corresponding to the first number. Wherein, the above result information includes target information, update target address and update source address.

步骤204,查询隧道表中对应上述更新目标地址的虚拟私有网络隧道的第二编号,并通过上述第二编号对应的虚拟私有网络隧道发送上述结果信息。Step 204, query the second number of the virtual private network tunnel corresponding to the update target address in the tunnel table, and send the above result information through the virtual private network tunnel corresponding to the second number.

服务器105接收结果信息后,可以查询隧道表中对应结果信息包含的更新目标地址的虚拟私有网络隧道的第二编号,并通过第二编号对应的虚拟私有网络隧道发送上述结果信息。通常,结果信息中的更新目标地址与信息查询请求信息中的源地址相同;结果信息中的更新源地址与信息查询请求信息中的目标地址。即,服务器105查询到的第二编号对应的虚拟私有网络隧道和服务器105接收信息查询请求信息时的虚拟私有网络隧道为同一个虚拟私有网络隧道。如此,可以使得服务器105将结果信息返回给发送信息查询请求信息的终端设备,实现了在虚拟私有网络环境下,未建立虚拟私有网络隧道的终端设备之间的信息传输,提高了虚拟私有网络中信息的传输效率和利用率。该过程中,服务器105可以看作是虚拟私有网络环境下信息传递的中继站。After receiving the result information, the server 105 may query the second number of the virtual private network tunnel of the update target address included in the corresponding result information in the tunnel table, and send the above result information through the virtual private network tunnel corresponding to the second number. Usually, the update target address in the result information is the same as the source address in the information inquiry request information; the update source address in the result information is the same as the target address in the information inquiry request information. That is, the virtual private network tunnel corresponding to the second number queried by the server 105 is the same virtual private network tunnel as the virtual private network tunnel when the server 105 receives the information query request information. In this way, the server 105 can return the result information to the terminal device that sent the information query request information, realizing the information transmission between the terminal devices that have not established a virtual private network tunnel in the virtual private network environment, and improving the virtual private network. Information transmission efficiency and utilization. In this process, the server 105 can be regarded as a relay station for information transmission under the virtual private network environment.

服务器105查询到的第二编号对应的虚拟私有网络隧道和服务器105接收信息查询请求信息时的虚拟私有网络隧道也可以不是同一个虚拟私有网络隧道。例如终端设备A将信息通过虚拟私有网络隧道发送给终端设备B后,终端设备B还可以将对应的信息通过虚拟私有网络隧道发送给终端设备C。The virtual private network tunnel corresponding to the second number queried by the server 105 may not be the same virtual private network tunnel as the virtual private network tunnel when the server 105 receives the information query request information. For example, after terminal device A sends information to terminal device B through the virtual private network tunnel, terminal device B may also send corresponding information to terminal device C through the virtual private network tunnel.

继续参考图3,示出了根据本申请的用于获取信息的方法的一个实施例的流程300。该用于获取信息的方法包括以下步骤:Continuing to refer to FIG. 3 , a flow 300 of an embodiment of the method for obtaining information according to the present application is shown. The method for obtaining information includes the following steps:

步骤301,接收信息获取请求信息。Step 301, receiving information acquisition request information.

在本实施例中,用于获取信息的方法运行于其上的电子设备(例如图1所示的终端设备)可以通过有线连接方式或者无线连接方式接收信息获取请求信息,其中,上述信息获取请求信息用于指示获取虚拟私有网络上指定的目标信息。需要指出的是,上述无线连接方式可以包括但不限于3G/4G连接、WiFi连接、蓝牙连接、WiMAX连接、Zigbee连接、UWB(ultra wideband)连接、以及其他现在已知或将来开发的无线连接方式。In this embodiment, the electronic device on which the method for obtaining information runs (such as the terminal device shown in FIG. 1 ) can receive information obtaining request information through a wired connection or a wireless connection, wherein the information obtaining request The information is used to indicate to obtain the specified target information on the virtual private network. It should be pointed out that the above wireless connection methods may include but not limited to 3G/4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods known or developed in the future .

当前终端设备(接收信息获取请求信息的终端设备)可以接收其他终端设备发来的信息获取请求信息。该信息获取请求信息用于指示建立了虚拟私有网络隧道的终端设备获取虚拟私有网络上指定的目标信息。The current terminal device (the terminal device receiving the information acquisition request information) can receive the information acquisition request information sent by other terminal devices. The information acquisition request information is used to instruct the terminal device that has established the virtual private network tunnel to obtain the specified target information on the virtual private network.

步骤302,响应于信息查询表中存在上述目标信息的标题信息,将上述信息查询表中对应上述目标信息的地址设置为目标地址,并将本地地址设置为源地址。Step 302, in response to the title information of the above-mentioned target information existing in the information look-up table, set the address corresponding to the above-mentioned target information in the above-mentioned information look-up table as the target address, and set the local address as the source address.

终端设备接收到信息获取请求信息后,可以通过信息查询表对信息获取请求信息指示的目标信息进行查询。如果信息查询表中存在上述目标信息的标题信息,则说明虚拟私有网络上存在该目标信息。然后,终端设备可以从信息查询表中得到目标信息的标题信息对应的地址,将该地址设置为目标地址,并将终端设备的本地地址设置为源地址。其中,上述信息查询表可以用于表征标题信息和对应该标题信息的地址之间的对应关系。After receiving the information acquisition request information, the terminal device may query the target information indicated by the information acquisition request information through the information query table. If the title information of the above target information exists in the information lookup table, it means that the target information exists on the virtual private network. Then, the terminal device can obtain the address corresponding to the title information of the target information from the information lookup table, set the address as the target address, and set the local address of the terminal device as the source address. Wherein, the above-mentioned information lookup table may be used to characterize the correspondence between title information and addresses corresponding to the title information.

在本实施例的一些可选的实现方式中,上述方法还可以包括:通过上述虚拟私有网络隧道发送本地的地址。In some optional implementation manners of this embodiment, the above method may further include: sending the local address through the above virtual private network tunnel.

为了实现信息能够在虚拟私有网络上传递,需要连接虚拟私有网络的终端设备将各自的地址发送给上述的服务器105,以便服务器105能够根据地址发送对应的信息。In order to transmit information on the virtual private network, terminal devices connected to the virtual private network need to send their respective addresses to the above-mentioned server 105, so that the server 105 can send corresponding information according to the address.

步骤303,将上述标题信息、源地址和目标地址封装成信息查询请求信息,并通过虚拟私有网络隧道发送上述信息查询请求信息。Step 303: Encapsulate the above title information, source address and destination address into information query request information, and send the above information query request information through the virtual private network tunnel.

终端设备得到上述的标题信息、源地址和目标地址后,可以将标题信息、源地址和目标地址封装成信息查询请求信息,并通过虚拟私有网络隧道发送上述信息查询请求信息到虚拟私有网络隧道对端的服务器105。After the terminal device obtains the above title information, source address and destination address, it can encapsulate the title information, source address and destination address into information query request information, and send the above information query request information to the virtual private network tunnel pair through the virtual private network tunnel. end server 105 .

步骤304,接收通过上述虚拟私有网络隧道发来的对应上述信息查询请求信息的结果信息,并从上述结果信息中解析出目标信息。Step 304, receiving the result information corresponding to the information query request information sent through the virtual private network tunnel, and parsing the target information from the result information.

信息查询请求信息发送给服务器105后,服务器105会将信息查询请求信息发送给虚拟私有网络中对应的终端设备,并接收该终端设备发送给服务器105的对应信息查询请求信息的结果信息;服务器105再将该结果信息通过虚拟私有网络隧道发送给当前终端设备。如此,实现了发送信息查询请求信息的终端设备在虚拟私有网络中获取其他终端设备上信息,提高了虚拟私有网络中信息的传输效率和利用率。该过程中,服务器105可以看作是虚拟私有网络环境下信息传递的中继站。After the information query request information is sent to the server 105, the server 105 will send the information query request information to the corresponding terminal device in the virtual private network, and receive the result information of the corresponding information query request information sent to the server 105 by the terminal device; Then send the result information to the current terminal device through the virtual private network tunnel. In this way, the terminal device that sends the information query request information can obtain information on other terminal devices in the virtual private network, which improves the transmission efficiency and utilization rate of information in the virtual private network. In this process, the server 105 can be regarded as a relay station for information transmission under the virtual private network environment.

继续参考图4,示出了根据本申请的用于获取信息的方法的一个实施例的流程400。该用于获取信息的方法包括以下步骤:Continuing to refer to FIG. 4 , a flow 400 of an embodiment of the method for obtaining information according to the present application is shown. The method for obtaining information includes the following steps:

步骤401,接收通过虚拟私有网络隧道发来的信息查询请求信息。Step 401, receiving information query request information sent through a virtual private network tunnel.

在本实施例中,用于获取信息的方法运行于其上的电子设备(例如图1所示的终端设备)可以通过有线连接方式或者无线连接方式接收信息获取请求信息,其中,上述信息查询请求信息包括标题信息、源地址和目标地址。需要指出的是,上述无线连接方式可以包括但不限于3G/4G连接、WiFi连接、蓝牙连接、WiMAX连接、Zigbee连接、UWB(ultra wideband)连接、以及其他现在已知或将来开发的无线连接方式。In this embodiment, the electronic device on which the method for obtaining information runs (such as the terminal device shown in FIG. 1 ) can receive information obtaining request information through a wired connection or a wireless connection, wherein the above-mentioned information query request Information includes header information, source address, and destination address. It should be pointed out that the above wireless connection methods may include but not limited to 3G/4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods known or developed in the future .

虚拟私有网络中的当前终端设备(接收信息查询请求信息的终端设备)可以接收通过虚拟私有网络隧道发来的信息查询请求信息。该信息查询请求信息可以包括当前终端设备上的信息(即目标信息)的标题信息。The current terminal device in the virtual private network (the terminal device receiving the information query request information) can receive the information query request information sent through the tunnel of the virtual private network. The information query request information may include title information of the information (that is, target information) on the current terminal device.

步骤402,从上述信息查询请求信息中解析出标题信息、源地址和目标地址,并将源地址和目标地址分别设置为更新目标地址和更新源地址。Step 402, parse out the title information, source address and target address from the above information query request information, and set the source address and target address as the update target address and update source address respectively.

当前终端设备可以从信息查询请求信息中解析出标题信息、源地址和目标地址。其中,源地址可以用于表征发送信息查询请求信息的终端设备在虚拟私有网络上的地址;目标地址可以是当前终端设备的地址;标题信息可以与当前终端设备上的信息(即目标信息)对应。然后,当前终端设备再将源地址和目标地址分别设置为更新目标地址和更新源地址,以便后续发送信息。The current terminal device can parse out the title information, source address and target address from the information query request information. Wherein, the source address can be used to characterize the address on the virtual private network of the terminal device sending the information query request information; the target address can be the address of the current terminal device; the title information can correspond to the information on the current terminal device (ie target information) . Then, the current terminal device sets the source address and the target address as the update target address and the update source address respectively, so as to send information subsequently.

步骤403,将上述标题信息对应的目标信息、更新目标地址和更新源地址封装成结果信息,并通过上述虚拟私有网络隧道发送上述结果信息。Step 403: Encapsulate the target information, update target address, and update source address corresponding to the above-mentioned title information into result information, and send the above-mentioned result information through the above-mentioned virtual private network tunnel.

当前终端设备可以查询本地对应标题信息对应的目标信息,然后将目标信息、更新目标地址和更新源地址封装成结果信息;然后再通过虚拟私有网络隧道发送上述结果信息给虚拟私有网络隧道对端的终端设备(例如可以是服务器105)。The current terminal device can query the target information corresponding to the local corresponding title information, and then encapsulate the target information, update target address and update source address into result information; and then send the above result information to the terminal at the opposite end of the virtual private network tunnel through the virtual private network tunnel device (such as may be the server 105).

在本实施例的一些可选的实现方式中,上述方法还可以包括:通过上述虚拟私有网络隧道发送本地的地址。In some optional implementation manners of this embodiment, the above method may further include: sending the local address through the above virtual private network tunnel.

连接虚拟私有网络的终端设备,为了实现信息能够在虚拟私有网络上传递,需要终端设备将各自的地址发送给如上述的服务器105,以便服务器105能够根据地址发送对应的信息。For terminal devices connected to the virtual private network, in order to transmit information on the virtual private network, the terminal devices need to send their respective addresses to the server 105 as described above, so that the server 105 can send corresponding information according to the address.

在本实施例的一些可选的实现方式中,上述方法还可以包括:通过上述虚拟私有网络隧道发送信息共享请求。In some optional implementation manners of this embodiment, the above method may further include: sending an information sharing request through the above virtual private network tunnel.

本实施例的终端设备需要提供目标信息。而为了实现信息在虚拟私有网络上的共享,就需要本实施例的终端设备首先提供共享信息。由上述描述可知,服务器105可以看作是虚拟私有网络环境下信息传递的中继站,因此,终端设备可以通过虚拟私有网络隧道向服务器105发送信息共享请求。其中,上述信息共享请求可以包括共享信息的标题信息和共享信息对应的地址。服务器105在接收到信息共享请求后,可以将信息共享请求包含的共享信息的标题信息和共享信息对应的地址发送给虚拟私有网络中的其他终端设备,以便虚拟私有网络中的其他终端设备能够获取这些共享信息,从而达到提高终端设备之间的信息利用率的目的。The terminal device in this embodiment needs to provide target information. In order to realize the sharing of information on the virtual private network, the terminal device in this embodiment needs to provide the shared information first. It can be seen from the above description that the server 105 can be regarded as a relay station for information transmission in the virtual private network environment, therefore, the terminal device can send an information sharing request to the server 105 through the virtual private network tunnel. Wherein, the above-mentioned information sharing request may include title information of the shared information and an address corresponding to the shared information. After receiving the information sharing request, the server 105 can send the title information of the shared information included in the information sharing request and the address corresponding to the shared information to other terminal devices in the virtual private network, so that other terminal devices in the virtual private network can obtain These share information, so as to achieve the purpose of improving the utilization rate of information between terminal devices.

在本实施例的一些可选的实现方式中,上述方法可以还包括为共享信息设置权限,以及,上述将上述标题信息对应的目标信息、更新目标地址和更新源地址封装成结果信息包括:响应于上述源地址在设定地址范围内,则将上述标题信息对应的目标信息、更新目标地址和更新源地址封装成结果信息。In some optional implementations of this embodiment, the above method may further include setting permissions for the shared information, and the above encapsulation of the target information corresponding to the above title information, the update target address, and the update source address into result information includes: Response If the source address is within the set address range, the target information corresponding to the title information, the update target address and the update source address are packaged into result information.

终端设备可以对不同的信息设置不同的权限,只有申请获取该信息的终端设备满足一定的权限要求时才能获取到该信息。其中权限可以是多种,例如可以是:申请获取该信息的终端设备当前的用户类型(用户类型可以是注册用户或非注册用户等)、职业、公司等。如果不满足权限条件,可以不发送目标信息。本实施例中,上述的权限可以包括地址范围,当申请获取该信息的终端设备的源地址在地址范围内时,说明该申请获取该信息的终端设备满足权限条件。此时,当前终端设备可以将标题信息对应的目标信息、更新目标地址和更新源地址封装成结果信息,并将结果信息发送给服务器105。The terminal device can set different permissions for different information, and the information can be obtained only when the terminal device that applies to obtain the information meets certain permission requirements. The authority can be of various types, for example, it can be: the current user type (user type can be a registered user or a non-registered user, etc.), occupation, company, etc. of the terminal device applying for obtaining the information. If the permission conditions are not met, the target information may not be sent. In this embodiment, the above permission may include an address range. When the source address of the terminal device applying to obtain the information is within the address range, it means that the terminal device applying to obtain the information meets the permission condition. At this time, the current terminal device may package the target information corresponding to the title information, the update target address and the update source address into result information, and send the result information to the server 105 .

需要说明的是,上述实施例3和实施例4中的终端设备可以获取虚拟私有网络上其他终端设备上的目标信息,也可以作为目标信息的提供方将目标信息发送给虚拟私有网络上其他的终端设备,还可以是作为目标信息传递过程中的终端设备。It should be noted that the terminal devices in the above-mentioned Embodiment 3 and Embodiment 4 can obtain target information on other terminal devices on the virtual private network, and can also serve as a provider of target information to send target information to other terminal devices on the virtual private network. The terminal device may also be a terminal device in the process of transmitting target information.

继续参见图5,图5是根据本实施例的用于获取信息的方法的应用场景的一个示意图。在图5的应用场景中,终端设备102通过虚拟私有网络隧道向服务器105发送信息获取请求信息;服务器105通过信息获取请求信息中的目标地址确定终端设备103的虚拟私有网络隧道,并通过终端设备103的虚拟私有网络隧道将信息获取请求信息发送给终端设备103;终端设备103将信息获取请求信息请求的目标信息封装成结果信息,并将结果信息发送给服务器105;服务器105将该结果信息发送给终端设备102。Continue referring to FIG. 5 , which is a schematic diagram of an application scenario of the method for obtaining information according to this embodiment. In the application scenario of Fig. 5, the terminal device 102 sends information acquisition request information to the server 105 through the virtual private network tunnel; the server 105 determines the virtual private network tunnel of the terminal device 103 through the target address in the information acquisition request information, and passes the terminal device The virtual private network tunnel of 103 sends the information acquisition request information to the terminal device 103; the terminal device 103 encapsulates the target information of the information acquisition request information request into result information, and sends the result information to the server 105; the server 105 sends the result information to the terminal device 102.

本申请的上述实施例提供的方法实现了在虚拟私有网络环境下,未建立虚拟私有网络隧道的终端设备之间的信息传输,提高了虚拟私有网络中信息的传输效率和利用率。The method provided by the above-mentioned embodiments of the present application realizes information transmission between terminal devices that have not established a virtual private network tunnel in the virtual private network environment, and improves the transmission efficiency and utilization rate of information in the virtual private network.

进一步参考图6,作为对上述各图所示方法的实现,本申请提供了一种用于获取信息的装置的一个实施例,该装置实施例与图2所示的方法实施例相对应,该装置具体可以应用于各种电子设备中。Further referring to FIG. 6 , as an implementation of the methods shown in the above figures, the present application provides an embodiment of a device for obtaining information, which corresponds to the method embodiment shown in FIG. 2 . The device can be specifically applied to various electronic devices.

如图6所示,本实施例的用于获取信息的装置600可以包括:信息查询请求信息接收单元601、信息查询请求信息发送单元602、结果信息接收单元603和结果信息发送单元604。其中,信息查询请求信息接收单元601用于接收通过虚拟私有网络隧道发来的信息查询请求信息,上述信息查询请求信息包括标题信息、源地址和目标地址;信息查询请求信息发送单元602用于从上述信息查询请求信息中提取目标地址,查询隧道表中对应上述目标地址的虚拟私有网络隧道的第一编号,并通过上述第一编号对应的虚拟私有网络隧道发送上述信息查询请求信息,上述隧道表用于表征虚拟私有网络隧道的编号与地址之间的对应关系;结果信息接收单元603用于接收通过上述第一编号对应的虚拟私有网络隧道发来的对应上述信息查询请求信息的结果信息,上述结果信息包括目标信息、更新目标地址和更新源地址;结果信息发送单元604,用于查询隧道表中对应上述更新目标地址的虚拟私有网络隧道的第二编号,并通过上述第二编号对应的虚拟私有网络隧道发送上述结果信息。As shown in FIG. 6 , the apparatus 600 for obtaining information in this embodiment may include: an information query request information receiving unit 601 , an information query request information sending unit 602 , a result information receiving unit 603 and a result information sending unit 604 . Wherein, the information query request information receiving unit 601 is used to receive the information query request information sent through the virtual private network tunnel, the above information query request information includes title information, source address and target address; the information query request information sending unit 602 is used to extracting the target address from the above information query request information, querying the first number of the virtual private network tunnel corresponding to the above target address in the tunnel table, and sending the above information query request information through the virtual private network tunnel corresponding to the above first number, the above tunnel table It is used to represent the corresponding relationship between the number and the address of the virtual private network tunnel; the result information receiving unit 603 is used to receive the result information corresponding to the above-mentioned information query request information sent through the virtual private network tunnel corresponding to the above-mentioned first number, and the above-mentioned The result information includes target information, update target address and update source address; the result information sending unit 604 is used to query the second number of the virtual private network tunnel corresponding to the above update target address in the tunnel table, and pass the virtual private network tunnel corresponding to the above second number The private network tunnel sends the above result information.

在本实施例的一些可选的实现方式中,用于获取信息的装置600还可以包括隧道表构建单元(图中未示出),用于构建隧道表,上述隧道表构建单元可以包括:隧道编号设备子单元(图中未示出)和隧道表构建子单元(图中未示出)。其中,隧道编号设备子单元对于至少一个虚拟私有网络隧道中的每个虚拟私有网络隧道,用于为该虚拟私有网络隧道设置编号,并接收该虚拟私有网络隧道对端发来的地址;隧道表构建子单元用于建立每个编号和对应该编号的地址之间的第一对应关系,并通过第一对应关系建立隧道表。In some optional implementations of this embodiment, the device 600 for obtaining information may also include a tunnel table construction unit (not shown in the figure) for constructing a tunnel table, and the above tunnel table construction unit may include: The numbering device subunit (not shown in the figure) and the tunnel table construction subunit (not shown in the figure). Among them, the tunnel numbering device subunit is used to set the number for each virtual private network tunnel in at least one virtual private network tunnel, and receive the address sent from the opposite end of the virtual private network tunnel; the tunnel table The construction subunit is used to establish a first correspondence between each number and the address corresponding to the number, and establish a tunnel table through the first correspondence.

在本实施例的一些可选的实现方式中,用于获取信息的装置600还可以包括信息查询表构建单元(图中未示出),用于构建信息查询表,上述信息查询表构建单元可以包括:信息共享请求接收子单元(图中未示出)和信息查询表构建子单元(图中未示出)。其中,信息共享请求接收子单元用于接收信息共享请求,上述信息共享请求包括共享信息的标题信息和共享信息对应的地址;信息查询表构建子单元用于建立每个标题信息和对应该标题信息的地址之间的第二对应关系,并通过第二对应关系建立信息查询表。In some optional implementations of this embodiment, the apparatus 600 for obtaining information may also include an information lookup table construction unit (not shown in the figure), which is used to construct an information lookup table, and the above information lookup table construction unit may It includes: an information sharing request receiving subunit (not shown in the figure) and an information lookup table constructing subunit (not shown in the figure). Wherein, the information sharing request receiving subunit is used to receive the information sharing request, and the information sharing request includes the title information of the shared information and the address corresponding to the shared information; the information query table construction subunit is used to establish each title information and the corresponding title information The second corresponding relationship between the addresses, and an information lookup table is established through the second corresponding relationship.

在本实施例的一些可选的实现方式中,用于获取信息的装置600还可以包括:信息查询表发送单元(图中未示出),用于通过虚拟私有网络隧道发送上述信息查询表。In some optional implementations of this embodiment, the apparatus 600 for obtaining information may further include: an information lookup table sending unit (not shown in the figure), configured to send the above information lookup table through a virtual private network tunnel.

进一步参考图7,作为对上述各图所示方法的实现,本申请提供了一种用于获取信息的装置的一个实施例,该装置实施例与图3所示的方法实施例相对应,该装置具体可以应用于各种电子设备中。Further referring to FIG. 7 , as an implementation of the methods shown in the above figures, the present application provides an embodiment of a device for obtaining information, which corresponds to the method embodiment shown in FIG. 3 , the The device can be specifically applied to various electronic devices.

如图7所示,本实施例的用于获取信息的装置700可以包括:信息获取请求信息接收单元701、地址设置单元702、第一信息发送单元703和第一信息接收单元704。其中,信息获取请求信息接收单元701用于接收信息获取请求信息,上述信息获取请求信息用于指示获取虚拟私有网络上指定的目标信息;地址设置单元702响应于信息查询表中存在上述目标信息的标题信息,用于将上述信息查询表中对应上述目标信息的地址设置为目标地址,并将本地地址设置为源地址,上述信息查询表用于表征标题信息和对应该标题信息的地址之间的对应关系;第一信息发送单元703用于将上述标题信息、源地址和目标地址封装成信息查询请求信息,并通过虚拟私有网络隧道发送上述信息查询请求信息;第一信息接收单元704用于接收通过上述虚拟私有网络隧道发来的对应上述信息查询请求信息的结果信息,并从上述结果信息中解析出目标信息。As shown in FIG. 7 , the apparatus 700 for obtaining information in this embodiment may include: an information obtaining request information receiving unit 701 , an address setting unit 702 , a first information sending unit 703 and a first information receiving unit 704 . Wherein, the information acquisition request information receiving unit 701 is used to receive the information acquisition request information, and the above information acquisition request information is used to indicate to obtain the specified target information on the virtual private network; the address setting unit 702 responds to the presence of the above target information in the information lookup table The title information is used to set the address corresponding to the above target information in the above information lookup table as the target address, and set the local address as the source address, and the above information lookup table is used to represent the relationship between the title information and the address corresponding to the title information Correspondence; the first information sending unit 703 is used to encapsulate the above-mentioned title information, source address and target address into information query request information, and send the above-mentioned information query request information through a virtual private network tunnel; the first information receiving unit 704 is used to receive The result information corresponding to the above-mentioned information query request information sent through the above-mentioned virtual private network tunnel, and the target information is parsed from the above-mentioned result information.

在本实施例的一些可选的实现方式中,用于获取信息的装置700还可以包括:通过上述虚拟私有网络隧道发送本地的地址。In some optional implementation manners of this embodiment, the apparatus 700 for obtaining information may further include: sending the local address through the aforementioned virtual private network tunnel.

进一步参考图8,作为对上述各图所示方法的实现,本申请提供了一种用于获取信息的装置的一个实施例,该装置实施例与图4所示的方法实施例相对应,该装置具体可以应用于各种电子设备中。Further referring to FIG. 8 , as an implementation of the methods shown in the above figures, the present application provides an embodiment of a device for obtaining information, which corresponds to the method embodiment shown in FIG. 4 , the The device can be specifically applied to various electronic devices.

如图8所示,本实施例的用于获取信息的装置800可以包括:第二信息接收单元801、地址修改单元802和第二信息发送单元803。其中,第二信息接收单元801用于接收通过虚拟私有网络隧道发来的信息查询请求信息,上述信息查询请求信息包括标题信息、源地址和目标地址;地址修改单元802用于从上述信息查询请求信息中解析出标题信息、源地址和目标地址,并将源地址和目标地址分别设置为更新目标地址和更新源地址;第二信息发送单元803用于将上述标题信息对应的目标信息、更新目标地址和更新源地址封装成结果信息,并通过上述虚拟私有网络隧道发送上述结果信息。As shown in FIG. 8 , the apparatus 800 for acquiring information in this embodiment may include: a second information receiving unit 801 , an address modifying unit 802 , and a second information sending unit 803 . Wherein, the second information receiving unit 801 is used to receive information query request information sent through the virtual private network tunnel, the above information query request information includes title information, source address and target address; Parse the title information, source address and target address from the information, and set the source address and target address as the update target address and the update source address respectively; The address and the update source address are encapsulated into result information, and the above result information is sent through the virtual private network tunnel.

在本实施例的一些可选的实现方式中,用于获取信息的装置800还可以包括:通过上述虚拟私有网络隧道发送本地的地址。In some optional implementation manners of this embodiment, the apparatus 800 for obtaining information may further include: sending the local address through the aforementioned virtual private network tunnel.

在本实施例的一些可选的实现方式中,用于获取信息的装置800还可以包括:信息共享请求发送单元(图中未示出),用于通过上述虚拟私有网络隧道发送信息共享请求,上述信息共享请求包括共享信息的标题信息和共享信息对应的地址。In some optional implementation manners of this embodiment, the apparatus 800 for obtaining information may further include: an information sharing request sending unit (not shown in the figure), configured to send an information sharing request through the above-mentioned virtual private network tunnel, The above information sharing request includes title information of the shared information and an address corresponding to the shared information.

在本实施例的一些可选的实现方式中,用于获取信息的装置800还可以包括:为共享信息设置权限,以及,上述第二信息发送单元803可以包括:响应于上述源地址在设定地址范围内,则将上述标题信息对应的目标信息、更新目标地址和更新源地址封装成结果信息。In some optional implementations of this embodiment, the apparatus 800 for obtaining information may also include: setting permissions for shared information, and the above-mentioned second information sending unit 803 may include: responding to the above-mentioned source address in setting Within the address range, the target information corresponding to the above title information, the update target address and the update source address are encapsulated into result information.

本实施例还提供了一种服务器,包括:一个或多个处理器;存储器,用于存储一个或多个程序,当上述一个或多个程序被上述一个或多个处理器执行时,使得上述一个或多个处理器执行上述的用于获取信息的方法。This embodiment also provides a server, including: one or more processors; memory, used to store one or more programs, when the above one or more programs are executed by the above one or more processors, so that the above One or more processors execute the methods for obtaining information described above.

本实施例还提供了一种计算机可读介质,其上存储有计算机程序,该程序被处理器执行时实现上述的用于获取信息的方法。This embodiment also provides a computer-readable medium on which a computer program is stored, and when the program is executed by a processor, the above-mentioned method for obtaining information is implemented.

下面参考图9,其示出了适于用来实现本申请实施例的终端设备/服务器的计算机系统900的结构示意图。图9示出的终端设备/服务器仅仅是一个示例,不应对本申请实施例的功能和使用范围带来任何限制。Referring now to FIG. 9 , it shows a schematic structural diagram of a computer system 900 suitable for implementing a terminal device/server according to an embodiment of the present application. The terminal device/server shown in FIG. 9 is only an example, and should not limit the functions and scope of use of this embodiment of the present application.

如图9所示,计算机系统900包括中央处理单元(CPU)901,其可以根据存储在只读存储器(ROM)902中的程序或者从存储部分908加载到随机访问存储器(RAM)903中的程序而执行各种适当的动作和处理。在RAM 903中,还存储有系统900操作所需的各种程序和数据。CPU 901、ROM 902以及RAM 903通过总线904彼此相连。输入/输出(I/O)接口905也连接至总线904。As shown in FIG. 9 , a computer system 900 includes a central processing unit (CPU) 901 that can be programmed according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage section 908 into a random-access memory (RAM) 903 Instead, various appropriate actions and processes are performed. In the RAM 903, various programs and data necessary for the operation of the system 900 are also stored. The CPU 901 , ROM 902 , and RAM 903 are connected to each other via a bus 904 . An input/output (I/O) interface 905 is also connected to the bus 904 .

以下部件连接至I/O接口905:包括键盘、鼠标等的输入部分906;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分907;包括硬盘等的存储部分908;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分909。通信部分909经由诸如因特网的网络执行通信处理。驱动器910也根据需要连接至I/O接口905。可拆卸介质911,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器910上,以便于从其上读出的计算机程序根据需要被安装入存储部分908。The following components are connected to the I/O interface 905: an input section 906 including a keyboard, a mouse, etc.; an output section 907 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker; a storage section 908 including a hard disk, etc. and a communication section 909 including a network interface card such as a LAN card, a modem, or the like. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the I/O interface 905 as needed. A removable medium 911 such as a magnetic disk, optical disk, magneto-optical disk, semiconductor memory, etc. is mounted on the drive 910 as necessary so that a computer program read therefrom is installed into the storage section 908 as necessary.

特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信部分909从网络上被下载和安装,和/或从可拆卸介质911被安装。在该计算机程序被中央处理单元(CPU)901执行时,执行本申请的方法中限定的上述功能。In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, where the computer program includes program codes for executing the methods shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via communication portion 909 and/or installed from removable media 911 . When the computer program is executed by the central processing unit (CPU) 901, the above-mentioned functions defined in the method of the present application are performed.

需要说明的是,本申请上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本申请中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本申请中,计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:无线、电线、光缆、RF等等,或者上述的任意合适的组合。It should be noted that the computer-readable medium mentioned above in this application may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the above two. A 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 any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer diskettes, hard disks, random access memory (RAM), read-only memory (ROM), erasable Programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may 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. In this application, however, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, in which computer-readable program codes are carried. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. . Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

附图中的流程图和框图,图示了按照本申请各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in a flowchart or block diagram may represent a module, program segment, or portion of code that contains one or more logical functions for implementing specified executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved. It should also be noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by a dedicated hardware-based system that performs the specified functions or operations , or may be implemented by a combination of dedicated hardware and computer instructions.

描述于本申请实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。所描述的单元也可以设置在处理器中,例如,可以描述为:一种处理器包括信息查询请求信息接收单元、信息查询请求信息发送单元、结果信息接收单元和结果信息发送单元。其中,这些单元的名称在某种情况下并不构成对该单元本身的限定,例如,结果信息发送单元还可以被描述为“用于发送结果信息的单元”。The units involved in the embodiments described in the present application may be implemented by means of software or by means of hardware. The described units can also be set in the processor, for example, it can be described as: a processor includes an information query request information receiving unit, an information query request information sending unit, a result information receiving unit and a result information sending unit. Wherein, the names of these units do not constitute limitations on the units themselves under certain circumstances, for example, the result information sending unit may also be described as "a unit for sending result information".

作为另一方面,本申请还提供了一种计算机可读介质,该计算机可读介质可以是上述实施例中描述的装置中所包含的;也可以是单独存在,而未装配入该装置中。上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该装置执行时,使得该装置:接收通过虚拟私有网络隧道发来的信息查询请求信息,上述信息查询请求信息包括标题信息、源地址和目标地址;从上述信息查询请求信息中提取目标地址,查询隧道表中对应上述目标地址的虚拟私有网络隧道的第一编号,并通过上述第一编号对应的虚拟私有网络隧道发送上述信息查询请求信息,上述隧道表用于表征虚拟私有网络隧道的编号与地址之间的对应关系;接收通过上述第一编号对应的虚拟私有网络隧道发来的对应上述信息查询请求信息的结果信息,上述结果信息包括目标信息、更新目标地址和更新源地址;查询隧道表中对应上述更新目标地址的虚拟私有网络隧道的第二编号,并通过上述第二编号对应的虚拟私有网络隧道发送上述结果信息。As another aspect, the present application also provides a computer-readable medium. The computer-readable medium may be included in the device described in the above embodiments, or it may exist independently without being assembled into the device. The above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by the device, the device: receives information query request information sent through a virtual private network tunnel, and the above-mentioned information query request information includes Title information, source address and target address; extract the target address from the above information query request information, query the first number of the virtual private network tunnel corresponding to the above target address in the tunnel table, and pass the virtual private network tunnel corresponding to the above first number Send the above-mentioned information query request information, and the above-mentioned tunnel table is used to represent the corresponding relationship between the number and the address of the virtual private network tunnel; receive the result corresponding to the above-mentioned information query request information sent by the virtual private network tunnel corresponding to the above-mentioned first number Information, the above result information includes target information, update target address and update source address; query the second number of the virtual private network tunnel corresponding to the above update target address in the tunnel table, and send the above-mentioned result information.

以上描述仅为本申请的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本申请中所涉及的发明范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述发明构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本申请中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。The above description is only a preferred embodiment of the present application and an illustration of the applied technical principles. Those skilled in the art should understand that the scope of the invention involved in this application is not limited to the technical solution formed by the specific combination of the above-mentioned technical features, and should also cover the technical solutions formed by the above-mentioned technical features or without departing from the above-mentioned inventive concept. Other technical solutions formed by any combination of equivalent features. For example, a technical solution formed by replacing the above-mentioned features with technical features with similar functions disclosed in (but not limited to) this application.

Claims (18)

1. a kind of method for obtaining information, which is characterized in that the method includes:
The information inquiring request information sent by virtual private networks tunnel is received, described information inquiry request information includes mark Inscribe information, source address and destination address;
Destination address is extracted from described information inquiry request information, inquires the virtual private that the destination address is corresponded in tunnel table There is the first number of network tunnel, and numbers corresponding virtual private networks tunnel by described first and send described information inquiry Solicited message, the tunnel table are used to characterize the correspondence between the number and address in virtual private networks tunnel;
It receives and numbers the correspondence described information inquiry request information that corresponding virtual private networks tunnel is sent by described first Result information, the result information include target information, update destination address and update source address;
Correspond to the virtual private networks tunnel of the update destination address in inquiry tunnel table second is numbered, and passes through described the The corresponding virtual private networks tunnel of two numbers sends the result information.
2. according to the method described in claim 1, it is characterized in that, the method further include the steps that structure tunnel table, it is described Build tunnel table the step of include:
For each virtual private networks tunnel at least one virtual private networks tunnel, for the virtual private networks tunnel Setting number, and receive the address that the virtual private networks tunnel opposite end is sent;
The first correspondence between each number and the address of the corresponding number is established, and tunnel is established by the first correspondence Road table.
3. according to the method described in claim 1, it is characterized in that, the method further include the steps that structure information inquiry table, The step of structure information inquiry table includes:
Receive information sharing request, described information sharing request include shared information heading message and shared information correspondingly Location;
The second correspondence between each heading message and the address of the corresponding heading message is established, and corresponds to and closes by second System establishes information inquiry table.
4. according to the method described in claim 3, it is characterized in that, the method further includes:
Described information inquiry table is sent by virtual private networks tunnel.
5. a kind of method for obtaining information, which is characterized in that the method includes:
Receive information acquisition request information, described information obtain solicited message be used to indicate obtain virtual private networks on specify Target information;
In response to there are the heading messages of the target information in information inquiry table, the mesh will be corresponded in described information inquiry table The address of mark information is set as destination address, and sets local address to source address, and described information inquiry table is marked for characterizing Inscribe the correspondence between information and the address of the corresponding heading message;
The heading message, source address and destination address are packaged into information inquiring request information, and pass through virtual private networks Tunnel sends described information inquiry request information;
The result information for the correspondence described information inquiry request information that reception is sent by the virtual private networks tunnel, and from Target information is parsed in the result information.
6. a kind of method for obtaining information, which is characterized in that the method includes:
The information inquiring request information sent by virtual private networks tunnel is received, described information inquiry request information includes mark Inscribe information, source address and destination address;
Parse heading message, source address and destination address from described information inquiry request information, and by source address and target Address is respectively set to update destination address and updates source address;
The corresponding target information of the heading message, update destination address and update source address are packaged into result information, and led to It crosses the virtual private networks tunnel and sends the result information.
7. according to the method described in claim 6, it is characterized in that, the method further includes:
Information sharing request is sent by the virtual private networks tunnel, described information sharing request includes the mark of shared information Inscribe information and the corresponding address of shared information.
8. the method according to the description of claim 7 is characterized in that the method further includes:
For shared information, permission is set, and
It is described that the corresponding target information of the heading message, update destination address and update source address are packaged into result information packet It includes:
In response to the source address within the scope of setting address, then by the corresponding target information of the heading message, more fresh target Address and update source address are packaged into result information.
9. a kind of for obtaining the device of information, which is characterized in that described device includes:
Information inquiring request information receiving unit, for receiving the information inquiring request letter sent by virtual private networks tunnel Breath, described information inquiry request information includes heading message, source address and destination address;
Information inquiring request information transmitting unit inquires tunnel for extracting destination address from described information inquiry request information First number in the virtual private networks tunnel of the destination address is corresponded in road table, and numbers corresponding void by described first Quasi- private network tunnel sends described information inquiry request information, and the tunnel table is used to characterize the volume in virtual private networks tunnel Correspondence number between address;
Result information receiving unit numbers the correspondence that corresponding virtual private networks tunnel is sent for receiving by described first The result information of described information inquiry request information, the result information include target information, update destination address and update source Address;
Result information transmission unit corresponds to the virtual private networks tunnel for updating destination address for inquiring in tunnel table Second number, and number corresponding virtual private networks tunnel by described second and send the result information.
10. device according to claim 9, which is characterized in that described device further includes tunnel table construction unit, is used for structure Built tunnel table, the tunnel table construction unit include:
Tunnel number equipment subelement, for each virtual private networks tunnel at least one virtual private networks tunnel, It is numbered for being arranged for the virtual private networks tunnel, and receives the address that the virtual private networks tunnel opposite end is sent;
Tunnel table builds subelement, for establishing the first correspondence between each number and the address of the corresponding number, and Tunnel table is established by the first correspondence.
11. device according to claim 9, which is characterized in that described device further includes information inquiry table construction unit, is used In structure information inquiry table, described information inquiry table construction unit includes:
Receiving subelement is asked in information sharing, and for receiving information sharing request, described information sharing request includes shared information Heading message and the corresponding address of shared information;
Information inquiry table builds subelement, for establishing second between each heading message and the address of the corresponding heading message Correspondence, and information inquiry table is established by the second correspondence.
12. according to the devices described in claim 11, which is characterized in that described device further includes:
Information inquiry table transmission unit, for sending described information inquiry table by virtual private networks tunnel.
13. a kind of for obtaining the device of information, which is characterized in that described device includes:
Information acquisition request information receiving unit, for receiving information acquisition request information, described information obtains solicited message and uses The target information specified on virtual private networks is obtained in instruction;
Address setting unit is used in response to there are the heading messages of the target information in information inquiry table by described information The address that the target information is corresponded in inquiry table is set as destination address, and sets local address to source address, the letter Breath inquiry table is used to characterize the correspondence between heading message and the address of the corresponding heading message;
First information transmission unit, for the heading message, source address and destination address to be packaged into information inquiring request letter Breath, and described information inquiry request information is sent by virtual private networks tunnel;
First information receiving unit is asked for receiving the correspondence described information sent by virtual private networks tunnel inquiry The result information of information is sought, and target information is parsed from the result information.
14. a kind of for obtaining the device of information, which is characterized in that described device includes:
Second information receiving unit, it is described for receiving the information inquiring request information sent by virtual private networks tunnel Information inquiring request information includes heading message, source address and destination address;
Unit is changed in address, for parsing heading message, source address and destination address from described information inquiry request information, And source address and destination address are respectively set to update destination address and update source address;
Second information transmitting unit, for by the corresponding target information of the heading message, update destination address and update source Location is packaged into result information, and sends the result information by the virtual private networks tunnel.
15. device according to claim 14, which is characterized in that described device further includes:
Information sharing request transmitting unit, for sending information sharing request, the letter by the virtual private networks tunnel Breath sharing request includes heading message and the corresponding address of shared information of shared information.
16. device according to claim 15, which is characterized in that described device further includes:
For shared information, permission is set, and
Second information transmitting unit includes:
In response to the source address within the scope of setting address, then by the corresponding target information of the heading message, more fresh target Address and update source address are packaged into result information.
17. a kind of server, including:
One or more processors;
Memory, for storing one or more programs,
When one or more of programs are executed by one or more of processors so that one or more of processors Perform claim requires any method in 1 to 4.
18. a kind of computer-readable medium, is stored thereon with computer program, which is characterized in that the program is executed by processor Methods of the Shi Shixian as described in any in Claims 1-4.
CN201810121458.0A 2018-02-07 2018-02-07 Method and device for obtaining information Active CN108337148B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810121458.0A CN108337148B (en) 2018-02-07 2018-02-07 Method and device for obtaining information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810121458.0A CN108337148B (en) 2018-02-07 2018-02-07 Method and device for obtaining information

Publications (2)

Publication Number Publication Date
CN108337148A true CN108337148A (en) 2018-07-27
CN108337148B CN108337148B (en) 2019-10-18

Family

ID=62927031

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810121458.0A Active CN108337148B (en) 2018-02-07 2018-02-07 Method and device for obtaining information

Country Status (1)

Country Link
CN (1) CN108337148B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101119222A (en) * 2007-09-13 2008-02-06 杭州华三通信技术有限公司 Method, device and system for implementing multicast of HOPE network
CN101599901A (en) * 2009-07-15 2009-12-09 杭州华三通信技术有限公司 The method of remotely accessing MPLS VPN, system and gateway
US20120030071A1 (en) * 2004-11-23 2012-02-02 Kent Felske Secure, differentiated reading of sensors and rfid tags
CN104219125A (en) * 2013-05-31 2014-12-17 华为技术有限公司 Method, device and system for forwarding message in information-centric network ICN
CN105939240A (en) * 2015-11-25 2016-09-14 杭州迪普科技有限公司 Load balancing method and device
CN106209559A (en) * 2016-07-12 2016-12-07 华为技术有限公司 A kind of method and apparatus setting up Multicast Tunnel
CN106888145A (en) * 2017-03-17 2017-06-23 新华三技术有限公司 A kind of VPN resource access methods and device
CN106992916A (en) * 2017-03-02 2017-07-28 广西大学 A kind of electric power dispatching system and implementation method based on virtual private cloud

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120030071A1 (en) * 2004-11-23 2012-02-02 Kent Felske Secure, differentiated reading of sensors and rfid tags
CN101119222A (en) * 2007-09-13 2008-02-06 杭州华三通信技术有限公司 Method, device and system for implementing multicast of HOPE network
CN101599901A (en) * 2009-07-15 2009-12-09 杭州华三通信技术有限公司 The method of remotely accessing MPLS VPN, system and gateway
CN104219125A (en) * 2013-05-31 2014-12-17 华为技术有限公司 Method, device and system for forwarding message in information-centric network ICN
CN105939240A (en) * 2015-11-25 2016-09-14 杭州迪普科技有限公司 Load balancing method and device
CN106209559A (en) * 2016-07-12 2016-12-07 华为技术有限公司 A kind of method and apparatus setting up Multicast Tunnel
CN106992916A (en) * 2017-03-02 2017-07-28 广西大学 A kind of electric power dispatching system and implementation method based on virtual private cloud
CN106888145A (en) * 2017-03-17 2017-06-23 新华三技术有限公司 A kind of VPN resource access methods and device

Also Published As

Publication number Publication date
CN108337148B (en) 2019-10-18

Similar Documents

Publication Publication Date Title
EP3800934B1 (en) Method for routing internet of things service
KR101877188B1 (en) Service layer interworking using mqtt protocol
US10313410B2 (en) Systems and methods using binary dynamic rest messages
CN105359095B (en) Method and apparatus for resource virtualization using virtualization agents and contextual information
CN113572835B (en) Data processing method, network element equipment and readable storage medium
CN106797400A (en) System and method for making it possible to access third party's service via service layer
CN106664515B (en) Method for transmitting content between terminals via a service control device link
Li et al. 6G cloud-native system: Vision, challenges, architecture framework and enabling technologies
CN103747004A (en) Realizing method of internet of things communication protocol
CN105191171B (en) A valid user, service or content representation for device communication
WO2016011885A1 (en) Information transmission method and apparatus
KR102094041B1 (en) System having the Semantic Engine based on RDF Graph for Autonomous Interaction between IoT Devices in Real-Time
CN110489474B (en) Data processing method, device, medium and electronic equipment
WO2025007643A1 (en) Satellite service function chain access method and apparatus, electronic device, and storage medium
WO2023103367A1 (en) Data transmission method and related device
CN116527733A (en) User terminal differentiated control method and device, equipment and storage
JP2017208797A (en) Integrated data networking across heterogeneous networks
US20150047009A1 (en) Access control method, access control system and access control device
CN107222365B (en) Data processing method and device and server
CN112995005B (en) Virtual network data exchange method and device
CN109005250B (en) Method and apparatus for accessing a server
CN108337148B (en) Method and device for obtaining information
CN108900637A (en) Method for transmitting information and device
CN115037572B (en) Application request identification method and device
CN107612831B (en) A method and device for transmitting data message for accessing source station

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant