Routing network segment configuration and address access method, device, electronic device
By establishing a temporary routing table in Android devices, expanding the routing information of small network segments into routing information of large network segments, the problem that Android devices cannot handle small network segments is solved, and the compatibility and access efficiency of routing configurations are improved.
Patent Information
- Application Number
- CN202211702431.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-28
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2042-12-28
AI Technical Summary
Without ROOT permissions, the existing system APIs of Android devices do not support small network segment routing, resulting in the client being unable to process the small network segment configuration information issued by the server, affecting the compatibility and efficiency of routing configuration.
By establishing a temporary routing table on the client, the small network segment routing information in the network segment configuration information issued by the server is expanded into large network segment routing information, and added to the temporary routing table, replacing the function of the system API, reducing the number of routing entries and improving the accuracy and integrity of routing information.
It improves the compatibility and access efficiency of clients when configuring routing, reduces the requirements for network segment size, reduces the routing matching time, and enhances the information processing capability of temporary routing tables.
Smart Images

Figure CN115996184B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of routing configuration. Specifically, it relates to a method, device, and electronic device for routing network segment configuration and address access. Background Art
[0002] In the general usage mode of Android devices, without ROOT permission (Chinese name: Superuser permission), the Android client cannot directly use the routing addition command to add the configuration information sent by the server. Therefore, the client has to use the system API (Application Program Interface) to add routes. However, for the existing system API on Android devices, its routing addition interface does not support adding small network segment routes. If the client adds small network segment routes, it will receive a system error message, and thus the client will be unable to process the small network segment configuration information sent by the server. Summary of the Invention
[0003] In view of this, the purpose of the embodiments of this application is to provide a method, device, and electronic device for routing network segment configuration and address access, which can enable the client to get rid of the minimum requirement of the API for the network segment size and increase the compatibility of the client when configuring routes.
[0004] In a first aspect, the embodiments of this application also provide a method for routing network segment configuration, which is applied to an Android client and includes: receiving the network segment configuration information sent by the server; establishing a temporary routing table according to the network segment configuration information, where the temporary routing table includes the routing information in the network segment configuration information.
[0005] In the above implementation process, by establishing a corresponding temporary routing table according to the network segment configuration information sent by the server, the routing information in the network segment configuration information is added to the temporary routing table, so as to complete the configuration of the network segment configuration information by the client through the temporary routing table, enabling the client to get rid of the minimum requirement of the API for the network segment size and increasing the compatibility of the client when configuring routes. And when establishing the temporary routing table, multiple network segment configurations are calculated and merged into a small number of routing information, effectively reducing the number of routing entries, and being able to speed up the addition and access parsing of the system routing table information. In addition, by calculating and processing the network segment configuration information, optimizing the network segment configuration information, and then adding routes, the accuracy and integrity of the information in the temporary routing table are improved.
[0006] In an embodiment, the network segment configuration information includes small network segment routing information. Adding the routing information in the network segment configuration information to the temporary routing table includes: expanding the small network segment routing information into large network segment routing information; adding the large network segment routing information to the temporary routing table.
[0007] In the above implementation process, when adding routing information to the temporary routing table, after expanding the routing information of the small network segment into the routing information of the large network segment, the legal parsing of the routing information of the small network segment is realized, the requirement of the client for the size of the issued routing information is reduced, and the compatibility of the client in configuring the routing is increased.
[0008] In a second aspect, an embodiment of the present application provides an address access method, which is applied to an Android client and includes: matching the routing information of the address to be accessed with a temporary routing table, where the temporary routing table is created according to the method in the first aspect or any possible implementation manner of the first aspect; accessing the address to be accessed according to the matching result.
[0009] In the above implementation process, since the temporary routing table contains the routing information of the server, when accessing the address, directly match the routing information of the address to be accessed with the temporary routing table, that is, directly match the routing information of the address to be accessed with the corresponding temporary routing table. Compared with matching the routing information issued by the server with the system routing table of the client, this direct matching with the corresponding temporary routing table can greatly reduce the routing matching time and improve the access efficiency.
[0010] In one embodiment, the method further includes: if the routing information of the address to be accessed is not in the temporary routing table, updating the temporary routing table according to the routing information of the address to be accessed.
[0011] In the above implementation process, when the routing information of the address to be accessed is not in the temporary routing table, by adding the routing information of the address to be accessed to a new temporary routing table, when accessing the address to be accessed, it can be directly matched with the new temporary routing table, reducing the routing matching time of the address to be accessed and improving the access efficiency. In addition, since the temporary routing table includes the configuration information in the server, the routing information of the server can be added to the client, increasing the compatibility of the client in configuring the routing.
[0012] In one embodiment, the updating the temporary routing table according to the routing information of the address to be accessed includes: processing the routing information of the address to be accessed; updating the temporary routing table according to the processed routing information of the address to be accessed.
[0013] In the above implementation process, according to the routing information in the to-be-accessed address, corresponding processing is performed on the routing information in the to-be-accessed address. When the routing information includes small network segment routing information, the small network segment routing information is expanded into large network segment information, and then the temporary routing table is updated through the routing information, enabling the client to get rid of the limitation of the network segment size using the API and increasing the compatibility of the client when configuring the route. In addition, when there are situations such as duplicate or incomplete routing information in the to-be-accessed address, after optimizing through the duplicate or incomplete routing information, route addition is performed, improving the accuracy and integrity of the information in the temporary routing table, and thus being able to improve the access efficiency.
[0014] In one embodiment, the accessing the to-be-accessed address according to the matching result includes: if the routing information of the to-be-accessed address is in the temporary routing table, adding the temporary routing table to the system routing table and accessing the to-be-accessed address.
[0015] In the above implementation process, when the routing table of the to-be-accessed address is matched in the temporary routing table, it indicates that the routing information of the server has been configured in the client. Then, the temporary routing table can be directly added to the system routing table to update the system routing table of the client. When the client accesses a certain address, it can use the new system routing table and directly parse the routing information in the new system routing table to access the corresponding address, improving the access efficiency.
[0016] In a third aspect, an embodiment of the present application further provides a routing network segment configuration device, which is applied to an Android client and includes: a receiving module: used for receiving the network segment configuration information sent by the server; a building module: building a temporary routing table according to the network segment configuration information, where the temporary routing table includes the routing information in the network segment configuration information.
[0017] In a fourth aspect, an embodiment of the present application further provides an address access device, which is applied to an Android client and includes: a matching module: used for matching the to-be-accessed address with the temporary routing table, where the temporary routing table is created according to the method in the first aspect or any possible implementation manner of the first aspect; an accessing module: used for accessing the to-be-accessed address according to the matching result.
[0018] In a fifth aspect, an embodiment of the present application further provides an electronic device, including: a processor and a memory, where the memory stores machine-readable instructions executable by the processor. When the electronic device runs, when the machine-readable instructions are executed by the processor, the steps of the method in the first aspect or any possible implementation of the first aspect, the second aspect, or any possible implementation manner of the second aspect are executed.
[0019] In a sixth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is run by a processor, it executes the steps of the method in the above first aspect, or any possible implementation of the first aspect, the second aspect, or any possible implementation of the second aspect.
[0020] To make the above objects, features, and advantages of the present application more obvious and understandable, specific embodiments are hereinafter given and described in detail in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] To more clearly illustrate the technical solutions of the embodiments of the present application, the following briefly introduces the drawings required in the embodiments. It should be understood that the following drawings only show some embodiments of the present application, and thus should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.
[0022] Figure 1 A schematic diagram showing the interaction between the server and the client provided by an embodiment of the present application;
[0023] Figure 2 A block diagram of an electronic device provided by an embodiment of the present application;
[0024] Figure 3 A flowchart of a routing network segment configuration method provided by an embodiment of the present application;
[0025] Figure 4 A flowchart of an address access method provided by an embodiment of the present application;
[0026] Figure 5 A schematic diagram of functional modules of a routing network segment configuration device provided by an embodiment of the present application;
[0027] Figure 6 A schematic diagram of functional modules of an address access device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0028] The following will describe the technical solutions in the embodiments of the present application in conjunction with the drawings in the embodiments of the present application.
[0029] It should be noted that: similar reference numerals and letters denote similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of the present application, the terms "first", "second", etc. are only used for distinguishing descriptions and cannot be understood as indicating or implying relative importance.
[0030] After the client establishes communication with the server, the server usually sends multiple configuration information to the client. The configuration information includes the configuration information of multiple IP addresses. After receiving the configuration information, the client needs to perform some corresponding configurations on the local machine according to the configuration information.
[0031] The inventors of the present application have discovered through long-term research that when accessing the address of the server through the client, it is usually necessary to match the routing information in the access address with the routing information of the client. After the routing information in the access address can match the corresponding routing information, the corresponding address is accessed through the matched routing information. However, since the routing information in the routing information table of the client usually includes the routing information of multiple servers and the routing information of multiple applications of the client, it is usually necessary to analyze and process multiple routing information during address access, resulting in low access efficiency.
[0032] In addition, the system API used by the current Android system for routing configuration does not support the addition of small network segment routes. Moreover, since the system routing table of the client includes the routing information of multiple servers and each application in the client, when adding routes, it is necessary to add and parse each routing information in the system routing table of the client, resulting in low routing configuration efficiency.
[0033] In view of this, the inventors of the present application propose a routing network segment configuration method and an address access method. In this routing network segment configuration method, after obtaining the network segment configuration information sent by the server, a temporary routing table is established to replace the corresponding function of the system API. And before establishing this temporary routing table, the small network segment routing information in the network segment configuration information will be expanded into large network segment routing information first, and then the large network segment routing information is added to the temporary routing table, so that the user side gets rid of the minimum requirement of the API for the network segment size, increases the compatibility of the client when configuring routes, and also reduces the requirement for the size of the routing network segment sent by the server. In addition, when creating the temporary routing table, by enlarging the routing information network segment, the number of routing entries is effectively reduced, which can speed up the addition and access parsing of the system routing table information. In this address access method, the routing information in the to-be-accessed address is directly matched with the routing information in the temporary routing table. Since the temporary routing table includes the routing information of the server, the method of directly matching the routing information of the to-be-accessed address with the corresponding temporary routing table can greatly reduce the routing matching time, thereby improving the access efficiency.
[0034] To facilitate the understanding of this embodiment, first, the operating environment for implementing an address access method and / or a routing network segment configuration method disclosed in the embodiments of the present application will be introduced in detail.
[0035] Such as Figure 1As shown, it is a schematic diagram of the interaction between the server and the client provided by the embodiment of the present application. One or more servers are communicatively connected to one or more clients via a network for data communication or interaction. Here, the server can be a network server, a database server, etc. The client can be a personal computer (PC), a tablet computer, a smart phone, a personal digital assistant (PDA), etc.
[0036] After the above-mentioned client and server establish a connection, the server sends various configuration information to the client. After receiving the configuration information, the client performs some corresponding configurations on its own device according to the configuration information. The configuration information includes configuration information of multiple IP endpoints, routing information, etc.
[0037] In some embodiments, the client does not immediately perform configuration after receiving the configuration information. The client creates a temporary routing table according to the configuration information, and records the routing information sent by the server through the temporary routing table.
[0038] It can be understood that when the user accesses a certain address, the client matches the address with the temporary routing table to determine whether there is routing information corresponding to the address in the temporary routing table. If so, it accesses the corresponding address through the routing information in the temporary routing table. If not, a new temporary routing table is created according to the network segment configuration information sent by the server.
[0039] In some embodiments, the configuration information includes large network segment information and small network segment information. After expanding the small network segment information into large network segment information, the corresponding routing information is added to the temporary routing table.
[0040] For ease of understanding of this embodiment, the electronic device that executes the address access method and / or the routing network segment configuration method disclosed in the embodiment of the present application will be introduced in detail below.
[0041] As Figure 2 shown, it is a block diagram of the electronic device. The electronic device 100 may include a memory 111 and a processor 113. Those of ordinary skill in the art can understand that Figure 2 the structure shown is only schematic and does not limit the structure of the electronic device 100. For example, the electronic device 100 may further include more or fewer components than Figure 2 shown, or have a different configuration from Figure 2 shown.
[0042] The above-mentioned memory 111 and the processor 113 are electrically connected directly or indirectly to achieve data transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses or signal lines. The above-mentioned processor 113 is used to execute the executable module stored in the memory.
[0043] Among them, the memory 111 can be, but is not limited to, a random access memory (Random Access Memory, abbreviated as RAM), a read-only memory (Read Only Memory, abbreviated as ROM), a programmable read-only memory (Programmable Read-Only Memory, abbreviated as PROM), an erasable programmable read-only memory (Erasable Programmable Read-Only Memory, abbreviated as EPROM), an electrically erasable programmable read-only memory (Electric Erasable Programmable Read-Only Memory, abbreviated as EEPROM), etc. Among them, the memory 111 is used to store a program. After receiving an execution instruction, the processor 113 executes the program. The method executed by the electronic device 100 defined by the process disclosed in any embodiment of the present application can be applied to the processor 113 or implemented by the processor 113.
[0044] The above-mentioned processor 113 may be an integrated circuit chip with signal processing capabilities. The above-mentioned processor 113 can be a general-purpose processor, including a central processing unit (Central Processing Unit, abbreviated as CPU), a network processor (Network Processor, abbreviated as NP), etc.; it can also be a digital signal processor (digital signal processor, abbreviated as DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, abbreviated as ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. It can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.
[0045] The electronic device 100 in this embodiment can be used to execute each step in the various methods provided in the embodiments of the present application. The implementation processes of the routing network segment configuration method and the address access method are described in detail below through several embodiments.
[0046] The routing network segment configuration method and the address access method in the embodiments of the present application are both applied to the Android client.
[0047] Please refer to Figure 3 , which is a flowchart of the routing network segment configuration method provided by an embodiment of this application. The following will elaborate in detail on Figure 3 the specific process shown below.
[0048] Step 201: Receive the network segment configuration information sent by the server.
[0049] The network segment configuration information here includes configuration files of multiple network segments, routing information, etc., and the network segment configuration information includes small network segment routing information.
[0050] Step 202: Establish a temporary routing table according to the network segment configuration information.
[0051] The temporary routing table here includes the routing information in the network segment configuration information.
[0052] After the client obtains the network segment configuration information sent by the server, it will determine a space in the cache for caching the temporary routing table, and perform corresponding configuration on the client according to the configuration file in the network segment configuration. The configuration here includes routing configuration.
[0053] After receiving the network segment configuration information sent by the server, a temporary routing table can be directly established through the network segment configuration information according to the situation of the network segment configuration information, or the network segment configuration information can be processed and then a temporary routing table can be established through the processed network segment configuration information. Specifically, it can be implemented in the following several ways:
[0054] Method 1: If the network segment configuration information sent by the server to the client contains multiple overlapping network segments, then after the client obtains the network segment configuration information, it optimizes the network segment configuration information by calculating and processing the network segment configuration information, and establishes a temporary routing table based on the optimized network segment configuration information.
[0055] Method 2: If the network segment configuration information sent by the server to the client is all normal network segment configuration information, then after the client obtains the network segment configuration information, it can directly establish a temporary routing table through the network segment configuration information.
[0056] Method 3: After the client obtains the network segment configuration information, it will calculate according to multiple network segment configurations sent by the server to calculate and merge multiple network segment configurations into a small number of routing information, and establish a temporary routing table through the small number of routing information.
[0057] It can be understood that after obtaining the network segment configuration information, the client adds the routing information in the network segment configuration information to the temporary routing table to configure the routing information sent by the server on the client, so that when the client accesses the corresponding address, it can directly access it according to the routing information in the temporary routing table.
[0058] In the above implementation process, a corresponding temporary routing table is established based on the network segment configuration information sent by the server, and the routing information in the network segment configuration information is added to the temporary routing table, so that the client's configuration of the network segment configuration information is completed through the temporary routing table, so that the client is freed from the minimum requirement for the network segment size when using the API, and the compatibility of the client when configuring routes is increased. When the temporary routing table is established, multiple network segment configuration calculations are merged into a small amount of routing information, which effectively reduces the number of routing entries and can speed up the addition and access analysis of system routing table information. In addition, by calculating and processing the network segment configuration information, optimizing the network segment configuration information, and then adding routes, the accuracy and integrity of the information in the temporary routing table are improved.
[0059] In a possible implementation, step 302 includes: expanding the routing information of the small network segment into routing information of the large network segment; and adding the routing information of the large network segment to a temporary routing table.
[0060] The current Android client's system API's routing addition interface does not support small network segment routing. Before adding routing information to the temporary routing table, the small network segment routing information can be expanded into large network segment routing information through the corresponding algorithm, and then the server's routing information can be added to the temporary routing table by adding the large network segment routing information.
[0061] In some embodiments, the client is further provided with an addition cache table. After the small network segment routing information is expanded into the large network segment routing information and added to the temporary routing table, it can also be marked in the addition cache table to indicate that the route is added successfully.
[0062] After the temporary routing table is established, users can directly match the routing information in the temporary routing table when performing access operations. If the routing information is matched in the temporary routing table, the address can be directly accessed according to the routing information. If the routing information is not matched in the temporary routing table, the address can be accessed by adding the routing information of the address to be accessed to the routing information.
[0063] In the above implementation process, when adding routing information to the temporary routing table, after expanding the routing information of the small network segment into that of the large network segment, legal parsing of the routing information of the small network segment is achieved, the requirement of the client for the size of the issued routing information is reduced, and the compatibility of the client in configuring routes is increased.
[0064] Please refer to Figure 4 , which is the flowchart of the address access method provided by the embodiment of the present application. The following will elaborate in detail on Figure 4 the specific process shown.
[0065] Step 301: Match the routing information of the address to be accessed with the temporary routing table.
[0066] The temporary routing table here is created according to the above routing network segment configuration method. After the client receives the address to be accessed, it needs to parse the address to be accessed to obtain the corresponding routing information of the address to be accessed, and access the corresponding address through the routing information.
[0067] In actual information access, when accessing an external network IP or domain name, it will pass through multiple routers layer by layer, and then forward the request to the final target server. Therefore, a large amount of routing information is usually configured on the client, and these routing information are stored in the corresponding routing table. When a user accesses a certain address, the routing information of the address is matched with the routing information in the routing table. If the corresponding routing information can be matched in the client's routing table, the corresponding address can be directly accessed according to the matched routing information. If the corresponding routing information cannot be matched in the client's routing table, a temporary routing table needs to be established according to the network segment configuration information issued by the server, and the corresponding routing information is added to the temporary routing table.
[0068] Of course, usually, when the server establishes a connection with the client, the server will send the corresponding network segment configuration information to the client. After receiving the network segment configuration information, the client will establish a temporary routing table in the cache of the client according to the content in the network segment configuration information to replace the corresponding function of the system API. When the client accesses a certain address, it can directly match the routing information with the temporary routing table.
[0069] Step 302: Access the address to be accessed according to the matching result.
[0070] The matching result here includes successful matching and failed matching. If there is corresponding routing information in the temporary routing table for the routing information, it is determined that the matching is successful, and the corresponding address can be directly accessed through the routing information. If there is no corresponding routing information in the temporary routing table for the routing information, it is determined that the matching fails, and the routing information of the address to be accessed needs to be processed and added to the temporary routing table to update the temporary routing table.
[0071] In some embodiments, after updating the temporary routing table, the address to be accessed is matched with the updated temporary routing table, and the address to be accessed is accessed according to the matching result between the address to be accessed and the updated temporary routing table.
[0072] In the above implementation process, since the temporary routing table contains the network segment configuration information issued by the server, when accessing an address, the routing information of the address to be accessed is directly matched with the temporary routing table, that is, the routing information of the address to be accessed is directly matched with the corresponding temporary routing table. Compared with matching the routing information issued by the server with the system routing table of the client, this direct matching with the corresponding temporary routing table can greatly reduce the routing matching time and improve the access efficiency.
[0073] In a possible implementation manner, the method further includes: if the routing information of the address to be accessed is not in the temporary routing table, updating the temporary routing table according to the routing information of the address to be accessed.
[0074] It can be understood that if the routing information of the address to be accessed is not in the temporary routing table, in order to be able to access the address to be accessed, the routing information can be added to the temporary routing table to update the temporary routing table.
[0075] In some embodiments, the routing information can also be processed and then added to the temporary routing table to update the temporary routing table.
[0076] Updating the temporary routing table according to the routing information of the address to be accessed here includes: adding the routing information of the address to be accessed to the temporary routing table.
[0077] In the above implementation process, when the routing information of the address to be accessed is not in the temporary routing table, by adding the routing information of the address to be accessed to the new temporary routing table, when accessing the address to be accessed, it can be directly matched with the new temporary routing table, reducing the routing matching time of the address to be accessed and improving the access efficiency. In addition, since the temporary routing table includes the configuration information in the server, the routing information of the server can be added to the client, increasing the compatibility of the client when configuring the routing.
[0078] In a possible implementation manner, updating the temporary routing table according to the network segment configuration information issued by the server includes: processing the routing information of the address to be accessed; updating the temporary routing table according to the processed routing information of the address to be accessed.
[0079] The routing information here includes large network segment routing information and small network segment routing information. The current system API of the Android client does not support small network segment routing information when adding routes. To enable the addition of this small network segment routing information, the small network segment routing information can be expanded into large network segment routing information, and the large network segment routing information can be added to the temporary routing table to update the temporary routing table.
[0080] In some embodiments, if there are duplicates, incompleteness, etc. in the routing information of the address to be accessed, the client also needs to calculate and process the routing information in the address to be accessed, optimize the road network information, and update the temporary routing table according to the optimized routing information.
[0081] Updating the temporary routing table according to the routing information of the processed address to be accessed includes: adding the routing information of the processed address to be accessed to the temporary routing table.
[0082] In the above implementation process, corresponding processing is performed on the routing information in the address to be accessed according to the situation of the routing information in the address to be accessed. When the routing information includes small network segment routing information, the small network segment routing information is expanded into large network segment information, and then the temporary routing table is updated through the routing information, enabling the client to get rid of the limitation of the API on the network segment size and increasing the compatibility of the client when configuring routes. In addition, when there are duplicates or incompleteness in the routing information of the address to be accessed, after optimizing through the duplicate or incomplete routing information and then adding routes, the accuracy and integrity of the information in the temporary routing table are improved, and thus the access efficiency can be improved.
[0083] In a possible implementation manner, step 202 includes: if the routing information of the address to be accessed is in the temporary routing table, adding the temporary routing table to the system routing table and accessing the address to be accessed.
[0084] The system routing table here is the routing table of the client body, and the system routing table includes routing information of multiple servers and routing information of each application in the client.
[0085] It can be understood that when the routing information of the address to be accessed is in the temporary routing table, it indicates that a relevant connection has been established between the server and the client, and the client can access the server according to the configured routing information. At this time, adding the temporary routing table to the system routing table of the client to complete the configuration of the configuration information sent by the server in the client realizes dynamic route addition to the client through the temporary routing table.
[0086] In addition, when the routing information of the address to be accessed matches the routing information in the temporary routing table, it is determined that the routing information is added to the temporary routing table, and then the address to be accessed can be directly accessed through the routing information.
[0087] In the above implementation process, when the routing table of the address to be accessed is matched in the temporary routing table, it indicates that the routing information of the server has been configured on the client. Then, the temporary routing table can be directly added to the system routing table to update the system routing table of the client. When the client accesses a certain address, the new system routing table can be used, and the routing information in the new system routing table can be directly parsed to access the corresponding address, improving the access efficiency.
[0088] Based on the same inventive concept, an embodiment of the present application also provides a routing network segment configuration device corresponding to the routing network segment configuration method. Since the principle of the device in the embodiment of the present application for solving problems is similar to that of the foregoing routing network segment configuration method embodiment, the implementation of the device in this embodiment can refer to the description in the foregoing method embodiment, and repeated parts will not be elaborated.
[0089] Please refer to Figure 5 , which is a schematic diagram of the functional modules of the routing network segment configuration device provided by the embodiment of the present application. Each module in the routing network segment configuration device in this embodiment is used to execute each step in the foregoing method embodiment. The routing network segment configuration device includes a receiving module 401 and a creating module 402; wherein,
[0090] The receiving module 401 is used to receive the network segment configuration information sent by the server.
[0091] The creating module 402 is used to create a temporary routing table according to the network segment configuration information, and the temporary routing table includes the routing information in the network segment configuration information.
[0092] In a possible implementation manner, the creating module 402 is specifically used to: expand the small network segment routing information into large network segment routing information; and add the large network segment routing information to the temporary routing table.
[0093] Based on the same inventive concept, an embodiment of the present application also provides an address access device corresponding to the address access method. Since the principle of the device in the embodiment of the present application for solving problems is similar to that of the foregoing address access method embodiment, the implementation of the device in this embodiment can refer to the description in the foregoing method embodiment, and repeated parts will not be elaborated.
[0094] Please refer to Figure 6, which is a schematic diagram of the functional modules of the address access device provided in the embodiment of the present application. Each module in the address access device in this embodiment is used to execute each step in the above method embodiment. The address access device includes a matching module 501 and an access module 502; wherein,
[0095] The matching module 501 is used to match the to-be-accessed address with the temporary routing table, and the temporary routing table is created according to the above routing network segment configuration method.
[0096] The access module 502 is used to access the to-be-accessed address according to the matching result.
[0097] In a possible implementation manner, the address access device further includes an update module, which is used to update the temporary routing table according to the routing information of the to-be-accessed address if the routing information of the to-be-accessed address is not in the temporary routing table.
[0098] In a possible implementation manner, the update module is specifically used to: process the routing information of the to-be-accessed address; update the temporary routing table according to the processed routing information of the to-be-accessed address.
[0099] In a possible implementation manner, the access module 502 is specifically used to: if the routing information of the to-be-accessed address is in the temporary routing table, add the temporary routing table to the system routing table and access the to-be-accessed address.
[0100] In addition, the embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is run by a processor, it executes the steps of the address access method and / or the routing network segment configuration method described in the above method embodiment.
[0101] The computer program product of the address access method and / or the routing network segment configuration method provided by the embodiment of the present application includes a computer-readable storage medium storing program codes, and the instructions included in the program codes can be used to execute the steps of the address access method and / or the routing network segment configuration method described in the above method embodiment. For details, please refer to the above method embodiment and will not be elaborated here.
[0102] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architectures, functions, and operations of devices, methods, and computer program products according to multiple embodiments of the present application. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, and the module, program segment, or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, as well as the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.
[0103] In addition, the functional modules in each embodiment of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0104] If the above-mentioned functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes. It should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or device. Without further limitation, the elements defined by the statement "comprising..." do not exclude the presence of additional identical elements in the process, method, article or device comprising the said elements.
[0105] The foregoing is only the preferred embodiment of this application and is not intended to limit this application. For those skilled in the art, this application can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this application shall be included within the protection scope of this application. It should be noted that similar reference numerals and letters in the following drawings represent similar items. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings.
[0106] The foregoing is only the specific implementation manner of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art within the technical scope disclosed by this application can easily think of changes or replacements, which should all be covered within the protection scope of this application. Therefore, the protection scope of this application shall be subject to the protection scope of the claims.
Claims
1. A method for configuring a routing network segment, characterized in that, Applied to an Android client, including: Receiving network segment configuration information sent by a server; Establishing a temporary routing table according to the network segment configuration information, where the temporary routing table includes routing information in the network segment configuration information; The network segment configuration information includes small network segment routing information. The establishing the temporary routing table according to the network segment configuration information includes: Expanding the small network segment routing information into large network segment routing information; Adding the large network segment routing information to the temporary routing table.
2. An address access method, characterized in that, Applied to an Android client, including: Matching the routing information of the address to be accessed with the temporary routing table, where the temporary routing table is created according to the method described in claim 1; Accessing the address to be accessed according to the matching result.
3. The method according to claim 2, characterized in that, The method further includes: If the routing information of the address to be accessed is not in the temporary routing table, updating the temporary routing table according to the routing information of the address to be accessed.
4. The method according to claim 3, characterized in that The updating the temporary routing table according to the routing information of the address to be accessed includes: Processing the routing information of the address to be accessed; Updating the temporary routing table according to the processed routing information of the address to be accessed.
5. The method according to any one of claims 2-4, characterized in that The accessing the address to be accessed according to the matching result includes: If the routing information of the address to be accessed is in the temporary routing table, adding the temporary routing table to the system routing table and accessing the address to be accessed.
6. A routing network segment configuration device, characterized in that, Applied to an Android client, including: A receiving module: used for receiving network segment configuration information sent by a server; An establishing module: used for establishing a temporary routing table according to the network segment configuration information, where the temporary routing table includes routing information in the network segment configuration information; the network segment configuration information includes small network segment routing information; The establishing module is specifically used for: expanding the small network segment routing information into large network segment routing information; adding the large network segment routing information to the temporary routing table.
7. An address access device, characterized in that, Applied to an Android client, including: A matching module: used for matching the address to be accessed with the temporary routing table, where the temporary routing table is created according to claim 1; An accessing module: used for accessing the address to be accessed according to the matching result.
8. An electronic device, characterized in that, Including: A processor and a memory, where the memory stores machine-readable instructions executable by the processor. When the electronic device runs, when the machine-readable instructions are executed by the processor, the steps of the method described in any one of claims 1 to 5 are executed.
9. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium. When the computer program is run by the processor, the steps of the method described in any one of claims 1 to 5 are executed.
Citation Information
Patent Citations
Method for accessing and monitoring private network through layer 2 tunnel protocol and server
CN102111311A
Android multi-hop routing achievement method without root permission
CN104540180A