CN110417874B - Method and device for acquiring patch data - Google Patents

Method and device for acquiring patch data Download PDF

Info

Publication number
CN110417874B
CN110417874B CN201910610976.3A CN201910610976A CN110417874B CN 110417874 B CN110417874 B CN 110417874B CN 201910610976 A CN201910610976 A CN 201910610976A CN 110417874 B CN110417874 B CN 110417874B
Authority
CN
China
Prior art keywords
patch
user equipment
node
package
patch package
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.)
Active
Application number
CN201910610976.3A
Other languages
Chinese (zh)
Other versions
CN110417874A (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.)
New H3C Security Technologies Co Ltd
Original Assignee
New H3C Security Technologies 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 New H3C Security Technologies Co Ltd filed Critical New H3C Security Technologies Co Ltd
Priority to CN201910610976.3A priority Critical patent/CN110417874B/en
Publication of CN110417874A publication Critical patent/CN110417874A/en
Application granted granted Critical
Publication of CN110417874B publication Critical patent/CN110417874B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • H04L67/63Routing a service request depending on the request content or context

Abstract

The embodiment of the application provides a method and a device for acquiring patch data, which relate to the technical field of network communication, and the method comprises the following steps: receiving a first patch request message sent by first user equipment; inquiring second user equipment corresponding to the first patch package according to a pre-stored local resource list; if the second user equipment is not inquired, inquiring second node equipment corresponding to the first patch package according to a pre-stored network resource list; if the second node equipment corresponding to the first patch package is inquired, redirecting the first patch request message to the second node equipment; and receiving a first response message sent by the second node equipment, and sending the first response message to the first user equipment, so that the first user equipment acquires the patch data of the first patch package according to the first response message. By adopting the method and the device, the flow can be prevented from being blocked when a large number of user equipment simultaneously communicate the patch packages.

Description

Method and device for acquiring patch data
Technical Field
The present application relates to the field of network communication technologies, and in particular, to a method and an apparatus for acquiring patch data.
Background
Currently, a large enterprise network usually has tens of thousands of hosts (i.e., user devices) that can be connected to an egress switch through a node device to communicate with servers in the internet through the egress switch. Generally, an enterprise network may be divided into a plurality of areas, and each area may include a plurality of user equipments, for example, user equipments under a certain network segment belong to the same area. Each area is provided with a node device, the node device is connected with each user device in the area, and can also be connected with other node devices in the network, and each node device is connected with an exit switch.
These user devices need to update patch packages, such as patches of an operating system or application programs, periodically during operation. At this time, the user equipment sends the patch request message to the node equipment in the local area, and the node equipment sends the patch request message to a server in the internet through an egress switch. After receiving the patch request message, the server sends the corresponding patch data to the outlet switch, and the outlet switch sends the patch data to the user equipment through the node equipment.
However, because the number of the user equipments in the network is large, when a large number of user equipments simultaneously send request messages, the traffic of the egress switch is too large, which causes traffic congestion.
Disclosure of Invention
An object of the embodiments of the present application is to provide a method and an apparatus for obtaining patch data, so as to prevent traffic congestion when a large number of user equipments communicate patch packets simultaneously. The specific technical scheme is as follows:
in a first aspect, a method for obtaining patch data is provided, where the method is applied to a first node device in a network, the first node device is connected to user devices in an area to which the first node device belongs, and the network further includes other node devices belonging to other areas, and the method includes:
receiving a first patch request message sent by first user equipment, wherein the first patch request message is used for requesting patch data of a first patch package;
inquiring second user equipment corresponding to the first patch package according to a pre-stored local resource list, wherein the local resource list comprises the corresponding relation between each user equipment and the stored patch packages;
if the second user equipment is not inquired, inquiring second node equipment corresponding to the first patch package according to a pre-stored network resource list, wherein the network resource list comprises corresponding relations between the other node equipment and patch packages stored in other areas;
if the second node equipment corresponding to the first patch package is inquired, redirecting the first patch request message to the second node equipment so that the second node equipment determines third user equipment storing the first patch package, and generating a first response message according to a preset network address of the third user equipment;
and receiving the first response message sent by the second node device, and sending the first response message to the first user device, so that the first user device obtains the patch data of the first patch package according to the first response message.
Optionally, the method further includes:
if the second user equipment is inquired, generating a second response message carrying the network address of the second user equipment or carrying patch data of a first patch package according to a preset network address of the second user equipment;
and sending the second response message to the first user equipment, so that the first user equipment acquires the patch data of the first patch package according to the second response message.
Optionally, the generating a second response packet carrying the network address of the second user equipment or carrying the patch data of the first patch package according to the preset network address of the second user equipment includes:
generating a second response message containing the network address of the second user equipment according to the preset network address of the second user equipment; alternatively, the first and second electrodes may be,
redirecting the first patch request message to the second user equipment according to a preset network address of the second user equipment, receiving patch data of the first patch package sent by the second user equipment, and generating a second response message containing the patch data of the first patch package.
Optionally, the method further includes:
if the second node equipment corresponding to the first patch package is not inquired, the first patch request message is sent to a server;
receiving a third response message sent by the server, wherein the third response message carries the patch data of the first patch packet or the download address of the first patch packet;
and sending the third response message to the first user equipment.
Optionally, the method further includes:
and adding the corresponding relation between the first user equipment and the first patch package in the local area resource list, and sending an update message to the other node equipment, wherein the update message carries the identifier of the first node equipment and the identifier of the first patch package, so that the other node equipment adds the corresponding relation between the first node equipment and the first patch package in a stored network resource list.
Optionally, the method further includes:
and carrying out local caching on the patch data of the first patch package.
Optionally, before querying the second user equipment corresponding to the first patch package according to the pre-stored local resource list, the method further includes:
if the patch data of the first patch package exists in the patch data of each patch package cached locally, sending the patch data of the first patch package to the first user equipment;
and if the patch data of the first patch package does not exist in the patch data of each patch package cached locally, executing the step of querying the second user equipment corresponding to the first patch package according to a pre-stored local area resource list.
Optionally, the method further includes:
receiving a second patch request message sent by a third node device through redirection, wherein the second patch request message is used for requesting patch data of a second patch package;
inquiring fourth user equipment corresponding to the second patch package according to the pre-stored local resource list;
generating a fourth response message according to a preset network address of fourth user equipment;
and sending the fourth response message to the third node device.
In a second aspect, an apparatus for obtaining patch data is provided, where the apparatus is applied to a first node device in a network, the first node device is connected to user devices in an area to which the first node device belongs, the network further includes other node devices in other areas, and the apparatus includes:
a first receiving module, configured to receive a first patch request packet sent by a first user equipment, where the first patch request packet is used to request patch data of a first patch package;
the first query module is used for querying second user equipment corresponding to the first patch package according to a pre-stored local resource list, wherein the local resource list comprises the corresponding relation between each user equipment and the stored patch package;
a second query module, configured to query, according to a pre-stored network resource list, a second node device corresponding to the first patch package if the second user device is not queried, where the network resource list includes a correspondence between the other node device and a patch package already stored in the other area;
a redirection module, configured to redirect the first patch request packet to a second node device if a second node device corresponding to the first patch package is queried, so that the second node device determines a third user device storing the first patch package, and generates a first response packet according to a preset network address of the third user device;
a first sending module, configured to receive the first response packet sent by the second node device, and send the first response packet to the first user device, so that the first user device obtains the patch data of the first patch package according to the first response packet.
With reference to the second aspect, in a first implementation manner of the second aspect, the apparatus further includes:
a first generating module, configured to generate, if the second user equipment is queried, a second response packet carrying a network address of the second user equipment or patch data of a first patch packet according to a preset network address of the second user equipment;
and the second sending module is used for sending the second response message to the first user equipment so that the first user equipment can obtain the patch data of the first patch package according to the second response message.
With reference to the second aspect, in a second implementation manner of the second aspect, the first generating module is specifically configured to:
generating a second response message containing the network address of the second user equipment according to the preset network address of the second user equipment; alternatively, the first and second electrodes may be,
redirecting the first patch request message to the second user equipment according to a preset network address of the second user equipment, receiving patch data of the first patch package sent by the second user equipment, and generating a second response message containing the patch data of the first patch package.
With reference to the second aspect, in a third implementation manner of the second aspect, the apparatus further includes:
a third sending module, configured to send the first patch request packet to a server if the second node device corresponding to the first patch package is not queried;
a second receiving module, configured to receive a third response packet sent by the server, where the third response packet carries the patch data of the first patch packet or a download address of the first patch packet;
and the fourth sending module is configured to send the third response packet to the first user equipment.
With reference to the second aspect, in a fourth implementation manner of the second aspect, the apparatus further includes:
a fifth sending module, configured to add, in the local area resource list, a corresponding relationship between the first user equipment and the first patch package, and send an update packet to the other node equipment, where the update packet carries an identifier of the first node equipment and an identifier of the first patch package, so that the other node equipment adds, in a stored network resource list, a corresponding relationship between the first node equipment and the first patch package.
With reference to the second aspect, in a fifth implementation manner of the second aspect, the apparatus further includes:
and the storage module is used for locally caching the patch data of the first patch package.
With reference to the second aspect, in a sixth implementation manner of the second aspect, the apparatus further includes:
a sixth sending module, configured to send the patch data of the first patch package to the first user equipment if the patch data of the first patch package exists in the patch data of each locally cached patch package;
and if the patch data of the first patch package does not exist in the patch data of each patch package cached locally, triggering the first query module to execute the step of querying the second user equipment corresponding to the first patch package according to the pre-stored local area resource list.
With reference to the second aspect, in a seventh implementation manner of the second aspect, the apparatus further includes:
a third receiving module, configured to receive a second patch request packet sent by a third node device through redirection, where the second patch request packet is used to request patch data of a second patch package;
the third query module is configured to query, according to the pre-stored local resource list, fourth user equipment corresponding to the second patch package;
the second generating module is used for generating a fourth response message according to a preset network address of fourth user equipment;
a seventh sending module, configured to send the fourth response packet to the third node device.
In a third aspect, a network device is provided, which includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of the first aspect when executing a program stored in the memory.
In a fourth aspect, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, and when executed by a processor, the computer program implements the method steps of any of the first aspects.
In a fifth aspect, there is provided a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of any of the first aspects above.
The method and the device for acquiring patch data provided by the embodiment of the application can be applied to first node equipment in a network, the first node equipment is connected with each user equipment in an area to which the first node equipment belongs, and the network also comprises other node equipment belonging to other areas. When the first user equipment requests patch data of the first patch package, the first node equipment firstly queries second user equipment corresponding to the first patch package in the local area resource list. And if the second user equipment is not inquired, further inquiring second node equipment corresponding to the first patch package in the network resource list. And if the second node equipment corresponding to the first patch package is inquired, redirecting the first patch request message to the second node equipment so that the second node equipment determines third user equipment storing the first patch package, and generating a first response message according to a preset network address of the third user equipment. Then, the first node device receives a first response message sent by the second node device, and sends the first response message to the first user device, so that the first user device obtains the patch data of the first patch package according to the first response message. In the processing process, the first node equipment does not need to repeatedly download the downloaded patch packages in the network, and when a large number of user equipment simultaneously communicate the patch packages, the flow of the outlet switch can be effectively reduced, and the flow blockage is prevented.
Of course, not all advantages described above need to be achieved at the same time in the practice of any one product or method of the present application.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic diagram of a network system according to an embodiment of the present application;
fig. 2 is a flowchart of a method for obtaining patch data according to an embodiment of the present disclosure;
fig. 3 is a schematic diagram of contents of a patch request message according to an embodiment of the present application;
fig. 4 is a flowchart of an example of a method for obtaining patch data according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an apparatus for acquiring patch data according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of a network device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The embodiment of the application provides a method for acquiring patch data, which can be applied to any node device (which may be called a first node device) in a network. The node device may be a network device having a four-layer to seven-layer message parsing function. For example, the node device may be a Next Generation Firewall (NGFW), an Intrusion Prevention System device (IPS), an Application Control Gateway (ACG), or the like. Generally, a network may be divided into a plurality of areas, and each area may contain a plurality of user equipments, for example, user equipments on a certain network segment belong to the same area, or some user equipments are logically divided into a certain Autonomous System (AS). Each area is provided with a node device, the node device is connected to each user device in the area to which the node device belongs, and may also be connected to other node devices in the network, and each node device is connected to an egress switch, as shown in fig. 1, which is a schematic diagram of a network system provided in the embodiment of the present application.
Optionally, in this embodiment of the present application, each node device in the network may be a member device in a Peer-to-Peer (P2P for short) system. To facilitate management of each node device, a master device may be deployed that maintains network addresses of all node devices. The network address may be an Internet Protocol (IP) address and/or a Media Access Control (MAC) address. Other node devices may communicate with the master device by default. The Master device may be one of the plurality of node devices, or may additionally deploy one device as a Master device.
In the embodiment of the application, each node device may store its own device information table, its own region resource table, its own network resource table, and its own network address table. For convenience of understanding, the present embodiment first describes a management process of each node device, and contents and a generation process of the related entry, which are specifically described as follows.
When a new node device (which may be referred to as a target node device) in the P2P system comes online, a local device information table may be generated, and as shown in table one, the device information table may include at least the following fields.
Watch 1
Figure BDA0002122359520000081
Figure BDA0002122359520000091
Since only one node device is provided in each area, the identifier of the area to which each node device belongs can be used as the identifier of the node device.
The network neighbor is an identifier of other node equipment which has a direct route with the node equipment in the network, and the content of a network neighbor field can be null in an initial equipment information table generated after the target node equipment is on-line.
The node update time is the time when the local table entry is updated last time (the local table entry includes the device information table, the local area resource list and the network resource list).
The content of the local resource list will be described in detail later.
The target node device may also determine a master device in the network (e.g., may be preconfigured by a technician or determined by a preset discovery Protocol, such as a Border Gateway Protocol (BGP) Protocol), and then the target node device may send a node query request to the master device. The node query request may be a HyperText Transfer Protocol (HTTP) request message or a HyperText Transfer security Protocol (HTTPs) request message, and may carry indication information requesting a network address list corresponding to each node device, and optionally, the indication information may be a Uniform Resource Locator (URL) in the HTTP request or the HTTPs request message.
The master device may store a network address list corresponding to each node device, as shown in table two.
Watch two
Figure BDA0002122359520000092
Figure BDA0002122359520000101
And after receiving the node query request, the master device sends the network address list to the target node device. After receiving the network address list, the target node device may broadcast and send a resource query request to each node device according to the network address of each node device. The resource query request may be an HTTP request message or an HTTPs request message, the node query request may carry indication information requesting an identifier of a patch package stored in each node device, and optionally, the indication information may be a URL in the HTTP request message or the HTTPs request message.
Each node device may store a local area resource list, and the local area resource list may include a correspondence between each user device connected to the node device and a stored patch package. The target node device may also obtain an identifier (such as a name) of a patch package in each user device in the local area and an identifier (such as an IP address) of each user device after the target node device is online, and then generate a local area resource list. As shown in table three, this is an example of the local resource list.
Watch III
Name of patch package IP address of user equipment
MS01-11 11.168.1.10
MS11-04 11.168.1.20
MS17-010 11.168.1.30
MS11-34 11.168.1.40
After receiving the resource query request, each node device may determine, according to the local area resource list stored in the node device, an identifier of a patch package stored in each user device in the local area, and then may send a resource response message to the target node device, where the resource response message includes a network address of the node device and the identifier of the patch package stored in each user device in the local area. The resource response message may be an HTTP response message or an HTTPs response message, and optionally, the content may be carried by a load field of the HTTP response message or the HTTPs response message.
The target node device may generate a network resource list according to the received resource response message sent by each node device. The network resource list may be as shown in table four.
Watch four
Name of patch package IP address of node device
MS01-012 12.168.2.1
MS11-022 13.168.3.1
MS17-012 14.168.4.1
MS11-032 15.168.5.1
The method for querying monitoring information provided in the embodiment of the present application will be described in detail below with reference to specific embodiments, as shown in fig. 2, the specific steps are as follows.
Step 201, a first patch request message sent by a first user equipment is received.
The first patch request message is used for requesting patch data of the first patch package.
In this embodiment of the present application, when a certain user equipment (i.e., a first user equipment) needs to update a first patch package, the first user equipment may send a first patch request message to a node equipment (i.e., a first node equipment) in an area to which the first user equipment belongs, where the first patch request message is used to request patch data of the first patch package. For example, the first patch request message may carry a first patch packet, where the first patch request message may be an HTTP request message or an HTTPs request message, and the HTTP request message or the HTTPs request message may carry a Uniform Resource Identifier (URI) corresponding to the first patch packet.
After receiving the first patch request packet, the first node device may parse the first patch request packet to obtain a URI corresponding to the first patch packet. As shown in fig. 3, a schematic diagram of contents of a patch request packet provided in an embodiment of the present application is provided, where the patch request packet is an HTTP request packet, and at least includes the following fields and contents:
HEAD (Chinese: HEAD information)
/v9/1/windowsupdate/redir/muv4wuredir.cab1511070213HTTP/1.1\r\n
Expert Info (Chat/Sequence) (Chinese: Expert information):
HEAD/v9/1/wi ndowsupdate/redir/muv4wur edir.cab1 511070213HTTP/1.1\r\n]
request Method (Chinese: Method of Request): HEAD
Request URI (Chinese: URI of Request):
/v9/1/wi ndowsupdate/redir/muv4wur edir.cab1511070213
request version (Chinese: Request version): HTTP/1.1
Connection (Chinese: Connection) Keep-alive \ r \ n
Accept (Chinese: receiving):/' r \ n
User-Agent (Chinese: User Agent): Windows-Update-Agent \ r \ n
Host (Chinese: Host) is download
[ FulL request _ URI (Chinese: URI of request generic):
http://download.windowsupdate.com/v9/1/windowsupdate/r edir/muv4wuredir.cab15110702131[HTTP request 1/1]
wherein, "/v 9/1/wi owsunpdate/redir/" in URI is storage path of the patch package, and "muv 4wur edge. cab1511070213" is name of the patch package. The specific meaning of each field may refer to the existing HTTP protocol, and is not described in detail in this embodiment.
The first node device may obtain the URI carried in the first patch request packet, and further obtain the name of the patch package from the URI for subsequent query.
Step 202, querying the second user equipment corresponding to the first patch package according to the pre-stored local resource list.
The local area resource list includes the corresponding relationship between each user equipment and the stored patch package.
In this embodiment, the first node device may query, according to the name of the first patch package, the second user device corresponding to the first patch package in the local area resource list stored locally. The content of the local resource list can be as shown in table three above, and is not described here again.
If the second user equipment is inquired, the first node equipment generates a second response message carrying the network address of the second user equipment or carrying the patch data of the first patch package according to a preset network address of the second user equipment, and then sends the second response message to the first user equipment, so that the first user equipment can obtain the patch data of the first patch package according to the second response message.
In this embodiment of the present application, if the first node device queries the second user device in the resource list of the current region, it indicates that the user device that carries the first patch package exists in the current region. The first node device may obtain the network address of the second user device from the local resource list.
Then, a response packet (for convenience of distinguishing, may be referred to as a second response packet) carrying the network address of the second user equipment or carrying the patch data of the first patch packet may be generated according to the network address of the second user equipment, and the second response packet is further sent to the first user equipment. The first user equipment may obtain the patch data of the first patch package according to the second response packet. The second response message may be an HTTP response message or an HTTPs response message, and the content may be carried by a load field of the HTTP response message or the HTTPs response message.
Optionally, there are multiple ways for the first node device to generate the second response packet, and this embodiment of the present application provides two feasible processing ways, which are specifically as follows.
In the first mode, the first node device generates a second response message containing the network address of the second user device according to the preset network address of the second user device.
In this embodiment, the first node device may directly encapsulate the second response packet according to the network address of the second user device, so as to obtain the second response packet including the network address of the second user device. Then, the first node device may send the second response packet to the first user device.
After receiving the second response packet, the first user equipment may analyze the second response packet to obtain a network address of the second user equipment, and then, the first user equipment sends a patch request packet (which may be referred to as a third patch request packet) to the second network equipment according to the network address of the second user equipment. The third patch request message is used for requesting the patch data of the first patch package.
After receiving the patch request message, the second user equipment may obtain the stored patch data of the first patch package, and then send the patch data of the first patch package to the first user equipment.
In the second mode, the first node device redirects the first patch request message to the second user device according to a preset network address of the second user device, receives patch data of the first patch package sent by the second user device, and generates a second response message containing the patch data of the first patch package.
In this embodiment, the first node device may redirect the first patch request packet to the second user device according to the network address of the second user device.
After receiving the patch request message, the second user equipment may obtain the stored patch data of the first patch package, and then send the patch data of the first patch package to the first node equipment.
After receiving the patch data of the first patch package sent by the second user equipment, the first node equipment may generate a second response packet including the patch data of the first patch package. Then, the first node device sends the second response message to the first user device. After receiving the second response packet, the first user equipment may analyze the second response packet to obtain the patch data of the first patch package.
If the second user equipment is not queried, step 203 is performed.
Step 203, if the second user equipment is not queried, querying the second node equipment corresponding to the first patch package according to a pre-stored network resource list.
The network resource list includes the corresponding relationship between other node devices and patch packages stored in other areas.
In this embodiment of the application, if the first node device does not inquire the second user device in the resource list of the local area, it indicates that there is no user device downloading the first patch package in the local area. The first node device may further query, in a locally stored network resource list, the second node device corresponding to the first patch packet, where the content of the network resource list may be as shown in table four above, and is not described here again.
Step 204, if the second node device corresponding to the first patch package is queried, the first patch request message is redirected to the second node device, so that the second node device determines a third user device storing the first patch package, and generates a first response message according to a preset network address of the third user device.
In this embodiment of the application, if the first node device queries the second node device corresponding to the first patch package, it indicates that the user device downloading the first patch package exists in the area to which the second node device belongs. The first node device may redirect the first patch request packet to the second node device, so that the second node device determines the third user device storing the first patch package, and generates the first response packet according to a preset network address of the third user device.
The manner in which the second node device generates the first response packet may refer to the description related to the manner one and the manner two for generating the second response packet in step 202, and is not described herein again.
Optionally, for the case that multiple second node devices are found, the first node device may determine, from the multiple second node devices, a node device with the closest communication distance (for example, a node device with the least number of routing hops), and then redirect the first patch request packet to the determined second node device.
Optionally, if the first user equipment requests to download a plurality of first patch packages at the same time, and a plurality of node devices capable of providing the first patch packages exist in the network, the first node device may generate a plurality of redirection messages respectively according to a preset load balancing policy, where different redirection messages are used to request different first patch packages. Then, the plurality of redirection messages are respectively sent to different node devices, so that data blockage in a certain link in the network is avoided, and the burden of the node devices is reduced.
For example, the first user equipment requests to download 10 patch packages 1 to 10 at the same time, and 5 node devices in the network can provide the 10 patch packages 1 to 10, so that the first node device may request 2 patch packages from each node device respectively. Specifically, the first node device generates one redirection packet (i.e. generates 5 redirection packets) for each node device, where each redirection packet is used to request 2 different patch packages, for example, redirection packet 1 is used to request patch package 1 and patch package 2, redirection packet 2 is used to request patch package 3 and patch package 4, redirection packet 3 is used to request patch package 5 and patch package 6, redirection packet 4 is used to request patch package 7 and patch package 8, and redirection packet 5 is used to request patch package 9 and patch package 10. Then, the 5 redirection messages are respectively sent to the 5 node devices, so that the link blockage corresponding to a certain node device caused by requesting 10 patch packets of data from the node device can be avoided, and the burden of the node device in the network is reduced.
Step 205, receiving a first response packet sent by the second node device, and sending the first response packet to the first user device, so that the first user device obtains the patch data of the first patch package according to the first response packet.
In this embodiment, the first node device may receive a first response packet sent by the second node device, and send the first response packet to the first user device.
The first user equipment may obtain the patch data of the first patch package according to the first response packet. The first response packet may carry a network address of the third user equipment. In this case, after receiving the first response packet, the first user equipment may analyze the first response packet to obtain the network address of the third user equipment. Then, the first user equipment sends a patch request message (which may be referred to as a third patch request message) to the second network device according to the network address of the third user equipment. The third patch request message is used for requesting the patch data of the first patch package. After receiving the patch request message, the third user equipment may obtain the stored patch data of the first patch package, and then send the patch data of the first patch package to the first user equipment.
Alternatively, the first response packet may also carry patch data of the first patch packet. In this case, the first user equipment may analyze the first response packet to obtain the patch data of the first patch package.
Optionally, if the second node device corresponding to the first patch package is not queried, the first node device may send the first patch request packet to the server, and then receive a third response packet sent by the server, where the third response packet carries the patch data of the first patch package or carries the download address of the first patch package, and send the third response packet to the first user device.
In the embodiment of the application, if the second node device corresponding to the first patch package is not queried, it is indicated that the first patch package does not exist in the network. The first node device may send the first patch request message to the server through the egress switch. After receiving the first patch request message, the server may obtain the patch data of the first patch package or the download address of the first patch package, and generate a third response message carrying the patch data of the first patch package and the download address of the first patch package. Then, the server may send the third response packet to the first node device through an egress switch in the network, and the first node device forwards the third response packet to the first user device or forwards the downloaded first patch packet to the first user device.
Optionally, after receiving the third response packet, the first node device may further add the corresponding relationship between the first user device and the first patch package in the local area resource list. Meanwhile, the first node device may also broadcast and send an update message to other node devices. The update packet carries the identifier of the first node device and the identifier of the first patch packet. In this way, after receiving the update packet, the other node device may add the corresponding relationship between the first node device and the first patch package in the network resource list stored in the other node device.
In an example, the first node device may also parse the third response packet, obtain the patch data of the first patch package carried in the third response packet, and then locally cache the patch data of the first patch package. For example, the first node device may store the patch data of the first patch package to a local hard disk, or a plug-in hard disk. Alternatively, the patch data may be stored in a designated storage area such as a data center. In addition, for patch data sent by other node devices, the first node device may or may not perform storage, which is not limited in this embodiment of the present application.
Optionally, for the condition that the first node device caches the patch data, correspondingly, before step 202, the first node device may first determine whether the patch data of the first patch package exists in the patch data of each locally cached patch package, and if so, send the patch data of the first patch package to the first user device; if not, step 202 is performed.
In this embodiment, the first node device may store patch data of the patch package in advance. For example, patch data downloaded from a server may be stored, or patch data transmitted from another node device may be stored, or patch data stored in the first node device may be set by a technician.
In this way, when receiving the first patch request packet sent by the first user equipment, the first node equipment may first determine whether patch data of the first patch package exists in the patch data of each patch package cached locally. And if the first patch package exists, the patch data of the first patch package stored locally is directly acquired, and the patch data is sent to the first user equipment, so that the response speed of the node equipment is improved. If not, step 202 is performed.
Optionally, the first node device may also respond to the patch request packet redirected by the other node device, and the specific processing procedure may be as follows: receiving a second patch request message sent by the third node device through redirection, where the second patch request message is used to request patch data of a second patch package, then querying a fourth user device corresponding to the second patch package according to a pre-stored local resource list, generating a fourth response message according to a preset network address of the fourth user device, and sending the fourth response message to the third node device.
In this embodiment, the first node device may receive a second patch request packet sent by the third node device through redirection. Since the third node device determines that the second patch package is stored in the user device in the area to which the first node device belongs by searching the network resource list, after receiving the second patch request message, the first node device only needs to query the user device (which may be referred to as a fourth user device) corresponding to the second patch package in the local area resource list, and then obtains the network address of the fourth user device. The first node device may generate a fourth response packet according to the network address of the fourth user device, and then send the fourth response packet to the third node device. The manner in which the first node device generates the fourth response packet may refer to the description related to the first manner and the second manner in step 202 for generating the second response packet, and is not described herein again.
In addition, the node device in the network may also send a heartbeat message with the master device, and when a certain node device goes offline or the node device closes the function of obtaining patch data provided in this embodiment of the present application, the node device will not send a heartbeat message to the master device any more. If the master device detects that the heartbeat of a certain node device is overtime, that is, the master device does not receive the heartbeat message of the node device within a preset time length, the master device may broadcast and send a deletion message carrying the node device identifier and the network address to each node device, so that each node device deletes the node device from its own network neighborhood, and deletes the corresponding relationship between the node device and the patch package stored in the area to which the node device belongs from the network resource list.
In another implementation manner, when a certain node device goes offline, or the node device closes the function provided in the embodiment of the present application, an administrator may also delete the node device manually on the master device, so as to trigger the master device to broadcast and send a deletion message carrying the node device identifier and the network address to each node device.
Optionally, after the network address of a certain node device is changed, the node device may also send a first address change message to the master device, and the master device may broadcast and send a second address change message to other node devices, where the second address change message at least includes an identifier of the node device and an updated network address, and may also include a network address before update. In this way, the other node device may update the network address of the node device in each locally stored list.
Optionally, in this embodiment of the present application, the broadcast of each node device may use a Time To Live (TTL) mechanism in the P2P technology. Wherein, the value of TTL is preset, for example, 50s, 20s, etc. And each time the broadcast message is sent, subtracting 1 from the value of the TTL, and stopping the broadcast sending until the value of the TTL is subtracted to 0 so as to avoid broadcast storm.
In this embodiment of the application, when a first user equipment requests patch data of a first patch package, a first node equipment firstly queries a second user equipment corresponding to the first patch package in a local resource list. And if the second user equipment is not inquired, further inquiring second node equipment corresponding to the first patch package in the network resource list. And if the second node equipment corresponding to the first patch package is inquired, redirecting the first patch request message to the second node equipment so that the second node equipment determines third user equipment storing the first patch package, and generating a first response message according to a preset network address of the third user equipment. Then, the first node device receives a first response message sent by the second node device, and sends the first response message to the first user device, so that the first user device obtains the patch data of the first patch package according to the first response message. In the processing process, the first node device does not need to repeatedly download the downloaded patch packages in the network, and when a large number of user devices simultaneously acquire the patch packages, the export switch only needs to download the patch packages once, so that the flow of the export switch can be effectively reduced, the flow blockage is prevented, and the burden of the export switch and the data transmission quantity in the network are reduced.
In addition, in another prior art, a dedicated patch upgrade server for downloading patches is deployed in a network, a large amount of patch packages are stored in the patch upgrade server in advance, and each device in the network downloads the patch packages from the patch upgrade server, so as to reduce the number of times that an egress switch downloads the patch packages. However, in the existing scheme, a special patch upgrade server needs to be deployed, the networking cost is high, and when a large number of user devices simultaneously send request messages, the traffic of the patch upgrade server is too large, which causes traffic congestion. In the scheme, a patch upgrading server does not need to be deployed, so that the network deployment cost is reduced, and meanwhile, because the first node equipment can download the patch package from any node equipment in the network, which stores the patch package, but not from a certain fixed equipment, even if a large number of user equipment simultaneously send request messages, the overlarge traffic and the traffic blockage of the certain equipment can be avoided.
With reference to the scenario shown in fig. 1 and as shown in fig. 4, an embodiment of the present application further provides an example of a method for obtaining patch data, which specifically includes the following steps.
Step 401, a first patch request message sent by a first user equipment is received.
The first patch request message is used for requesting patch data of the first patch package.
Step 402, judging whether patch data of the first patch package is cached locally.
If so, step 403 is performed. If not, step 404 is performed.
Step 403, sending the patch data of the first patch package to the first user equipment.
Step 404, judging whether the second user equipment corresponding to the first patch package is stored in the local area resource list.
If yes, steps 405-406 are performed. If not, step 407 is performed.
Step 405, a second response message is generated.
And the second response message carries the IP address of the second user equipment.
Step 406, sending the second response packet to the first user equipment, so that the first user equipment requests the second user equipment for the patch data of the first patch package according to the IP address of the second user equipment.
Step 407, it is determined whether the second node device corresponding to the first patch package is stored in the network resource list.
If yes, steps 408-409 are executed. If not, steps 410-412 are performed.
Step 408, the first patch request packet is redirected to the second node device, so that the second node device determines the third user device storing the first patch packet, and generates a first response packet carrying the IP address of the third user device.
Step 409, receiving a first response message sent by the second node device, and sending the first response message to the first user device, so that the first user device requests the third user device for patch data of the first patch package according to the IP address of the third user device.
Step 410, sending the first patch request message to a server.
Step 411, receiving a third response message sent by the server.
The third response message carries patch data of the first patch packet;
step 412, sending the third response packet to the first user equipment, and locally caching the patch data of the first patch package.
The processing procedure of step 401 to step 412 may refer to the related description of step 201 to step 205, and is not described herein again.
Based on the same technical concept, an embodiment of the present application further provides an apparatus for acquiring patch data, as shown in fig. 5, where the apparatus is applied to a first node device in a network, the first node device is connected to user devices in an area to which the first node device belongs, the network further includes other node devices belonging to other areas, and the apparatus includes:
a first receiving module 510, configured to receive a first patch request message sent by a first user equipment, where the first patch request message is used to request patch data of a first patch package;
a first query module 520, configured to query, according to a pre-stored local resource list, second user equipment corresponding to the first patch package, where the local resource list includes a correspondence between each user equipment and a stored patch package;
a second query module 530, configured to query, according to a pre-stored network resource list, a second node device corresponding to the first patch package if the second user device is not queried, where the network resource list includes correspondence between other node devices and patch packages already stored in other areas;
a redirecting module 540, configured to redirect the first patch request packet to the second node device if the second node device corresponding to the first patch package is queried, so that the second node device determines a third user device storing the first patch package, and generates a first response packet according to a preset network address of the third user device;
the first sending module 550 is configured to receive a first response packet sent by the second node device, and send the first response packet to the first user device, so that the first user device obtains the patch data of the first patch package according to the first response packet.
Optionally, the apparatus further comprises:
the first generation module is used for generating a second response message carrying the network address of the second user equipment or carrying patch data of the first patch package according to a preset network address of the second user equipment if the second user equipment is inquired;
and the second sending module is used for sending the second response message to the first user equipment so that the first user equipment can obtain the patch data of the first patch package according to the second response message.
Optionally, the first generating module is specifically configured to:
generating a second response message containing the network address of the second user equipment according to the preset network address of the second user equipment; alternatively, the first and second electrodes may be,
and redirecting the first patch request message to the second user equipment according to a preset network address of the second user equipment, receiving patch data of the first patch package sent by the second user equipment, and generating a second response message containing the patch data of the first patch package.
Optionally, the apparatus further comprises:
the third sending module is used for sending the first patch request message to the server if the second node equipment corresponding to the first patch package is not inquired;
the second receiving module is used for receiving a third response message sent by the server, wherein the third response message carries the patch data of the first patch packet or the download address of the first patch packet;
and the fourth sending module is used for sending the third response message to the first user equipment.
Optionally, the apparatus further comprises:
a fifth sending module, configured to add, in the local resource list, a corresponding relationship between the first user equipment and the first patch package, and send an update packet to the other node equipment, where the update packet carries an identifier of the first node equipment and an identifier of the first patch package, so that the other node equipment adds, in the stored network resource list, the corresponding relationship between the first node equipment and the first patch package.
Optionally, the apparatus further comprises:
and the storage module is used for locally caching the patch data of the first patch package.
Optionally, the apparatus further comprises:
a sixth sending module, configured to send the patch data of the first patch package to the first user equipment if the patch data of the first patch package exists in the patch data of each patch package cached locally;
if the patch data of the first patch package does not exist in the patch data of each patch package cached locally, the first query module 520 is triggered to execute the step of querying the second user equipment corresponding to the first patch package according to the pre-stored local resource list.
Optionally, the apparatus further comprises:
a third receiving module, configured to receive a second patch request message sent by the third node device through redirection, where the second patch request message is used to request patch data of a second patch package;
the third query module is used for querying fourth user equipment corresponding to the second patch package according to a pre-stored local resource list;
the second generating module is used for generating a fourth response message according to a preset network address of fourth user equipment;
and a seventh sending module, configured to send the fourth response packet to the third node device.
In this embodiment of the application, when a first user equipment requests patch data of a first patch package, a first node equipment firstly queries a second user equipment corresponding to the first patch package in a local resource list. And if the second user equipment is not inquired, further inquiring second node equipment corresponding to the first patch package in the network resource list. And if the second node equipment corresponding to the first patch package is inquired, redirecting the first patch request message to the second node equipment so that the second node equipment determines third user equipment storing the first patch package, and generating a first response message according to a preset network address of the third user equipment. Then, the first node device receives a first response message sent by the second node device, and sends the first response message to the first user device, so that the first user device obtains the patch data of the first patch package according to the first response message. In the processing process, the first node equipment does not need to repeatedly download the downloaded patch packages in the network, and when a large number of user equipment simultaneously communicate the patch packages, the flow of the outlet switch can be effectively reduced, and the flow blockage is prevented.
The embodiment of the present application further provides a network device, as shown in fig. 6, which includes a processor 601, a communication interface 602, a memory 603, and a communication bus 604, where the processor 601, the communication interface 602, and the memory 603 complete mutual communication through the communication bus 604,
a memory 603 for storing a computer program;
the processor 601 is configured to implement the following steps when executing the program stored in the memory 603:
in a first aspect, a method for obtaining patch data is provided, where the method is applied to a first node device in a network, the first node device is connected to user devices in an area to which the first node device belongs, and the network further includes other node devices belonging to other areas, and the method includes:
receiving a first patch request message sent by first user equipment, wherein the first patch request message is used for requesting patch data of a first patch package;
inquiring second user equipment corresponding to the first patch package according to a pre-stored local resource list, wherein the local resource list comprises the corresponding relation between each user equipment and the stored patch packages;
if the second user equipment is not inquired, inquiring second node equipment corresponding to the first patch package according to a pre-stored network resource list, wherein the network resource list comprises corresponding relations between the other node equipment and patch packages stored in other areas;
if the second node equipment corresponding to the first patch package is inquired, redirecting the first patch request message to the second node equipment so that the second node equipment determines third user equipment storing the first patch package, and generating a first response message according to a preset network address of the third user equipment;
and receiving the first response message sent by the second node device, and sending the first response message to the first user device, so that the first user device obtains the patch data of the first patch package according to the first response message.
Optionally, the method further includes:
if the second user equipment is inquired, generating a second response message carrying the network address of the second user equipment or carrying patch data of a first patch package according to a preset network address of the second user equipment;
and sending the second response message to the first user equipment, so that the first user equipment acquires the patch data of the first patch package according to the second response message.
Optionally, the generating a second response packet carrying the network address of the second user equipment or carrying the patch data of the first patch package according to the preset network address of the second user equipment includes:
generating a second response message containing the network address of the second user equipment according to the preset network address of the second user equipment; alternatively, the first and second electrodes may be,
redirecting the first patch request message to the second user equipment according to a preset network address of the second user equipment, receiving patch data of the first patch package sent by the second user equipment, and generating a second response message containing the patch data of the first patch package.
Optionally, the method further includes:
if the second node equipment corresponding to the first patch package is not inquired, the first patch request message is sent to a server;
receiving a third response message sent by the server, wherein the third response message carries the patch data of the first patch packet or the download address of the first patch packet;
and sending the third response message to the first user equipment.
Optionally, the method further includes:
and adding the corresponding relation between the first user equipment and the first patch package in the local area resource list, and sending an update message to the other node equipment, wherein the update message carries the identifier of the first node equipment and the identifier of the first patch package, so that the other node equipment adds the corresponding relation between the first node equipment and the first patch package in a stored network resource list.
Optionally, the method further includes:
and carrying out local caching on the patch data of the first patch package.
Optionally, before querying the second user equipment corresponding to the first patch package according to the pre-stored local resource list, the method further includes:
if the patch data of the first patch package exists in the patch data of each patch package cached locally, sending the patch data of the first patch package to the first user equipment;
and if the patch data of the first patch package does not exist in the patch data of each patch package cached locally, executing the step of querying the second user equipment corresponding to the first patch package according to a pre-stored local area resource list.
Optionally, the method further includes:
receiving a second patch request message sent by a third node device through redirection, wherein the second patch request message is used for requesting patch data of a second patch package;
inquiring fourth user equipment corresponding to the second patch package according to the pre-stored local resource list;
generating a fourth response message according to a preset network address of fourth user equipment;
and sending the fourth response message to the third node device.
The communication bus mentioned in the network device may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the network device and other devices.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA), or other Programmable logic devices, discrete Gate or transistor logic devices, or discrete hardware components.
Based on the same technical concept, the embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, and the computer program, when being executed by a processor, implements the method steps of the above-mentioned method for detecting an abnormal network device.
Based on the same technical concept, embodiments of the present application further provide a computer program product containing instructions, which when run on a computer, causes the computer to execute the above method for detecting an abnormal network device.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the device, since it is basically similar to the method embodiment, the description is simple, and the relevant points can be referred to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present application, and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims (13)

1. A method for obtaining patch data is applied to a first node device in a network, the first node device is connected with user devices in an area to which the first node device belongs, the network further includes other node devices belonging to other areas, and the method includes:
receiving a first patch request message sent by first user equipment, wherein the first patch request message is used for requesting patch data of a first patch package;
inquiring second user equipment corresponding to the first patch package according to a pre-stored local resource list, wherein the local resource list comprises the corresponding relation between each user equipment and the stored patch packages;
if the second user equipment is not inquired, inquiring second node equipment corresponding to the first patch package according to a pre-stored network resource list, wherein the network resource list comprises corresponding relations between the other node equipment and patch packages stored in other areas;
if the second node equipment corresponding to the first patch package is inquired, redirecting the first patch request message to the second node equipment so that the second node equipment determines third user equipment storing the first patch package, and generating a first response message according to a preset network address of the third user equipment;
receiving the first response message sent by the second node device, and sending the first response message to the first user device, so that the first user device obtains patch data of the first patch package according to the first response message;
if the second node equipment corresponding to the first patch package is not inquired, the first patch request message is sent to a server;
receiving a third response message sent by the server, wherein the third response message carries the patch data of the first patch packet or the download address of the first patch packet;
and sending the third response message to the first user equipment.
2. The method of claim 1, further comprising:
if the second user equipment is inquired, generating a second response message carrying the network address of the second user equipment or carrying patch data of a first patch package according to a preset network address of the second user equipment;
and sending the second response message to the first user equipment, so that the first user equipment acquires the patch data of the first patch package according to the second response message.
3. The method according to claim 2, wherein the generating a second response packet carrying the network address of the second user equipment or carrying the patch data of the first patch package according to the preset network address of the second user equipment includes:
generating a second response message containing the network address of the second user equipment according to the preset network address of the second user equipment; alternatively, the first and second electrodes may be,
redirecting the first patch request message to the second user equipment according to a preset network address of the second user equipment, receiving patch data of the first patch package sent by the second user equipment, and generating a second response message containing the patch data of the first patch package.
4. The method of claim 1, further comprising:
and adding the corresponding relation between the first user equipment and the first patch package in the local area resource list, and sending an update message to the other node equipment, wherein the update message carries the identifier of the first node equipment and the identifier of the first patch package, so that the other node equipment adds the corresponding relation between the first node equipment and the first patch package in a stored network resource list.
5. The method of claim 1, further comprising:
and carrying out local caching on the patch data of the first patch package.
6. The method according to any one of claims 1 to 3, wherein before querying the second user equipment corresponding to the first patch package according to the pre-stored local resource list, the method further includes:
if the patch data of the first patch package exists in the patch data of each patch package cached locally, sending the patch data of the first patch package to the first user equipment;
and if the patch data of the first patch package does not exist in the patch data of each patch package cached locally, executing the step of querying the second user equipment corresponding to the first patch package according to a pre-stored local area resource list.
7. The method of claim 1, further comprising:
receiving a second patch request message sent by a third node device through redirection, wherein the second patch request message is used for requesting patch data of a second patch package;
inquiring fourth user equipment corresponding to the second patch package according to the pre-stored local resource list;
generating a fourth response message according to a preset network address of fourth user equipment;
and sending the fourth response message to the third node device.
8. An apparatus for obtaining patch data, wherein the apparatus is applied to a first node device in a network, the first node device is connected to user devices in an area to which the first node device belongs, the network further includes other node devices in other areas, and the apparatus includes:
a first receiving module, configured to receive a first patch request packet sent by a first user equipment, where the first patch request packet is used to request patch data of a first patch package;
the first query module is used for querying second user equipment corresponding to the first patch package according to a pre-stored local resource list, wherein the local resource list comprises the corresponding relation between each user equipment and the stored patch package;
a second query module, configured to query, according to a pre-stored network resource list, a second node device corresponding to the first patch package if the second user device is not queried, where the network resource list includes a correspondence between the other node device and a patch package already stored in the other area;
a redirection module, configured to redirect the first patch request packet to a second node device if a second node device corresponding to the first patch package is queried, so that the second node device determines a third user device storing the first patch package, and generates a first response packet according to a preset network address of the third user device;
a first sending module, configured to receive the first response packet sent by the second node device, and send the first response packet to the first user device, so that the first user device obtains patch data of the first patch package according to the first response packet;
a third sending module, configured to send the first patch request packet to a server if the second node device corresponding to the first patch package is not queried;
a second receiving module, configured to receive a third response packet sent by the server, where the third response packet carries the patch data of the first patch packet or a download address of the first patch packet;
and the fourth sending module is configured to send the third response packet to the first user equipment.
9. The apparatus of claim 8, further comprising:
a first generating module, configured to generate, if the second user equipment is queried, a second response packet carrying a network address of the second user equipment or patch data of a first patch packet according to a preset network address of the second user equipment;
and the second sending module is used for sending the second response message to the first user equipment so that the first user equipment can obtain the patch data of the first patch package according to the second response message.
10. The apparatus of claim 9, wherein the first generating module is specifically configured to:
generating a second response message containing the network address of the second user equipment according to the preset network address of the second user equipment; alternatively, the first and second electrodes may be,
redirecting the first patch request message to the second user equipment according to a preset network address of the second user equipment, receiving patch data of the first patch package sent by the second user equipment, and generating a second response message containing the patch data of the first patch package.
11. The apparatus of claim 8, further comprising:
a fifth sending module, configured to add, in the local area resource list, a corresponding relationship between the first user equipment and the first patch package, and send an update packet to the other node equipment, where the update packet carries an identifier of the first node equipment and an identifier of the first patch package, so that the other node equipment adds, in a stored network resource list, a corresponding relationship between the first node equipment and the first patch package.
12. The network equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing the communication between the processor and the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1 to 7 when executing a program stored in the memory.
13. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1 to 7.
CN201910610976.3A 2019-07-08 2019-07-08 Method and device for acquiring patch data Active CN110417874B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910610976.3A CN110417874B (en) 2019-07-08 2019-07-08 Method and device for acquiring patch data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910610976.3A CN110417874B (en) 2019-07-08 2019-07-08 Method and device for acquiring patch data

Publications (2)

Publication Number Publication Date
CN110417874A CN110417874A (en) 2019-11-05
CN110417874B true CN110417874B (en) 2022-02-25

Family

ID=68360606

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910610976.3A Active CN110417874B (en) 2019-07-08 2019-07-08 Method and device for acquiring patch data

Country Status (1)

Country Link
CN (1) CN110417874B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114079609A (en) * 2020-08-03 2022-02-22 阿里巴巴集团控股有限公司 Network system control method, device, equipment, medium and network system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103345412A (en) * 2013-07-10 2013-10-09 华为技术有限公司 Patching method and device
CN106210029A (en) * 2016-07-06 2016-12-07 北京金山安全软件有限公司 Multi-address downloading method, device and terminal
CN107872486A (en) * 2016-09-28 2018-04-03 华为技术有限公司 Communication means and device
CN109104353A (en) * 2018-09-21 2018-12-28 新华三信息安全技术有限公司 A kind of method and device of data transmission

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10178184B2 (en) * 2015-01-21 2019-01-08 Oracle International Corporation System and method for session handling in a multitenant application server environment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103345412A (en) * 2013-07-10 2013-10-09 华为技术有限公司 Patching method and device
CN106210029A (en) * 2016-07-06 2016-12-07 北京金山安全软件有限公司 Multi-address downloading method, device and terminal
CN107872486A (en) * 2016-09-28 2018-04-03 华为技术有限公司 Communication means and device
CN109104353A (en) * 2018-09-21 2018-12-28 新华三信息安全技术有限公司 A kind of method and device of data transmission

Also Published As

Publication number Publication date
CN110417874A (en) 2019-11-05

Similar Documents

Publication Publication Date Title
CN111262938B (en) DNS server selection method and proxy server
US10673718B2 (en) Traceroutes for discovering the network path of inbound packets transmitted from a specified network node
US9712422B2 (en) Selection of service nodes for provision of services
EP3021534B1 (en) A network controller and a computer implemented method for automatically define forwarding rules to configure a computer networking device
CN106331216B (en) Domain name resolution method and device
CN107528862B (en) Domain name resolution method and device
US20150264009A1 (en) Client-selectable routing using dns requests
US20030097590A1 (en) Personal firewall with location dependent functionality
US20060224670A1 (en) File distribution method and client terminal implementing the same
JP7056893B2 (en) Application programming interface Methods, devices, API gateways, and programs for transmitting API requests.
KR20120096580A (en) Method and system for preventing dns cache poisoning
EP2343867B1 (en) System and method of reducing intranet traffic on bottleneck links in a telecommunications network
US11252651B2 (en) Network slice selection
CN104081749B (en) The address resolution of DAD-NS triggerings for dos attack protection
US20140297890A1 (en) Dynamic network action based on dhcp notification
IL280889A (en) Nonce injection and observation system for detecting eavesdroppers
US20230126039A1 (en) Method for delivering an audio and/or video content in a mobile network infrastructure
CN111769997A (en) Method, server, device and computer readable medium for network monitoring
US10608981B2 (en) Name identification device, name identification method, and recording medium
CN110417874B (en) Method and device for acquiring patch data
US11153106B2 (en) System for improved traffic handling in a network
US20200186463A1 (en) Method and system for name-based in-networking processing
KR20030027485A (en) Method And Apparatus For Content Routing Of Content Level In The Content Delivery Network
CN112565203B (en) Centralized management platform
CN115396513A (en) Flow control method and device, storage medium and electronic equipment

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