Business service request processing method and apparatus, electronic device, and storage medium
By using a preset set of addresses and matching virtual network cards in a local area network (LAN), fine-grained control over LAN terminal traffic is achieved, solving the accuracy and flexibility problems caused by coarse-grained control in existing technologies, and improving the accuracy of traffic control and network performance.
Patent Information
- Application Number
- CN202210101658.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-27
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2042-01-27
AI Technical Summary
In existing technologies, gateways manage LAN terminal traffic in a coarse-grained manner, which means that restricting traffic for certain services can affect other normal traffic, resulting in poor accuracy and flexibility, and failing to meet user needs.
By acquiring the service requests of the terminals to be managed in the local area network, matching the preset address set with the destination address information, marking and importing them into the preset virtual network card for interception or acceleration, more granular traffic control can be achieved.
It improves the accuracy and flexibility of LAN terminal traffic management, ensures that peak network performance is not affected, and simplifies the operation of accelerating business service traffic.
Smart Images

Figure CN116566917B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, in particular to a business service request processing method and device, electronic equipment and storage medium. BACKGROUND
[0002] Terminal devices in a local area network such as a home network or an office network need to be connected to the Internet through a gateway. The gateway can provide conversion functions and enable users to share a DSL (Digital Subscriber Line) or cable modem Internet connection with all computers in the local area network. The gateway can be located between the DSL or cable modem and the local area network, or the DSL or cable modem can be integrated into the local area gateway.
[0003] In related technologies, the gateway generally controls the terminal traffic in the local area network based on the device, that is, all network traffic of a certain terminal device is directly cut off. This coarse-grained control method limits not only certain service traffic (such as game traffic) but also other service traffic (such as normal learning traffic such as querying learning materials and online courses), resulting in poor accuracy and poor flexibility of the control of the terminal traffic in the local area network, and failing to meet the needs of users. SUMMARY
[0004] To solve the problems of the prior art, the embodiments of the present application provide a business service request processing method and device, electronic equipment and storage medium. The technical solution is as follows:
[0005] On the one hand, a business service request processing method is provided, and the method comprises:
[0006] Obtaining a business service request of a terminal to be controlled in a local area network; the business service request comprises destination address information;
[0007] When the destination address information matches a preset address set, marking the business service request as a marked business service request; the preset address set comprises service address information of at least one preset business service; the preset address set is associated with a preset routing rule pointing to a preset virtual network card;
[0008] Based on the preset routing rule, the marked business service request is imported into the preset virtual network card; the preset virtual network card is used for intercepting or accelerating processing based on the marked business service request.
[0009] On the other hand, a business service request processing device is provided, and the device comprises:
[0010] The device further comprises: a service request obtaining module, configured to obtain a service request of a terminal to be managed in a local area network; the service request comprises destination address information;
[0011] A first marking module is configured to mark the service request as a marked service request when the destination address information matches a preset address set; the preset address set comprises service address information of at least one preset service; the preset address set is associated with a preset routing rule pointing to a preset virtual network card;
[0012] A first request importing module is configured to import the marked service request into the preset virtual network card based on the preset routing rule; the preset virtual network card is used for intercepting or accelerating processing based on the marked service request.
[0013] In an exemplary embodiment, the preset address set further comprises specified address information; the device further comprises:
[0014] A domain name resolution request obtaining module is configured to obtain a domain name resolution request of the terminal to be managed; the domain name resolution request comprises gateway address information and target domain name information corresponding to a target service; the target service is a service indicated by the destination address information;
[0015] An address information converting module is configured to convert the gateway address information into specified address information based on a preset conversion rule to obtain a converted domain name resolution request;
[0016] A second marking module is configured to mark the converted domain name resolution request as a marked domain name resolution request based on matching between the specified address information and the preset address set;
[0017] A second request importing module is configured to import the marked domain name resolution request into the preset virtual network card based on the preset routing rule; the preset virtual network card is used for obtaining the destination address information based on the target domain name information and updating the preset address set according to the destination address information;
[0018] An address information returning module is configured to return the destination address information to the terminal to be managed.
[0019] In an exemplary embodiment, the device further comprises:
[0020] A current service address information obtaining module is configured to obtain current service address information corresponding to the target domain name information in the preset address set when the target domain name information is preset management domain name information;
[0021] The first address information adding module is configured to add the destination address information to the preset address set when the destination address information does not exist in the current service address information.
[0022] In an exemplary embodiment, the apparatus further comprises:
[0023] The network transmission path determining module is configured to determine at least one network transmission path corresponding to the target service service in response to an acceleration instruction for the target service service.
[0024] The network delay determining module is configured to determine a network delay of each network transmission path in the at least one network transmission path.
[0025] The target network transmission path determining module is configured to determine the network transmission path corresponding to the minimum network delay as a target network transmission path.
[0026] The first obtaining module is configured to obtain target domain name information and target service address information corresponding to the target service service in the target network transmission path.
[0027] The second address information adding module is configured to determine the target domain name information corresponding to the target service service in the target network transmission path as the preset management domain name information, and add the target service address information to the preset address set.
[0028] In an exemplary embodiment, the apparatus further comprises:
[0029] The service service request acceleration module is configured to send the service service request to the destination address information based on the target network transmission path.
[0030] In an exemplary embodiment, the apparatus further comprises:
[0031] The preset service service determining module is configured to determine at least one preset service service in response to a management service service configuration instruction.
[0032] The second obtaining module is configured to obtain service address information of the at least one preset service service from a service address information database.
[0033] The preset address set generating module is configured to add the service address information of the at least one preset service service to a preset address set based on a set type of a pre-created address set, to obtain the preset address set; wherein the address set is associated with the preset routing rule, and the set type indicates that elements of a target data type are stored in a hash table.
[0034] In another aspect, an electronic device is provided, including a processor and a memory having stored therein at least one instruction or at least one program, the at least one instruction or the at least one program being loaded and executed by the processor to implement the above-described service request processing method.
[0035] In another aspect, a computer-readable storage medium is provided, having stored therein at least one instruction or at least one program, the at least one instruction or the at least one program being loaded and executed by a processor to implement the above-described service request processing method.
[0036] In another aspect, a computer program product or computer program is provided, including computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the electronic device to perform the above-described service request processing method.
[0037] The embodiment of the present application obtains a service request of a terminal to be controlled in a local area network, matches destination address information in the service request with a preset address set including service address information of at least one preset service, and marks the service request to obtain a marked service request when the matching is successful. Since the preset address set is associated with a preset routing rule pointing to a preset virtual network card, the marked service request can be guided into the preset virtual network card based on the preset routing rule, and the preset virtual network card intercepts or accelerates processing based on the marked service request, so that efficient flow control for the preset service is realized, rather than flow control for the entire terminal to be controlled, so that the accuracy and flexibility of flow control for the terminal in the local area network are improved in a fine-grained flow control manner, and the peak network performance of the terminal to be controlled is not affected. BRIEF DESCRIPTION OF DRAWINGS
[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort.
[0039] Figure 1 is a schematic diagram of an implementation environment provided by the embodiment of the present application;
[0040] Figure 2 is a flowchart of a service request processing method provided by the embodiment of the present application;
[0041] Figure 3is a flow diagram of another service request processing method provided by an embodiment of the present application;
[0042] Figure 4 is a flow diagram of another service request processing method provided by an embodiment of the present application;
[0043] Figure 5 is a traffic acceleration configuration interface diagram for a game service provided by an embodiment of the present application;
[0044] Figure 6 is a schematic diagram of at least one network transmission path provided by an embodiment of the present application;
[0045] Figure 7 is a structural block diagram of a service request processing device provided by an embodiment of the present application;
[0046] Figure 8 is a system architecture diagram provided by an embodiment of the present application;
[0047] Figure 9 is a hardware structural block diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0048] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of the present application.
[0049] It should be noted that the terms "first", "second", and the like in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or a chronological sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product, or server including a series of steps or units does not necessarily have to include only those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to the process, method, product, or device.
[0050] Please refer to Figure 1It shows an implementation environment schematic diagram provided by an embodiment of the application, which can include a plurality of terminals 110, gateway devices 120 and service servers 130, wherein the plurality of terminals 110 are located in the same local area network 140, and the plurality of terminals 110 can request service services from the service servers 130 through the corresponding gateway devices 120 of the local area network 140.
[0051] Among them, the terminal 110 can include but is not limited to a mobile phone, a computer, a smart voice interaction device, a smart home appliance, etc. The terminal 110 is configured with a client software such as an application program (Application, referred to as App) that provides different service services. The application program can be an independent application program, or a subprogram in the application program, wherein the service services can include game services, education services, video services, etc.
[0052] The plurality of terminals 110 can include a control terminal running a gateway control program, which can be any one or more of the plurality of terminals 110. The gateway control program can be used to configure the gateway device 120 to control the terminal traffic in the local area network 140. The gateway control program can be an independent application program, or a subprogram in the application program.
[0053] The service server 130 can be a server that provides background service services for the corresponding application program in the terminal 110. The service server 130 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. Basic cloud computing services such as platform and the like.
[0054] In an exemplary embodiment, the plurality of terminals 110, the gateway device 120 and the service server 130 can be node devices in a blockchain system, capable of sharing the information obtained and generated to other node devices in the blockchain system, realizing information sharing between the plurality of node devices. The plurality of node devices in the blockchain system can be configured with the same blockchain, which is composed of a plurality of blocks, and the adjacent blocks have an association relationship, so that when the data in any block is tampered with, it can be detected through the next block, thereby avoiding the data in the blockchain being tampered with, and ensuring the security and reliability of the data in the blockchain.
[0055] The embodiments of the application can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, transportation, intelligent transportation, vehicle-mounted, assisted driving, etc.
[0056] The service request processing method provided by the embodiment of the present application will be described in detail below in combination with the application environment shown in the accompanying drawings. It should be noted that the service request processing method of the embodiment of the present application can be applied to a service request processing device, which can be configured in an electronic device in the form of a plug-in, and the electronic device can be a gateway device. Figure 1 The service request processing method of the embodiment of the present application will be described in detail below in combination with the application environment shown in the accompanying drawings. It should be noted that the service request processing method of the embodiment of the present application can be applied to a service request processing device, which can be configured in an electronic device in the form of a plug-in, and the electronic device can be a gateway device.
[0057] Please refer to Figure 2 , which shows a flowchart of a service request processing method provided by the embodiment of the present application. It should be noted that the present specification provides method operation steps as described in the embodiments or flowcharts, but more or fewer operation steps can be included based on conventional or non-creative labor. The order of steps listed in the embodiments is only one of the many execution orders, and does not represent the only execution order. In actual system or product execution, the method order shown in the embodiments or the accompanying drawings can be executed in sequence or in parallel (for example, in a parallel processor or multi-threaded processing environment). Specifically as shown in Figure 2 The method can include:
[0058] S201, obtaining a service request of a to-be-controlled terminal in a local area network.
[0059] The service request includes destination address information, and the destination address information indicates a target service. Specifically, the destination address information can be the IP (Internet Protocol Address) address of a service server providing the target service.
[0060] The to-be-controlled terminal refers to a terminal in the local area network that needs to be controlled in terms of traffic. Specifically, the control terminal can configure the terminal in the local area network that needs to be controlled in terms of traffic through a gateway control program corresponding to the service request processing device, so that the service request processing device can monitor the to-be-controlled terminal in the local area network based on the configuration information, and obtain the service request of the to-be-controlled terminal when monitoring the service request of the to-be-controlled terminal.
[0061] In actual application, the business service request processing apparatus can discover and acquire the terminal device accessing the gateway device in the local area network in real time through the configuration file such as the ARP (Address Resolution Protocol) / DHCP (Dynamic Host Configuration Protocol) table of the gateway device, and then identify the terminal device through the MAC (Media Access Control Address) and MDNS (Multicast Domain Name System) protocol to determine the terminal to be controlled.
[0062] In an exemplary embodiment, the control end can also configure the control time period when configuring the terminal to be controlled, that is, the configuration information can include the terminal to be controlled in the local area network and the control time period corresponding to the terminal to be controlled. The business service request processing apparatus can monitor the corresponding terminal to be controlled in the corresponding control time period according to the configuration information, and process the business service request based on the business service processing method of the embodiment of the application when the business service request of the terminal to be controlled is monitored.
[0063] In specific implementation, the business service request processing apparatus can set the corresponding timer for the terminal to be controlled configured with the control time period, so as to automatically start monitoring the business service processing request of the corresponding terminal to be controlled when the timing time arrives, and automatically stop monitoring the business service processing request of the corresponding terminal to be controlled when the timing time length reaches the control time length corresponding to the control time period.
[0064] S203, determine whether the destination address information matches the preset address set.
[0065] The preset address set includes service address information of at least one preset business service, and the at least one preset business service includes the target business service; the preset address set is associated with a preset routing rule pointing to a preset virtual network card.
[0066] Specifically, the destination address information can be extracted from the business service request, and the destination address information is matched with the service address information in the preset address set. If there is matching service address information, it is determined that the destination address information matches the preset address set, and step S205 can be executed; otherwise, if there is no matching service address information, it is determined that the destination address information does not match the preset address set.
[0067] In the embodiment of the present application, the preset address set includes service address information of at least one preset service, when the destination address information matches the preset address set, it indicates that the target service corresponding to the destination address information is a service that needs to be controlled, at this time, step S205 can be executed to realize the control processing of the service request; when the destination address information does not match the preset address set, it indicates that the target service corresponding to the destination address information is not a service that needs to be controlled, at this time, the service request can be processed according to the default processing mode of the gateway device.
[0068] In an exemplary embodiment, the preset address set can be an ipset-based address set (hereinafter referred to as an ipset set), and the ipset is an extension of iptables, which allows the creation of rules that match entire address sets, and iptables is a command package used to set, maintain and check IP packet filtering rules of the Linux kernel. By creating an iptables rule, the ipset set can be associated with a preset routing rule, wherein the preset routing rule represents a path to a preset virtual network card.
[0069] Based on this, in an exemplary embodiment, the method can further include the step of generating a preset address set, specifically, the step can include:
[0070] In response to the control service configuration instruction, at least one preset service is determined.
[0071] The service address information of the at least one preset service is obtained from the service address information database.
[0072] Based on the collection type of the address set associated with the preset routing rule created in advance, the service address information of the at least one preset service is added to the address set to obtain the preset address set; wherein the collection type indicates that the elements of the target data type are stored in the form of a hash table.
[0073] Specifically, the control end can display a control service configuration interface, and the configuration interface allows the user to select a preset service based on actual needs, and the selected preset service can be one or multiple, for example, it can be a game service, a video service, a microblog service, etc. When the user operates and submits the configuration in the control service configuration interface, the service request processing device can receive the corresponding control service configuration instruction, and then in response to the control service configuration instruction, at least one preset service that needs to be controlled is determined, and the service address information of the at least one preset service can be automatically obtained from the service address information database in the cloud, thereby improving the configuration efficiency.
[0074] In actual application, the address set can be created based on the ipset. The set type of the ipset set can be represented as hash: datatype, where hash indicates that the elements in the ipset set are stored in the form of hash table, and datatype represents the target data type of the elements in the ipset set. For example, datatype can include ip, net, and the like, that is, the set type can be represented as hash: ip or hash: net, where hash: ip indicates that the ipset set stores IP addresses in the form of hash, and hash: net indicates that the ipset set stores IP segments or IP addresses in the form of hash.
[0075] After the ipset set is created, an iptables rule can be added to the ipset set. The iptables rule indicates that the data packet matching the ipset set can be marked with a preset mark pointing to a preset routing rule by iptables in the mangle table of the PREROUTING chain, so as to associate the ipset set with the preset routing rule pointing to the preset virtual network card.
[0076] Then, after the service address information of at least one preset service is automatically obtained from the service address information database in the cloud, the service address information can be added to the ipset set created above to obtain the preset address set of the embodiment of the application. It can be understood that the service address information is stored in the preset address set in the form of hash, and only one iptables rule is required for all service address information in the preset address set.
[0077] S205, when the destination address information matches the preset address set, marking the service request as a marked service request.
[0078] In specific implementation, when the destination address information matches the preset address set, it indicates that the destination address information hits the iptables rule with the preset address set as the matching condition, and then the service request corresponding to the destination address information can be marked with a preset mark pointing to a preset routing rule.
[0079] In actual application, when marking the service request corresponding to the destination address information, in order to implement control for multiple control types, the control type of the target service corresponding to the service request can be determined first, and then the preset mark pointing to the preset routing rule is marked on the service request in combination with the control type, and then the corresponding control type can be identified through the preset mark, and control for multiple control types is implemented. The multiple control types can include interception control and acceleration control, and the interception control indicates discarding the service request, and the acceleration control indicates accelerating the service request. It can be understood that when the control type of the target service corresponding to the service request is determined, the service service list corresponding to different control types can be configured in advance, for example, the service services in the service service list corresponding to the interception control are controlled by the interception control type, and the service services in the service service list corresponding to the acceleration control are controlled by the acceleration control type.
[0080] In actual application, when marking the service request corresponding to the destination address information, in order to implement control for multiple control types, the control type of the target service corresponding to the service request can be determined first, and then the preset mark pointing to the preset routing rule is marked on the service request in combination with the control type, and then the corresponding control type can be identified through the preset mark, and control for multiple control types is implemented. The multiple control types can include interception control and acceleration control, and the interception control indicates discarding the service request, and the acceleration control indicates accelerating the service request. It can be understood that when the control type of the target service corresponding to the service request is determined, the service service list corresponding to different control types can be configured in advance, for example, the service services in the service service list corresponding to the interception control are controlled by the interception control type, and the service services in the service service list corresponding to the acceleration control are controlled by the acceleration control type.
[0081] After the preset mark is marked on the service request, the marked service request can be introduced into the preset virtual network card based on the preset routing rule pointed by the preset mark, and the preset virtual network card is used for interception or acceleration processing based on the marked service request. The preset virtual network card can be implemented as a virtual network card traffic processing module in the service request processing device.
[0082] It can be understood that the preset virtual network card can intercept the service request when performing control processing, that is, the service request is not sent to the business server corresponding to the destination address information, or the service request can be accelerated, that is, the service request is sent to the business server corresponding to the destination address information more quickly. The specific control processing method can be determined based on the control type corresponding to the marked service request. When the control type is the interception type, the service request can be intercepted, and when the control type is acceleration, the service request can be accelerated.
[0083] As can be seen from the above technical solutions of the embodiments of the present application, since the preset address set is associated with the preset routing rule pointing to the preset virtual network card, the marked service request can be introduced into the preset virtual network card based on the preset routing rule, and the preset virtual network card is used for interception or acceleration control processing based on the marked service request, thereby realizing traffic control for the preset service, instead of traffic control for the entire device to be controlled, so as to improve the accuracy and flexibility of the terminal traffic control in the local area network in a more fine-grained traffic control manner.
[0084] In addition, in the related art, the control of the destination address information is mainly achieved by modifying the routing rules. Since the system matches the routing rules in a top-down linear manner, when there are tens of thousands of destination address information sets, each data packet entering the gateway device needs to be matched with the routing rules in a top-down linear manner, which obviously reduces the overall network performance of the gateway device. In the embodiment of the present application, the preset address set is associated with the preset routing rule, and when the destination address information matches the preset address set, it is marked, so that when the destination address information is routed, it does not need to be matched with the routing rules in a top-down linear manner, greatly reducing the performance impact of routing rule matching on the gateway device, and ensuring the peak network performance of the terminal to be controlled.
[0085] In addition, in the related art, the traffic acceleration processing based on the gateway device is based on an independent terminal. For example, when accelerating PC (Personal Computer) games, a corresponding accelerator client needs to be installed on the PC, when accelerating mobile device games, a corresponding mobile terminal accelerator application needs to be installed on the mobile device, and when accelerating host (such as switch, xbox, ps4 / 5) games, an accelerator client needs to be installed on the PC or mobile terminal, and then the network configuration of the host is configured to achieve traffic acceleration for game traffic, thereby causing the operation of the traffic acceleration scenario based on the gateway device to be complex, and unable to achieve acceleration of all service scenarios by installing only one terminal accelerator. The embodiment of the present application can guide the service request of the terminal to be controlled into the preset virtual network card for acceleration control processing, thereby realizing multi-scene acceleration of one terminal and reducing the complexity of service traffic acceleration.
[0086] In actual application, before sending the service request, the terminal to be controlled needs to obtain the destination address information indicating the target service through domain name resolution. When the service address information of the target service changes, for example, a new service address information is generated. Since the new service address information does not exist in the preset address set, the service request with the new service address information as the destination address information cannot be controlled, which reduces the effectiveness of the control.
[0087] In order to improve the effectiveness of the preset service traffic control, in an exemplary embodiment, the preset address set can also include specified address information, so that Figure 3 Another flowchart of the provided service request processing method is provided. Before obtaining the service request of the terminal to be controlled in the local area network, the method can further include:
[0088] S301, obtaining the domain name resolution request of the terminal to be controlled.
[0089] The domain name resolution request includes gateway address information and target domain name information corresponding to a target service, wherein the gateway address information is destination address information in the domain name resolution request.
[0090] In S303, the gateway address information is converted into specified address information based on a preset conversion rule, to obtain a converted domain name resolution request.
[0091] Specifically, the preset conversion rule can be an iptables rule based on a linux firewall iptables. The iptables rule indicates that the gateway address information in the domain name resolution request of the terminal to be monitored is converted into specified address information. The specified address information can be set according to actual conditions, for example, the iptables rule indicates that the gateway address information in the domain name resolution request of the terminal to be monitored (address information: 192.168.51.2) sent to the 53 port of the gateway device is converted into specified address information 8.8.8.8:
[0092]
[0093] It can be understood that the destination address information in the converted domain name resolution request is the specified address information described above.
[0094] In S305, the converted domain name resolution request is marked to obtain a marked domain name resolution request, based on matching between the specified address information in the converted domain name resolution request and the preset address set.
[0095] Since the preset address set includes the specified address information described above, when the destination address information (i.e., the specified address information) in the converted domain name resolution request is matched with the preset address set, the matching result is matched, and the converted domain name resolution request can be marked with a preset mark pointing to a preset routing rule.
[0096] In S307, the marked domain name resolution request is imported into the preset virtual network card based on the preset routing rule.
[0097] Since the preset mark corresponding to the marked domain name resolution request points to the preset routing rule, the marked domain name resolution request can be imported into the preset virtual network card based on the preset routing, the destination address information is obtained based on the target domain name information through the preset virtual network card, and the preset address set is updated according to the destination address information.
[0098] Specifically, the preset virtual network card can parse the target domain name information from the marked domain name resolution request, and send a domain name resolution request to the domain name resolution server based on the target domain name information, so that the domain name resolution server returns the domain name resolution result (i.e. the destination address information corresponding to the target domain name information) in response to the domain name resolution request, so that the preset virtual network card can obtain the target domain name information and the destination address information corresponding to the target domain name information.
[0099] After the preset virtual network card obtains the destination address information corresponding to the target domain name information, the preset virtual network card can update the preset address set according to the destination address information, so that the service address information of the target service service after the change can be updated to the preset address set in time, and the effectiveness of the target service service traffic control based on the preset address set is improved.
[0100] S309, return the destination address information to the terminal to be controlled.
[0101] In an exemplary embodiment, when the preset virtual network card updates the preset address set according to the destination address information, it can include:
[0102] When the target domain name information is preset control domain name information, obtaining the current service address information corresponding to the target domain name information in the preset address set;
[0103] When the destination address information does not exist in the current service address information, adding the destination address information to the preset address set.
[0104] In a specific implementation, the control end can also set a whitelist policy or a blacklist policy when configuring, wherein the whitelist policy indicates that only the whitelist traffic is allowed to access, and the blacklist policy indicates that the blacklist traffic cannot access, so that when responding to the control service configuration instruction, the preset control domain name information can be determined based on the whitelist policy or the blacklist policy and the selected preset service. Specifically, if the blacklist policy is used, the domain name information of the selected preset service can be directly obtained from the domain name information database, and the domain name information of the selected preset service is used as the preset control domain name information; if the whitelist policy is used, the domain name information in the domain name information database except the domain name information of the selected preset service can be used as the preset control domain name information. The above configuration method of the preset control domain name information does not require the user to manually input the domain name information, thereby improving the configuration efficiency and the comprehensiveness of coverage.
[0105] It can be understood that the preset control domain name information can also be the domain name information that needs to be controlled directly input by the user in the configuration interface of the control end.
[0106] It can be understood that the user can also adjust the preset management domain name information through the control terminal management service configuration interface.
[0107] In the above embodiment, when the target domain name information is the preset management domain name information, it indicates that the target domain name information is a domain name that needs to be managed. At this time, the current service address information corresponding to the target domain name information can be obtained from the preset address set, and it is checked whether the destination address information obtained by domain name resolution exists in the current service address information. If not, it indicates that the destination address information obtained by current domain name resolution is a new destination address information corresponding to the target service. At this time, the destination address information obtained by current domain name resolution can be added to the preset address set, so that the subsequent service request of the terminal to be managed based on the destination address information can be routed to the preset virtual network card for management processing.
[0108] In the related art, acceleration is realized based on a VPN (Virtual Private Network). Traffic that needs to be accelerated is sent to a destination service server through a fixed VPN dedicated line to realize traffic acceleration. This acceleration scheme is not suitable for many specific acceleration scenarios because the acceleration line used is fixed. For example, in a game acceleration scenario, for some types of games, users may choose different game regions. In addition, the acceleration scheme in the related art cannot solve the problem of domain name pollution, resulting in no actual acceleration effect in many scenarios.
[0109] Therefore, when the service request of the target service needs to be accelerated, in order to improve the generality and acceleration effect of the traffic acceleration scenario, in an exemplary embodiment, as shown in Figure 4 Another flowchart of a service request processing method is provided. Before obtaining the domain name resolution request of the terminal to be managed, the method can further include:
[0110] S401, in response to an acceleration instruction for the target service, determining at least one network transmission path corresponding to the target service.
[0111] As shown in Figure 5 The flow acceleration configuration interface shown in the figure is a traffic acceleration configuration interface for game service. Through the traffic acceleration configuration interface, an acceleration instruction can be sent to the service request processing device for the game service of the terminal to be managed. The acceleration instruction can include an acceleration region (i.e., a region where a service server providing a service is located) and a specific target service (such as PC games, mobile games, host games, etc.). Therefore, at least one network path can be determined based on the acceleration region and the specific target service in the acceleration instruction.
[0112] S403, determine the network delay of each network transmission path in the at least one network transmission path.
[0113] Network latency refers to the time it takes for various types of data to be transmitted in the network medium.
[0114] Specifically, the network latency of each network transmission path can be the combined latency of multiple network paths. For example... Figure 6 As shown, the multiple network paths can include a first network path from the gateway device to the access point device, a second network path from the access point device to the intermediate access device, and a third network path from the intermediate access device to the regional access device corresponding to the service server. Therefore, the network latency of each network transmission path can include t1 + t2 + t3, where t1 is the network latency of the first network path, t2 is the network latency of the second network path, and t3 is the network latency of the third network path. Socks5 is a proxy protocol that acts as an intermediary between front-end machines and server machines communicating using the TCP / IP protocol, enabling front-end machines on the intranet to access servers on the Internet.
[0115] S405, the network transmission path corresponding to the minimum network delay is determined as the target network transmission path.
[0116] S407, Obtain the target domain name information and target service address information corresponding to the target service in the target network transmission path.
[0117] S409, determine the target domain name information corresponding to the target service in the target network transmission path as the preset control domain name information, and add the target service address information to the preset address set.
[0118] The above embodiments intelligently select the optimal network transmission path, determine the target domain name information of the target business service in the optimal network transmission path as the preset control domain name information, and add the target service address information to the preset address set. Thus, effective acceleration can be achieved for some scenarios that cannot be accelerated by conventional VPN acceleration, such as the problem of being unable to match online players due to network NAT restrictions on game console devices (switch / ps / xbox), and the problem of domain name pollution on educational websites.
[0119] Based on this, in an exemplary implementation, when the preset virtual network card performs management and control processing based on the marked service request, it can send the service request to the destination address information based on the target network transmission path, thereby accelerating the target service traffic.
[0120] Corresponding to the service request processing method provided by the above-mentioned embodiments, the embodiment of the present application also provides a service request processing device. Since the service request processing device provided by the embodiment of the present application corresponds to the service request processing method provided by the above-mentioned embodiments, the implementation of the aforementioned service request processing method is also applicable to the service request processing device provided by the present embodiment, which will not be described in detail in the present embodiment.
[0121] Please refer to Figure 7 , which is a structural schematic diagram of a service request processing device provided by an embodiment of the present application. The service request processing device 700 has the function of implementing the service request processing method in the above-mentioned method embodiments. The function can be realized by hardware or corresponding software executed by hardware. As shown in the figure, Figure 7 The device can include:
[0122] The request acquisition module 710 is configured to acquire a service request of a terminal to be managed and controlled in a local area network. The service request includes destination address information.
[0123] The first marking module 720 is configured to mark the service request as a marked service request when the destination address information matches a preset address set. The preset address set includes service address information of at least one preset service. The preset address set is associated with a preset routing rule pointing to a preset virtual network card.
[0124] The first request import module 730 is configured to import the marked service request into the preset virtual network card based on the preset routing rule. The preset virtual network card is used for intercepting or accelerating processing based on the marked service request.
[0125] In an exemplary embodiment, the preset address set further includes specified address information. The device further includes:
[0126] The domain name resolution request acquisition module is configured to acquire a domain name resolution request of the terminal to be managed and controlled. The domain name resolution request includes gateway address information and target domain name information corresponding to a target service. The target service is the service indicated by the destination address information.
[0127] The address information conversion module is configured to convert the gateway address information into specified address information based on a preset conversion rule to obtain a converted domain name resolution request.
[0128] The second marking module is configured to mark the converted domain name resolution request as a marked domain name resolution request based on the matching between the specified address information and the preset address set.
[0129] The second request import module is configured to import the marked domain name resolution request into the preset virtual network card based on the preset routing rule; and the preset virtual network card is configured to acquire the destination address information based on the target domain name information, and update the preset address set according to the destination address information.
[0130] The address information returning module is configured to return the destination address information to the terminal to be controlled.
[0131] In an exemplary embodiment, the apparatus further comprises:
[0132] The current service address information acquiring module is configured to acquire current service address information corresponding to the target domain name information in the preset address set when the target domain name information is preset control domain name information.
[0133] The first address information adding module is configured to add the destination address information to the preset address set when the destination address information does not exist in the current service address information.
[0134] In an exemplary embodiment, the apparatus further comprises:
[0135] The network transmission path determining module is configured to determine at least one network transmission path corresponding to the target service service in response to an acceleration instruction for the target service service.
[0136] The network delay determining module is configured to determine network delay of each network transmission path in the at least one network transmission path.
[0137] The target network transmission path determining module is configured to determine the network transmission path corresponding to the minimum network delay as a target network transmission path.
[0138] The first acquiring module is configured to acquire target domain name information and target service address information corresponding to the target service service in the target network transmission path.
[0139] The second address information adding module is configured to determine the target domain name information corresponding to the target service service in the target network transmission path as the preset control domain name information, and add the target service address information to the preset address set.
[0140] In an exemplary embodiment, the apparatus further comprises:
[0141] The service request acceleration module is configured to send the service request to the destination address information based on the target network transmission path.
[0142] In an exemplary embodiment, the apparatus further comprises:
[0143] a preset service service determination module, configured to determine at least one preset service service in response to a management service configuration instruction;
[0144] a second acquisition module, configured to acquire service address information of the at least one preset service service from a service address information database;
[0145] a preset address set generation module, configured to add the service address information of the at least one preset service service to a preset address set based on a set type of the address set, to obtain the preset address set; wherein the address set is associated with the preset routing rule, and the set type indicates that elements of a target data type are stored in a hash table.
[0146] It should be noted that the apparatus provided in the above embodiments, in realizing its functions, is only exemplified by the above division of functional modules, and in actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the above described functions.
[0147] Please refer to Figure 8 , which shows a system architecture schematic diagram for implementing the service service request processing method provided by the embodiments of the application, wherein the service service request processing apparatus can include a plug-in control communication module, a device management module, an intelligent routing module, a routing rule management module, a virtual network card traffic processing module, a plug-in upgrade updating module, a plug-in exception processing module, a log module, a background configuration updating module, and a data reporting module.
[0148] The plug-in control communication module provides a plug-in control interface and communicates with a control end to receive a plug-in control instruction.
[0149] The device management module discovers and acquires a device connected to a gateway network in real time through a gateway arp / dhcp table and the like, identifies the device type (host device / mobile phone device / PC device) through device mac, mdns protocol and the like, and manages the state of the device.
[0150] The intelligent routing module intelligently selects an optimal route to a target address through detection of an exit IP and speed measurement and the like.
[0151] The routing rule management module manages routing rules, iptables rules, ipset configurations and the like, intercepts target traffic, and directs the traffic into a virtual network card, so as to realize traffic management or traffic acceleration of the device.
[0152] Virtual network card traffic processing module: process intercepted traffic, according to the configured control or acceleration strategy, different types of traffic are processed correspondingly. Including TCP traffic processing module, UDP traffic processing module, DNS domain name processing module, etc.
[0153] Plug-in upgrade update module: handle the logic of plug-in upgrade update;
[0154] Abnormal processing module: the daemon technical solution plug-in runs stably, and collects and captures abnormal information;
[0155] Log module: record the running log of the technical solution plug-in, facilitate abnormal stability positioning;
[0156] Background configuration update module: real-time update of background strategy configuration, control configuration and game, education and other acceleration scene configuration;
[0157] Reporting module: asynchronous reporting of various data information of the system, facilitating subsequent system operation.
[0158] The embodiment of the application provides an electronic device, the computer device includes a processor and a memory, the memory stores at least one instruction or at least one program, the at least one instruction or the at least one program is loaded and executed by the processor to realize the business service request processing method provided by the above method embodiment.
[0159] The memory can be used to store software programs and modules, and the processor can execute various functions, applications and data processing by running the software programs and modules stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store operating systems, application programs required by functions, etc. The data storage area can store data created according to the use of the device. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state memory device. Accordingly, the memory can also include a memory controller to provide access to the memory for the processor.
[0160] Figure 9 The hardware structure diagram of the computer device for running a business service request processing method provided by the embodiment of the application is as shown in Figure 9 The internal structure of the electronic device can include but is not limited to: processor, network interface and memory. Among them, the processor, network interface and memory in the computer device can be connected through a bus or other ways, in the embodiment of the present application Figure 9 It is taken as an example to be connected through a bus.
[0161] The processor (or CPU (Central Processing Unit)) is the computing core and control core of the computer device. The network interface can optionally include a standard wired interface, a wireless interface (such as WI-FI, a mobile communication interface, etc.). The memory is a memory device in the electronic device, used to store programs and data. It can be understood that the memory here can be a high-speed RAM memory device, or a non-volatile memory, for example, at least one disk storage device; optionally, it can also be at least one storage device located away from the aforementioned processor. The memory provides a storage space that stores the operating system of the electronic device, which can include but is not limited to: a Windows system (an operating system), a Linux (an operating system), an Android (a mobile operating system) system, an IOS (a mobile operating system) system, etc., and the present application does not limit this; and in the storage space, one or more instructions suitable for being loaded and executed by the processor are also stored, which can be one or more computer programs (including program codes). In the embodiment of the present application, the processor loads and executes one or more instructions stored in the memory to implement the service request processing method provided by the above method embodiment.
[0162] The embodiment of the present application also provides a computer readable storage medium, which can be arranged in a terminal to save at least one instruction or at least one program related to a service request processing method for realizing the service request processing method provided by the above method embodiment.
[0163] The embodiment of the present application also provides a computer program product or computer program, which includes computer instructions stored in a computer readable storage medium. The processor of the electronic device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to make the electronic device execute the service request processing method described above.
[0164] Optionally, in the present embodiment, the storage medium can include but is not limited to: a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store program codes.
[0165] It should be noted that the above-mentioned embodiments of the present application are merely intended to describe the present application and are not intended to limit the present application. The above-mentioned embodiments of the present application are described in a progressive manner, and the same or similar parts among the embodiments can be mutually referred to. Each embodiment focuses on the difference from other embodiments. In particular, the device embodiments are described simply because they are basically similar to the method embodiments, and the relevant parts can be referred to the description of the method embodiments.
[0166] The embodiments in the present specification are described in a progressive manner, and the same or similar parts among the embodiments can be mutually referred to. Each embodiment focuses on the difference from other embodiments. In particular, the device embodiments are described simply because they are basically similar to the method embodiments, and the relevant parts can be referred to the description of the method embodiments.
[0167] A person of ordinary skill in the art can understand that all or part of the above-mentioned embodiments can be completed by hardware, or a program instructing relevant hardware, and the program can be stored in a computer readable storage medium, such as a read-only memory, a magnetic disk or an optical disk.
[0168] The above-mentioned embodiments are merely preferred embodiments of the present application, and are not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for processing business service requests, characterized in that, The method includes: Obtain service requests from terminals to be managed in the local area network; the service requests include destination address information; the terminals to be managed include multiple terminals. When the destination address information matches a preset address set, the service request is marked as a marked service request; the preset address set includes service address information of at least one preset service; the preset address set is associated with preset routing rules pointing to preset virtual network interface cards; Based on the preset routing rules, the marked service request is imported into the preset virtual network interface card; the preset virtual network interface card is used to intercept or accelerate the marked service request. The step of marking the service request as a marked service request includes: Determine the control type of the target business service corresponding to the business service request; the control type includes interception control or acceleration control. The service request is marked based on the control type so that it is marked with a preset tag pointing to a preset routing rule, thereby generating the marked service request.
2. The service request processing method according to claim 1, characterized in that, The preset address set also includes specified address information; before obtaining the service requests of the terminals to be managed in the local area network, the method further includes: Obtain the domain name resolution request of the terminal to be managed; the domain name resolution request includes gateway address information and target domain name information corresponding to the target business service, wherein the target business service is the business service indicated by the destination address information; Based on preset conversion rules, the gateway address information is converted into specified address information to obtain the converted domain name resolution request; Based on the matching of the specified address information in the converted domain name resolution request with the preset address set, the converted domain name resolution request is marked to obtain a marked domain name resolution request; Based on the preset routing rules, the marked domain name resolution request is imported into the preset virtual network interface card; the preset virtual network interface card is used to obtain the destination address information based on the target domain name information, and update the preset address set according to the destination address information; The destination address information is returned to the terminal to be managed.
3. The service request processing method according to claim 2, characterized in that, The step of updating the preset address set according to the destination address information includes: When the target domain name information is a preset controlled domain name information, obtain the current service address information corresponding to the target domain name information from the preset address set; If the destination address information is not present in the current service address information, the destination address information is added to the preset address set.
4. The service request processing method according to claim 3, characterized in that, Before obtaining the domain name resolution request of the terminal to be managed, the method further includes: In response to an acceleration command for the target service, at least one network transmission path corresponding to the target service is determined; Determine the network latency of each network transmission path in the at least one network transmission path; The network transmission path corresponding to the minimum network latency is determined as the target network transmission path; Obtain the target domain name information and target service address information corresponding to the target service in the target network transmission path; The target domain name information corresponding to the target service in the target network transmission path is determined as the preset control domain name information, and the target service address information is added to the preset address set.
5. The service request processing method according to claim 4, characterized in that, The accelerated processing based on the marked service request includes: Based on the target network transmission path, the service request is sent to the destination address information.
6. The service request processing method according to claim 1, characterized in that, The method further includes: In response to the control service configuration command, determine at least one preset service; Obtain the service address information of the at least one preset business service from the service address information database; Based on the set type of the pre-created address set, the service address information of the at least one preset business service is added to the address set to obtain the preset address set; wherein, the address set is associated with the preset routing rule, and the set type indicates that the elements of the target data type are stored in a hash table manner.
7. A service request processing apparatus, characterized in that, The device includes: The request acquisition module is used to acquire service requests from terminals to be managed in the local area network; the service request includes destination address information; the terminals to be managed include multiple terminals. The first marking module is used to mark the service request as a marked service request when the destination address information matches a preset address set; the preset address set includes service address information of at least one preset service; the preset address set is associated with preset routing rules pointing to preset virtual network interface cards; The first request import module is used to import the marked service request into the preset virtual network interface card based on the preset routing rules; the preset virtual network interface card is used to intercept or accelerate the marked service request. The step of marking the service request as a marked service request includes: Determine the control type of the target business service corresponding to the business service request; the control type includes interception control or acceleration control. The service request is marked based on the control type so that it is marked with a preset tag pointing to a preset routing rule, thereby generating the marked service request.
8. An electronic device, characterized in that, It includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the service request processing method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one instruction or at least one program, which is loaded and executed by a processor to implement the service request processing method as described in any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the business service request processing method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Network request sending method and device
CN108063712A
Game acceleration method and device, VPN terminal and storage medium
CN112152828A
Method and device for determining forbidden IP address of network accelerator and storage medium
CN112235231A