CN106301944B - Router network transfer read-write method and transfer server - Google Patents

Router network transfer read-write method and transfer server Download PDF

Info

Publication number
CN106301944B
CN106301944B CN201610779069.8A CN201610779069A CN106301944B CN 106301944 B CN106301944 B CN 106301944B CN 201610779069 A CN201610779069 A CN 201610779069A CN 106301944 B CN106301944 B CN 106301944B
Authority
CN
China
Prior art keywords
router
unit
read
message
user
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
CN201610779069.8A
Other languages
Chinese (zh)
Other versions
CN106301944A (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.)
Wuhan Changjiang Computing Technology Co ltd
Fiberhome Telecommunication Technologies Co Ltd
Original Assignee
Shanghai Feixun Data Communication 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 Shanghai Feixun Data Communication Technology Co Ltd filed Critical Shanghai Feixun Data Communication Technology Co Ltd
Priority to CN201610779069.8A priority Critical patent/CN106301944B/en
Publication of CN106301944A publication Critical patent/CN106301944A/en
Application granted granted Critical
Publication of CN106301944B publication Critical patent/CN106301944B/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
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/12Discovery or management of network topologies
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/60Router architectures

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a network transfer read-write method of a router, which comprises the following steps: receiving a read-write request message of a user; extracting the router address in the read-write request message, and judging the type of the read-write request message; when the request message is judged to be read, searching the cached configuration state data of the router according to the extracted address of the router, and generating a response message of the read operation according to the searched cache configuration state data of the router; and when the request message is judged to be write operation, forwarding an initiating operation request to the router according to the extracted router address, and forwarding an operation response message returned to the router. The present invention also provides a network transit server of a router, comprising: the device comprises a receiving module, a message processing module and a cache module, wherein the message processing module is respectively connected with the receiving module and the cache module. By the method and the device, the pressure of the server is reduced, the bandwidth consumption is reduced, and the user experience is improved.

Description

Router network transfer read-write method and transfer server
Technical Field
The invention relates to the field of network transfer, in particular to a router network transfer read-write method and a transfer server.
Background
With the development of internet technology, a plurality of household devices need to be connected to the internet to form an intelligent home system. The router is used as an entrance of an intelligent home and is widely applied. The existing intelligent router generally supports the function of remote control, and a user can directly control the router at home through APP software on the mobile terminal, so that convenience and safety are realized.
Generally, according to network conditions, routers can be divided into a public network router and a private network router, the so-called public network router refers to a router which obtains a public network IP address after dialing through PPPOE, and APP can directly control the public network router through the public network IP address; the private network router is a subordinate device with a public network IP device and only has a private IP address. The APP can not directly control the private network router, and generally transit is performed through a long connection server.
Because most routers generally exist in a private network and do not have a public network IP, the data message of the APP managing and controlling the router at each time is transferred through the server, and the server faces two problems:
(1) due to the large number of requests, performance consumption is large.
(2) Too many request data messages cause large network bandwidth consumption.
Disclosure of Invention
The invention provides a transfer read-write method of a router network aiming at the problems in the prior art. The invention solves the bottleneck problems of performance and network bandwidth when the server faces to manage massive routers.
On one hand, the invention provides a network transfer read-write method of a router, the technical scheme is as follows, comprising the following steps:
s100, receiving a read-write request message of a user;
s200, extracting a router address in the read-write request message, and judging the type of the read-write request message;
when the request message is judged to be a read operation, executing step S300;
when the request message is judged to be write operation, executing step S400;
s300, according to the extracted address of the router, searching cached configuration state data of the router, and generating a response message of the read operation according to the searched cache configuration state data of the router;
s400, according to the extracted router address, forwarding an operation request to the router, and forwarding and returning an operation response message of the router.
The basic idea of the scheme is that the read-write request message is divided into a read operation and a write operation for separate processing, and the read operation is to read information of the device, such as a device state, a device list and the like. The write operation includes a set operation to the device. Most of the operations of the user belong to the read operation, and if the state of the device is not changed, the return result of the read operation is the same. Therefore, the idea of the scheme is to keep the configuration state of each router, and when there is a read operation request, the cached configuration state of the router is directly returned. Therefore, the speed of directly returning data by the server is high, and the user experience is improved; if the configuration state of the router is cached by the server, a read operation request does not need to be initiated to the router, so that the interaction times with the router are reduced, and the pressure of the server is relieved; after the interaction times are reduced, the data messages are reduced, and the consumption of network bandwidth is reduced.
Further preferably, the step S300 further includes the steps of:
s310, according to the extracted router address, judging whether configuration state data of the router is cached or not, if yes, executing a step S320; otherwise, executing step S400;
s320, generating a response message of the read operation according to the searched cache configuration state data of the router.
The scheme is a supplement to the above scheme, and even if the request message is a read operation, it is also determined whether the requested router configuration information is cached in our server, and if the configuration information of the request router does not exist in our cache, we still need to initiate a request to the corresponding router.
Further preferably, the method further comprises the following steps:
s350, when the configuration of the router changes, receiving changed configuration state data sent by the router;
s360, updating the cached configuration state data according to the changed configuration state data sent by the router.
The configuration state of the router is not changed in a layer, so that once the configuration state of the router is changed, the router sends the changed configuration information to the server for updating in real time, and therefore the configuration information cached in the server is up-to-date and accurate, and wrong information returned to a client is avoided.
Further preferably, in step S300, the cache configuration status data of the router is stored in a form of < Key, Value >, where the address of the router is used as Key, and the configuration item is used as Value.
The MAC address of the router is used as an index, and the MAC (Media Access Control or Medium Access Control) address is translated into a Media Access Control, or a physical address or a hardware address, to define the location of the network device. In the OSI model, a third layer network layer is responsible for IP addresses and a second layer data link layer is responsible for MAC addresses. Thus, a host will have a MAC address and each network location will have an IP address specific to it. Then stored is the configuration of the router, which is divided by function. Each piece of data is stored according to the form of < K, V >, K is Key, V is Value, MAC address is Key, configuration item is corresponding Value, Value is stored by JSON format, for example, the router has the configuration of function1, function2 and function 3. { "function 1": value1 "," function2 ": value 2", "function 3": value3 "}. The storage is convenient for subsequent search, so that the feedback speed is higher.
Further preferably, the step S400 further includes the steps of:
s410, according to the router address, forwarding and initiating a request to the router;
s420, judging whether an operation response message of the router is received within preset time; if yes, go to step S430, otherwise go to step S440;
s430, transferring an operation response message returned to the router;
s440, judging that the state of the router is abnormal, and generating and sending the abnormal message of the router.
The scheme adds a step of judging the feedback message of the router, and assumes that if a certain router is broken or has other faults, after a server initiates a request to the router, the router can not give the feedback message within the preset time, and the server can preliminarily judge that the state of the router is abnormal and then inform the user of the message, so that the user can find the message in time and the user experience is improved.
Certainly, the determining step is based on the user initiating the request, so if we want to find in time without causing the bottleneck problem of the network bandwidth, we can also let our server actively initiate a read operation request to the router under the condition of small request amount and abundant network bandwidth, on one hand, if the fed back router configuration information changes, the configuration information of the router can be updated, on the other hand, if no feedback exists, the abnormal state of the router can be found in time and actively sent to the user, so that the user can also know the abnormal state information of the router in time under the condition of not sending the request.
In another aspect, the present invention further provides a network transit server of a router, including: the message processing module is respectively connected with the receiving module and the cache module, the message processing module comprises an extraction unit, a judgment unit, a transfer unit and an operation unit, the operation unit is respectively connected with the extraction unit, the judgment unit and the transfer unit, and the operation unit is also connected with the extraction unit and the judgment unit, wherein:
the receiving module receives a read-write request of a user;
the extracting unit extracts the router address in the read-write request message, and the judging unit judges the type of the read-write request message;
when the judging unit judges that the request message is read, the operating unit searches the configuration state data of the router cached by the cache module according to the address of the router extracted by the extracting unit, generates a response message of the read operation according to the searched cache configuration state data of the router, and returns the response message to the user;
when the judging unit judges that the request message is write operation, the transfer unit initiates a write operation request to the router according to the router address extracted by the extracting unit, and the operating unit sends a write operation response message of the router returned by the transfer unit to a user.
The receiving module is mainly used for receiving the request of the user, and is equivalent to providing an interface accessed by the user, and the server acquires the request information of the user from the interface. The message processing module performs corresponding operation processing on the request information, the cache module is used for caching the configuration state information of each router for calling when the message processing module processes the message, and the cache module caches the configuration state information of each router, so that the message module can directly search corresponding router information in the cache module when processing the read operation message, and then directly returns the router information to the user without initiating a request to the router, thereby reducing the interaction times of the two parties, reducing the performance consumption of the server, and having higher feedback speed!
Preferably, when the determining unit determines that the request message is a read operation, the determining unit further determines whether the cache module caches configuration state data of the router according to the router address extracted by the extracting unit, if so, the operating unit searches the configuration state data of the router cached by the cache module, and generates a response message of the read operation according to the searched cache configuration state data of the router and returns the response message to the user; if not, the relay unit initiates a read operation request to the router according to the router address extracted by the extraction unit, and the operation unit sends a read operation response message of the router returned by the relay unit to a user.
On the basis of the server, the server requests data from the cache under the condition that the judgment message is read operation, if the data exists in the cache, the request is successful, the server directly returns, and if the request is unsuccessful, the server indicates that the corresponding data does not exist in the cache, the server initiates the request to the routing equipment.
Further preferably, the system further comprises an updating module, the updating module is connected with the message processing module and the caching module, wherein:
when the configuration information of the router changes, the updating module receives the changed configuration information sent by the router, and updates the configuration information of the router in the caching module.
The connection between the server and the router is maintained, if the state of the router changes once, the changed configuration is sent to the server in real time, so that the server can maintain the latest router configuration
Further preferably, the configuration status data of the router in the cache module is stored in a form of < Key, Value >, wherein the address of the router is used as Key, and the configuration item is used as Value.
The router configuration information is stored with the MAC address of the router as an index, and then the configuration of the router is stored, the configuration being divided by function. Each piece of data is stored according to the form of < K, V >, K is Key, V is Value, MAC address is Key, configuration item is corresponding Value, Value is stored by JSON format, for example, the router has the configuration of function1, function2 and function 3. { "function 1": value1 "," function2 ": value 2", "function 3": value3 "}.
Further preferably, the message processing module further comprises a reminder unit; the reminding unit is connected with the judging unit, wherein:
when the transit unit initiates an operation request to the router according to the router address,
the judging unit judges whether the transfer unit receives an operation response message of the router within preset time; if so, the operation unit sends the operation response message of the router returned by the transfer unit to a user, otherwise, the reminding unit sends a reminding message of the abnormal state of the router to the user.
The server is additionally provided with a reminding unit, when a user initiates a request and the server transfers the request to a corresponding router, if the router does not respond within a preset time, the router is likely to have a fault and an abnormal state, at the moment, a reminding message of the abnormal state of the router is sent to the user through the reminding unit, so that the user can take corresponding measures, the scheme is more humanized, and the user experience is improved.
Certainly, because the scheme is established that the server abnormality can be detected only under the condition that a user actively initiates a request to view, if the user wants to actively find the abnormal condition and timely inform the user, a monitoring module can be arranged on the server, and a read operation request is actively initiated to the router under the conditions that the request amount of the server is not large and the network bandwidth is abundant.
The method for forwarding, reading and writing the router network and the server provided by the invention can bring the following beneficial effects:
(1) the speed of directly returning data by the server is high, and the user experience is improved.
(2) The interaction times of the server and the router are reduced, and the pressure of the server is relieved.
(3) After the interaction times are reduced, the data messages are reduced, and the consumption of network bandwidth is reduced.
Drawings
The above features, technical characteristics, advantages and realisations of a slide and easel conversion device will be further described in the following, in a clearly understandable manner, with reference to the accompanying drawings, illustrating preferred embodiments.
Fig. 1 is a flowchart of a first embodiment of a method for forwarding read/write in a router network according to the present invention;
fig. 2 is a flowchart of a second embodiment of a method for forwarding read/write in a router network according to the present invention;
fig. 3 is a flowchart of a third embodiment of a method for forwarding read/write in a router network according to the present invention;
fig. 4 is a block diagram of a first embodiment of a transit server in a router network according to the present invention;
fig. 5 is a block diagram of a second embodiment of a transit server in a router network according to the present invention;
fig. 6 is a block diagram of a third embodiment of a transit server in a router network according to the present invention;
fig. 7 is a block diagram of a fourth embodiment of a transit server in a router network according to the present invention;
fig. 8 is a flowchart of a fourth embodiment of a method for forwarding read/write in a router network according to the present invention;
fig. 9 is a block diagram of a data cache module of the transit server in the router network according to the present invention.
Detailed Description
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following description will be made with reference to the accompanying drawings. It is obvious that the drawings in the following description are only some examples of the invention, and that for a person skilled in the art, other drawings and embodiments can be derived from them without inventive effort.
For the sake of simplicity, the drawings only schematically show the parts relevant to the present invention, and they do not represent the actual structure as a product. In addition, in order to make the drawings concise and understandable, components having the same structure or function in some of the drawings are only schematically illustrated or only labeled. In this document, "one" means not only "only one" but also a case of "more than one".
In one aspect, the present invention provides a network transit read-write method for a router, where a first embodiment of the method is shown in fig. 1, and the method includes the steps of:
s100, receiving a read-write request message of a user;
s200, extracting the router address in the read-write request message, and judging the type of the read-write request message;
when the request message is judged to be a read operation, executing step S300;
when the request message is judged to be a write operation, executing step S400;
s300, searching the cached configuration state data of the router according to the extracted address of the router, and generating a response message of the read operation according to the searched cache configuration state data of the router;
s400 transfers the initiation operation request to the router according to the extracted router address, and transfers the operation response message returned to the router.
In the embodiment, the read operation and the write operation are processed separately, and the configuration information of the router is stored in the cache, so that if the router is a read operation, the configuration information of the corresponding router can be directly found in the cache and then returned to the user. And for the write operation, the write operation request is transferred to the corresponding router through the server to complete the write operation request, and then the corresponding router feeds back the corresponding response message to be transferred to the user through the server.
A second embodiment of the method, shown in fig. 2, comprises the steps of:
s100, receiving a read-write request message of a user;
s200, extracting the router address in the read-write request message, and judging the type of the read-write request message;
when the request message is judged to be a read operation, executing step S310;
when the request message is judged to be a write operation, executing step S400;
s310, judging whether configuration state data of the router is cached or not according to the extracted router address, and if yes, executing the step S320; otherwise, executing step S400;
s320, generating a response message of the read operation according to the searched cache configuration state data of the router;
s400 transfers the initiation operation request to the router according to the extracted router address, and transfers the operation response message returned to the router.
In this embodiment, when the read operation is performed, the requested router configuration information is not cached in the server, and at this time, the configuration information of the router still needs to be obtained by forwarding the configuration information to the corresponding router through the server, so as to be cached and sent to the user.
Preferably, on the basis of the above embodiment, if the state of the router changes once, the changed configuration is sent to the server in real time, so that the server can maintain the latest router configuration.
Preferably, the cache configuration state data of the router cached by the server is stored in a form of < Key, Value >, wherein the address of the router is used as Key, and the configuration item is used as Value. The MAC address of the router is used as an index, and then the configuration of the router is stored, and the configuration is divided according to functions. Each piece of data is stored according to the form of < K, V >, K is Key, V is Value, MAC address is Key, configuration item is corresponding Value, Value is stored by JSON format, for example, the router has the configuration of function1, function2 and function 3. { "function 1": value1 "," function2 ": value 2", "function 3": value3 "}. The storage is convenient for subsequent search, so that the feedback speed is higher.
A third embodiment of the method, as shown in fig. 3, comprises the steps of:
s100, receiving a read-write request message of a user;
s200, extracting the router address in the read-write request message, and judging the type of the read-write request message;
when the request message is judged to be a read operation, executing step S300;
when the request message is judged to be a write operation, executing step S410;
s300, searching the cached configuration state data of the router according to the extracted address of the router, and generating a response message of the read operation according to the searched cache configuration state data of the router;
s410, transferring and initiating a request to the router according to the address of the router;
s420, judging whether an operation response message of the router is received within preset time; if yes, go to step S430, otherwise go to step S440;
s430 transferring the operation response message returned to the router;
s440 judges the state of the router is abnormal, and generates and sends the abnormal message of the router.
In this embodiment, when a write operation is added to the first embodiment, it is determined whether the router has a response within a predetermined time, so as to find whether the router is abnormal.
Of course, the determination may also be performed on the basis of embodiment 2, that is, it can be determined whether the router is abnormal or not only when the user initiates the request and the server needs to initiate the request to the router.
Of course, preferably, the server may also actively initiate a read operation request to the router when the request amount is small and the network bandwidth is sufficient, on one hand, if the fed back router configuration information changes, the configuration information of the router may be updated, on the other hand, if the fed back router configuration information does not change, the abnormal state of the router may be timely discovered and actively sent to the user, so that the user may also know the abnormal state information of the router in time without sending a request. This preferred scheme not only improves the user experience, but also does not create a burden on the server.
On the other hand, the present invention further provides a network transit server of a router, where a first embodiment of the server is shown in fig. 4, and the server includes: the message processing module 20 is respectively connected with the receiving module 10 and the buffer module 30, the message processing module 20 includes an extracting unit 21, a judging unit 22, a transferring unit 24 and an operating unit 23, the operating unit 23 is respectively connected with the extracting unit 21, the judging unit 22 and the transferring unit 24, the operating unit 23 is further connected with the extracting unit 21 and the judging unit 22, wherein:
the receiving module 10 receives a read-write request of a user;
the extracting unit 21 extracts the router address in the read-write request message, and the judging unit 22 judges the type of the read-write request message;
when the determining unit 22 determines that the request message is a read operation, the operating unit 23 searches the configuration status data of the router cached by the cache module 30 according to the address of the router extracted by the extracting unit 21, and generates a response message of the read operation according to the searched cache configuration status data of the router and returns the response message to the user;
when the judging unit 22 judges that the request message is a write operation, the relay unit 24 initiates a write operation request to the router according to the router address extracted by the extracting unit 21, and the operating unit 23 sends a write operation response message of the router returned by the relay unit 24 to the user.
The receiving module 10 is mainly used for receiving a request of a user, and is equivalent to providing an interface accessed by the user, and the server acquires the request information of the user from the interface. The message processing module 20 performs corresponding operation processing on the request information, and the cache module 30 is used for caching the configuration state information of each router for the message processing module 20 to call.
After the receiving module 10 receives a request of a user, for example, an APP request, the message processing module 20 extracts an MAC address in the message, where the MAC address is an MAC address of a corresponding router, and determines a message type, and if the message is a read operation, requests data from a cache and directly returns the data; if the user initiates the write operation, a request needs to be initiated to the router, then the router is waited to return the message, and the message is sent to the APP after being received. The reading operation is to read the information of the device, such as the device state, the device list and other configuration information, and the cache module 30 caches the configuration state information of the router, so the message processing module 20 can directly return the configuration information of the router to the user after querying the cache module 30, thereby reducing the number of times of interaction with the router, alleviating the pressure of the server, having high feedback speed, and improving the user experience.
Preferably, when the determining unit 22 determines that the request message is a read operation, the determining unit 22 further determines whether the cache module 30 caches configuration state data of the router according to the router address extracted by the extracting unit 21, if so, the operating unit 23 searches the configuration state data of the router cached by the cache module 30, and generates a response message of the read operation according to the searched cache configuration state data of the router and returns the response message to the user; if not, the relay unit 24 initiates a read operation request to the router according to the router address extracted by the extraction unit 21, and the operation unit 23 sends a read operation response message of the router returned by the relay unit 24 to the user.
The relay module in this embodiment is equivalent to a small message route, and after the judgment module judges correspondingly, the relay module sends request messages sent by different users to different routers. The operation module is mainly used for processing request information which can be returned by directly searching the cache data of the server and feeding back a response message returned by the transfer module to the user.
A second embodiment of the server is shown in fig. 5, and based on the first embodiment, the server further includes an updating module, where the updating module is connected to the message processing module 20 and the cache module 30, and after the state of the router changes, the router actively sends the changed configuration information to the updating module to update in the cache module 30.
Preferably, the configuration status data of the router in the cache module 30 is stored in a form of < Key, Value >, where the address of the router is used as Key and the configuration item is used as Value. The router configuration information is stored with the MAC address of the router as an index, and then the configuration of the router is stored, the configuration being divided by function. Each piece of data is stored according to the form of < K, V >, K is Key, V is Value, MAC address is Key, and configuration item is corresponding Value.
A third embodiment of the server is shown in fig. 6, and on the basis of the above embodiment, the message processing module 20 further includes a reminding unit; the reminding unit is connected with the judging unit 22, and after the forwarding unit 24 sends a request to the router, when the router has no feedback message within a preset time, the reminding unit sends a reminding message to the user, so that the user experience is improved.
Preferably, a monitoring module may be provided on the server, and under the condition that the request amount of the server is not large and the network bandwidth is sufficient, a read operation request is actively initiated to the router, on one hand, the obtained feedback information may be used to update the configuration state information of the router cached by the caching module 30 in time, and on the other hand, if the feedback information is not obtained, the server may actively send a prompt of abnormal state to a corresponding user.
Finally, as shown in fig. 7, the fourth embodiment of the network transit server of the present invention mainly includes the following modules:
the APP Access interface 401: the module functions to provide an HTTP interface for APP access.
The device connection module 402: the module is used for connecting with the equipment, a TCP long connection is established between the equipment and the server, and the server communicates with the equipment through the channel.
The message processing module 403: the role is responsible for message routing, and because the system needs to support concurrent processing, different requests of different clients need to be processed simultaneously, and the server needs to send corresponding messages to corresponding devices, so that a message routing function is needed.
The data caching module 404: the function is to store the configuration information of the device, and when the configuration of the device is changed, the configuration information needs to be updated.
The specific implementation of the main modules is described in detail below:
the flow chart of the message processing module is shown in fig. 8, and the main steps are described as follows:
waiting for an APP request, if the APP initiates the request, extracting a MAC address in the message, wherein the MAC address is the MAC address of the corresponding router, and the server determines which router device the message is sent to according to the MAC address.
Judging the type of the message, if the message is read, requesting data from the cache, if the data exists in the cache, the request is successful, the server directly returns, and if the request is unsuccessful, the corresponding data does not exist in the cache, and then the request is initiated to the equipment.
If the APP initiates write operation, a request needs to be initiated to the device, then the device is waited to return a message to the server, and the server sends the message to the APP after receiving the message.
Fig. 9 is a structure of a data cache module, and as can be seen from the figure, the MAC address of the router is used as an index, and then the configuration of the router is stored, and the configuration is divided according to functions. Each piece of data is stored according to the form of < K, V >, K is Key, V is Value, MAC address is Key, configuration item is corresponding Value, Value is stored by JSON format, for example, the router has the configuration of function1, function2 and function 3. { "function 1": value1 "," function2 ": value 2", "function 3": value3 "}.
It should be noted that the above embodiments can be freely combined as necessary. The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (10)

1. A network transfer read-write method of a router is characterized by comprising the following steps:
s100, receiving a read-write request message of a user;
s200, extracting the router address in the read-write request message, and judging the type of the read-write request message:
when the request message is judged to be a read operation, executing step S300;
when the request message is judged to be write operation, executing step S400;
s300, according to the extracted address of the router, searching cached configuration state data of the router, and generating a response message of the read operation according to the searched cache configuration state data of the router and returning the response message to a user;
s400, according to the extracted router address, the request message is forwarded to the router, an operation response message of the router is received, and the operation response message is returned to the user.
2. The method as claimed in claim 1, wherein the step S300 further includes the steps of:
s310, according to the extracted router address, judging whether configuration state data of the router is cached or not, if yes, executing a step S320; otherwise, executing step S400;
s320, generating a response message of the read operation according to the searched cache configuration state data of the router and returning the response message to the user.
3. The network transit read-write method of the router according to claim 2, further comprising the steps of:
s350, when the configuration of the router changes, receiving changed configuration state data sent by the router;
s360, updating the cached configuration state data according to the changed configuration state data sent by the router.
4. The method according to claim 1, wherein in step S300, the cache configuration state data of the router is stored in a form of < Key, Value >, where the address of the router is used as Key and the configuration item is used as Value.
5. The network transit read-write method for a router according to any one of claims 1-4, wherein the step S400 further comprises the steps of:
s410, forwarding the request message to the router according to the router address;
s420, judging whether an operation response message of the router is received within preset time; if so,
step S430 is executed, otherwise step S440 is executed;
s430 receives the operation response message of the router, and returns the response message to the user;
s440, judging that the state of the router is abnormal, and generating and sending the abnormal message of the router to a user.
6. A router network transit server, comprising: the message processing module is respectively connected with the receiving module and the cache module, the message processing module comprises an extraction unit, a judgment unit, a transfer unit and an operation unit, the operation unit is respectively connected with the extraction unit, the judgment unit and the transfer unit, and the transfer unit is also respectively connected with the extraction unit and the judgment unit, wherein:
the receiving module receives a read-write request of a user;
the extracting unit extracts the router address in the read-write request message, and the judging unit judges the type of the read-write request message;
when the judging unit judges that the request message is read, the operating unit searches the configuration state data of the router cached by the cache module according to the address of the router extracted by the extracting unit, generates a response message of the read operation according to the searched cache configuration state data of the router, and returns the response message to the user;
when the judging unit judges that the request message is write operation, the transfer unit initiates a write operation request to the router according to the router address extracted by the extracting unit, and the operating unit sends a write operation response message of the router returned by the transfer unit to a user.
7. The router network transit server of claim 6,
when the judging unit judges that the request message is read, the judging unit further judges whether the cache module caches the configuration state data of the router according to the router address extracted by the extracting unit, if so, the operating unit searches the configuration state data of the router cached by the cache module, generates a response message of the read operation according to the searched cache configuration state data of the router, and returns the response message to a user; if not, the relay unit initiates a read operation request to the router according to the router address extracted by the extraction unit, and the operation unit sends a read operation response message of the router returned by the relay unit to a user.
8. The router network transit server of claim 7, further comprising an update module, connected to the message processing module and the cache module, wherein:
when the configuration information of the router changes, the updating module receives the changed configuration information sent by the router, and updates the configuration information of the router in the caching module.
9. The router network transit server of claim 6, wherein the configuration status data of the router in the cache module is stored in a form of < Key, Value >, wherein the address of the router is used as Key and the configuration item is used as Value.
10. The router network transit server of any one of claims 6-9, wherein the message processing module further comprises a reminding unit; the reminding unit is connected with the judging unit, wherein:
when the transit unit initiates an operation request to the router according to the router address,
the judging unit judges whether the transfer unit receives an operation response message of the router within preset time; if so, the operation unit sends the operation response message of the router returned by the transfer unit to a user, otherwise, the reminding unit sends a reminding message of the abnormal state of the router to the user.
CN201610779069.8A 2016-08-30 2016-08-30 Router network transfer read-write method and transfer server Active CN106301944B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610779069.8A CN106301944B (en) 2016-08-30 2016-08-30 Router network transfer read-write method and transfer server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610779069.8A CN106301944B (en) 2016-08-30 2016-08-30 Router network transfer read-write method and transfer server

Publications (2)

Publication Number Publication Date
CN106301944A CN106301944A (en) 2017-01-04
CN106301944B true CN106301944B (en) 2020-02-11

Family

ID=57672706

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610779069.8A Active CN106301944B (en) 2016-08-30 2016-08-30 Router network transfer read-write method and transfer server

Country Status (1)

Country Link
CN (1) CN106301944B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104639371A (en) * 2015-02-02 2015-05-20 北京极科极客科技有限公司 Long-distance router control method
CN105207853A (en) * 2015-10-12 2015-12-30 深圳市万网博通科技有限公司 Local area network monitoring management method
CN105429884A (en) * 2015-10-30 2016-03-23 上海斐讯数据通信技术有限公司 Method and system of managing routers in different networks through terminal
CN105592163A (en) * 2016-01-25 2016-05-18 上海斐讯数据通信技术有限公司 Communication method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104639371A (en) * 2015-02-02 2015-05-20 北京极科极客科技有限公司 Long-distance router control method
CN105207853A (en) * 2015-10-12 2015-12-30 深圳市万网博通科技有限公司 Local area network monitoring management method
CN105429884A (en) * 2015-10-30 2016-03-23 上海斐讯数据通信技术有限公司 Method and system of managing routers in different networks through terminal
CN105592163A (en) * 2016-01-25 2016-05-18 上海斐讯数据通信技术有限公司 Communication method and system

Also Published As

Publication number Publication date
CN106301944A (en) 2017-01-04

Similar Documents

Publication Publication Date Title
US8386587B2 (en) Server-assisted and peer-to-peer synchronization
US9590947B2 (en) IP management method, client and server
KR20160030381A (en) Method, device and router for access webpage
JP2007066161A (en) Cache system
CN102739720A (en) Distributed cache server system and application method thereof, cache clients and cache server terminals
JP2009516273A (en) Data synchronization processing method, client, server, and data synchronization system between client and server
WO2016186530A1 (en) Systems and methods for determining routing information for a network request
US10432577B2 (en) Method and device for redirection to web page
CN103312751A (en) Instant messaging method based on browser
US20140052817A1 (en) Method, apparatus, and network system for acquiring content
CN101207580A (en) System and method for adding and deleting linkman synchronously by instant communication platform and business platform
CN111277483B (en) Multi-terminal message synchronization method, server and storage medium
CN106464745A (en) Dns server, client and data synchronization method
EP2974159B1 (en) Method, device and system for voice communication
US20150006622A1 (en) Web contents transmission method and apparatus
US20180293316A1 (en) Method and system for second-degree friend query
US10122630B1 (en) Methods for network traffic presteering and devices thereof
WO2012028033A1 (en) Method and device for message updating
WO2018192241A1 (en) Server deployment structure and method for implementing inter-network communication
JP2007102301A (en) Mail-synchronizing method and mail-synchronizing device
CN106301944B (en) Router network transfer read-write method and transfer server
WO2010031297A1 (en) Method of wireless application protocol (wap) gateway pull service and system thereof
CN105025042B (en) A kind of method and system of determining data information, proxy server
CN113329042A (en) Message processing method and system, Internet of vehicles system, server and electronic equipment
WO2019242279A1 (en) Message processing method and device

Legal Events

Date Code Title Description
C06 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
TR01 Transfer of patent right

Effective date of registration: 20200828

Address after: 430000 part of the third floor of cable building, Guandong science and Technology Park, Wuhan East Lake New Technology Development Zone, Wuhan, Hubei Province

Patentee after: Wuhan Changjiang Computing Technology Co.,Ltd.

Address before: 201616 Shanghai city Songjiang District Sixian Road No. 3666

Patentee before: Phicomm (Shanghai) Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20240905

Address after: 430000 part of 3rd floor, cable building, Guandong science and Technology Park, Donghu New Technology Development Zone, Wuhan City, Hubei Province

Patentee after: Wuhan Changjiang Computing Technology Co.,Ltd.

Country or region after: China

Patentee after: FIBERHOME TELECOMMUNICATION TECHNOLOGIES Co.,Ltd.

Address before: 430000 part of 3rd floor, cable building, Guandong science and Technology Park, Wuhan Donghu New Technology Development Zone, Wuhan City, Hubei Province

Patentee before: Wuhan Changjiang Computing Technology Co.,Ltd.

Country or region before: China

TR01 Transfer of patent right