CN114710564A - Service access method, device, electronic equipment and storage medium - Google Patents

Service access method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114710564A
CN114710564A CN202210406847.4A CN202210406847A CN114710564A CN 114710564 A CN114710564 A CN 114710564A CN 202210406847 A CN202210406847 A CN 202210406847A CN 114710564 A CN114710564 A CN 114710564A
Authority
CN
China
Prior art keywords
service
access
historical
target
target service
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210406847.4A
Other languages
Chinese (zh)
Other versions
CN114710564B (en
Inventor
杨凯
郭韶龙
刘涛
田娜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN202210406847.4A priority Critical patent/CN114710564B/en
Publication of CN114710564A publication Critical patent/CN114710564A/en
Application granted granted Critical
Publication of CN114710564B publication Critical patent/CN114710564B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The present disclosure relates to a method, an apparatus, an electronic device and a storage medium for service access, and relates to the technical field of communications, wherein the method comprises: receiving a service access request message sent by a terminal, wherein the service access request message is used for accessing a target service; acquiring a historical access record of the terminal, wherein the historical access record comprises a historical service accessed by the terminal and a historical access interface corresponding to the historical service, and the historical access interface is used for transmitting data related to the historical service; taking the historical access interface corresponding to the target service in the historical access record as the target access interface of the target service under the condition that the historical service comprises the target service; the target service is accessed through the target access interface. Therefore, the same service is accessed through the same access interface, and the problem that the service is possibly interrupted when the same service is accessed through a plurality of access interfaces is solved.

Description

Service access method, device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a method and an apparatus for service access, an electronic device, and a storage medium.
Background
With the continuous development of communication technology, in order to obtain higher Network bandwidth and better Network access quality, the demands of dual-WAN (english: Wide Area Network) and multi-WAN access networks of routers are increasing. Currently, a router including multiple WAN ports generally allocates WAN ports according to sessions (sessions) accessed by terminals, that is, different sessions may be allocated to different WAN ports.
Since the same target service may include multiple sessions, for the target service, the terminal may access through multiple WAN ports of the router, that is, the terminal may have multiple public network IP addresses to the outside. However, for a target service (e.g. banking service) with a high security requirement, it may cause service disconnection, thereby affecting the normal access of the user to the target service.
Disclosure of Invention
To overcome the problems in the related art, the present disclosure provides a method, an apparatus, an electronic device, and a storage medium for service access.
According to a first aspect of the embodiments of the present disclosure, a method for service access is provided, where the method includes: receiving a service access request message sent by a terminal, wherein the service access request message is used for accessing a target service; acquiring a historical access record of the terminal, wherein the historical access record comprises a historical service accessed by the terminal and a historical access interface corresponding to the historical service, and the historical access interface is used for transmitting data related to the historical service; taking the historical access interface corresponding to the target service in the historical access record as the target access interface of the target service under the condition that the historical service contains the target service; and accessing the target service through the target access interface.
Optionally, the service access request message includes access address information corresponding to the target service; the historical service comprises the target service and is determined by the following modes: determining that the historical service contains the target service under the condition that the access address information corresponding to the historical service comprises the access address information corresponding to the target service; or, determining that the historical service includes the target service under the condition that the access address information corresponding to the historical service and the access address information corresponding to the target service meet a preset corresponding relationship; the preset corresponding relation comprises a corresponding relation between the historical service and at least one piece of access address information.
Optionally, the accessing address information includes an accessing domain name or a destination IP address, and when the accessing address corresponding to the historical service includes the accessing address corresponding to the target service, determining that the historical service includes the target service includes: determining that the historical service comprises a target service under the condition that an access domain name corresponding to the historical service comprises the target domain name; the target domain name comprises an access domain name corresponding to the target service and one or more of a parent domain name and a child domain name of the access domain name corresponding to the target service; or, determining that the historical service includes the target service when the destination IP address corresponding to the historical service includes the destination IP address corresponding to the target service.
Optionally, the method further comprises: and under the condition that the historical service does not contain the target service, determining the target access interface from a plurality of preset access interfaces.
Optionally, the determining the target access interface from the plurality of preset access interfaces includes: acquiring bandwidth weights of a plurality of preset access interfaces; and under the condition that the historical service does not contain the target service, determining the target access interface from the plurality of access interfaces according to the bandwidth weights of the plurality of preset access interfaces.
Optionally, the determining, according to the bandwidth weights of the multiple preset access interfaces, the target access interface from the multiple access interfaces includes: and acquiring the access interface in an idle state from the plurality of preset access interfaces according to the sequence of the bandwidth weights of the plurality of preset access interfaces from large to small to obtain the target access interface.
Optionally, the method further comprises: and under the condition that the time for accessing the target service through the target access interface is not detected to reach a preset time threshold value, deleting the access record of the target service from the historical access record.
According to a second aspect of the embodiments of the present disclosure, there is provided an apparatus for service access, the apparatus including: the terminal comprises a receiving module, a sending module and a receiving module, wherein the receiving module is configured to receive a service access request message sent by the terminal, and the service access request message is used for accessing a target service; the acquisition module is configured to acquire a historical access record of the terminal, wherein the historical access record comprises a historical service accessed by the terminal and a historical access interface corresponding to the historical service, and the historical access interface is used for transmitting data related to the historical service; a first determining module, configured to, when the historical service includes the target service, take the historical access interface corresponding to the target service in the historical access record as a target access interface of the target service; an access module configured to access the target service through the target access interface.
Optionally, the service access request message includes access address information corresponding to the target service; the historical service comprises the target service and is determined by the following modes: determining that the historical service contains the target service under the condition that the access address information corresponding to the historical service comprises the access address information corresponding to the target service; or, determining that the historical service includes the target service under the condition that the access address information corresponding to the historical service and the access address information corresponding to the target service meet a preset corresponding relationship; the preset corresponding relation comprises a corresponding relation between the historical service and at least one piece of access address information.
Optionally, the accessing address information includes an accessing domain name or a destination IP address, and determining that the historical service includes the target service when the accessing address corresponding to the historical service includes the accessing address corresponding to the target service includes: determining that the historical service comprises a target service under the condition that an access domain name corresponding to the historical service comprises the target domain name; the target domain name comprises an access domain name corresponding to the target service and one or more of a parent domain name and a child domain name of the access domain name corresponding to the target service; or, determining that the historical service includes the target service when the destination IP address corresponding to the historical service includes the destination IP address corresponding to the target service.
Optionally, the apparatus further comprises: a second determining module configured to determine the target access interface from a plurality of preset access interfaces if the historical traffic does not include the target traffic.
Optionally, the second determining module includes: the obtaining submodule is configured to obtain bandwidth weights of a plurality of preset access interfaces; the determining submodule is configured to determine the target access interface from the plurality of access interfaces according to the bandwidth weights of the plurality of preset access interfaces under the condition that the historical service does not contain the target service.
Optionally, the determining sub-module is configured to obtain an access interface in an idle state from the plurality of preset access interfaces according to a sequence that the bandwidth weights of the plurality of preset access interfaces are from large to small, so as to obtain the target access interface.
Optionally, the apparatus further comprises: a deleting module configured to delete the access record of the target service from the historical access record if it is not detected that the time for accessing the target service through the target access interface reaches a preset time threshold.
According to a third aspect of an embodiment of the present disclosure, there is provided an electronic apparatus including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to implement the steps of the method of service access according to the first aspect of the present disclosure upon invocation of executable instructions stored on the memory.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the steps of the method of service access according to the first aspect of the present disclosure.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: firstly, receiving a service access request message sent by a terminal, wherein the service access request message is used for accessing a target service; secondly, acquiring a historical access record of the terminal, wherein the historical access record comprises a historical service accessed by the terminal and a historical access interface corresponding to the historical service, and the historical access interface is used for transmitting data related to the historical service; then, under the condition that the historical service comprises the target service, taking the historical access interface corresponding to the target service in the historical access record as the target access interface of the target service; and finally, accessing the target service through the target access interface. By the method, the target service can be accessed through the historical access interface corresponding to the target service in the historical access record under the condition that the historical service in the historical access record contains the currently accessed target service, namely the target service and the historical service belong to the same service, namely, the target service is accessed through the same access interface when the same service is accessed, and the problem that the service is possibly interrupted when the same service is accessed through a plurality of access interfaces is solved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a flow diagram illustrating a method of service access in accordance with an exemplary embodiment;
FIG. 2 is a flow diagram illustrating another method of service access in accordance with an exemplary embodiment;
FIG. 3 is a flow diagram illustrating another method of service access in accordance with an exemplary embodiment;
FIG. 4 is a flow diagram illustrating another method of service access in accordance with an exemplary embodiment;
FIG. 5 is a block diagram illustrating an apparatus for service access in accordance with an exemplary embodiment;
FIG. 6 is a block diagram illustrating another apparatus for service access in accordance with an illustrative embodiment;
FIG. 7 is a block diagram illustrating another apparatus for service access in accordance with an illustrative embodiment;
FIG. 8 is a block diagram illustrating another apparatus for service access in accordance with an illustrative embodiment;
FIG. 9 is a block diagram illustrating an electronic device in accordance with an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
It should be noted that all actions of acquiring signals, information or data in the present application are performed under the premise of complying with the corresponding data protection regulation policy of the country of the location and obtaining the authorization given by the owner of the corresponding device.
In the description that follows, the terms "first," "second," and the like are used for descriptive purposes only and are not intended to indicate or imply relative importance nor order to be construed.
Before introducing the method, apparatus, electronic device, and storage medium for service access provided by the present disclosure, an application scenario related to various embodiments of the present disclosure is first introduced. The present disclosure is applied to a scenario of allocating a router access interface, currently, a router including multiple WAN ports allocates WAN ports according to a Session (Session) accessed by a terminal, and after a service access request message of the terminal reaches the router, the router calculates and analyzes a target WAN port according to a quintuple of the Session in the service access request message. It will be appreciated that different sessions may be assigned to different WAN ports.
Since the same target service may include multiple sessions, for the target service, the terminal may access through multiple WAN ports of the router, each WAN port includes one public network IP address, and the terminal may have multiple public network IP addresses outside. However, for a target service (e.g. banking service) with a high security requirement, it may cause service disconnection, thereby affecting the normal access of the user to the target service.
In addition, there is another allocation method that all service access of each terminal is performed through a designated WAN port by designating the WAN port of each terminal in advance. However, once the setting is completed, the dynamic adjustment cannot be performed subsequently according to the load level of each WAN port, that is, the bandwidth of multiple WAN ports cannot be fully utilized. And when the number of terminals is large, each terminal needs to be set independently, and the implementation mode is complicated.
In order to solve the above problems, the present disclosure provides a method, an apparatus, an electronic device, and a storage medium for accessing a service, which can access a target service through a historical access interface corresponding to the target service in a historical access record when the historical service in the historical access record includes the currently accessed target service, that is, the target service and the historical service belong to the same service, that is, the present disclosure accesses the same service through the same access interface, and solves a problem that service interruption may be caused when the same target service is accessed through multiple access interfaces.
Specific embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
Fig. 1 is a flowchart illustrating a method for service access, which is applied in a router, according to an exemplary embodiment, and as shown in fig. 1, the method may include the following steps:
in step S101, a service access request message sent by the terminal is received.
When the terminal accesses the target service, the terminal needs to send a service access request message to the router, so that the router can acquire the access address information of the target service according to the service access request message, and the target service can be accessed through the access interface according to the access address information. Wherein, the service access request message is used for accessing the target service, and the access interface can be a WAN port of the router.
In step S102, a history access record of the terminal is acquired.
The historical access record comprises historical services accessed by the terminal and historical access interfaces corresponding to the historical services, and the historical access interfaces are used for transmitting data related to the historical services.
In step S103, if the historical service includes the target service, the historical access interface corresponding to the target service in the historical access record is used as the target access interface of the target service.
Since some services (e.g. banking services) have high requirements on security, if a terminal accesses a target service through multiple access interfaces, security considerations at the target service end may interrupt the access of the terminal to the target service, and finally cause an abnormal access to the target service by the terminal. Therefore, in order to ensure that a user normally accesses a target service through a terminal when a router includes multiple access interfaces, in this embodiment, it may be determined whether the user accesses the same service through the terminal according to whether a historical service includes the target service, and in a case that the historical service includes the target service, it may be determined that the target service accessed by the terminal is the same service as the historical service, and the historical access interface corresponding to the target service in the historical access record is used as the target access interface of the target service. That is, in the case that it is determined that the target service accessed by the terminal belongs to the same service as the historical service, the target service is accessed through the same access interface. Therefore, the problem that the terminal can possibly cause service access interruption by accessing the same service through a plurality of access interfaces because a plurality of access interfaces of the router are distributed according to the session of the service access request message in the prior art can be avoided, and the normal access of the user to the target service is ensured.
In step S104, the target service is accessed through the target access interface.
By adopting the method, the target service can be accessed through the historical access interface corresponding to the target service in the historical access record under the condition that the historical service in the historical access record contains the currently accessed target service, namely the target service and the historical service belong to the same service, namely, the access is performed through the same access interface when the same service is accessed, and the problem that the service is possibly interrupted when the same target service is accessed through a plurality of access interfaces is solved.
In some embodiments, the service access request message may include access address information corresponding to the target service, and the historical service including the target service in step S103 may be determined by:
the first method is as follows: and determining that the historical service comprises the target service under the condition that the access address information corresponding to the historical service comprises the access address information corresponding to the target service.
In some possible implementations, the access address information may include, for example, an access domain name or a destination IP address, and further, in a case that the access address corresponding to the historical service includes the access address corresponding to the target service, determining that the historical service includes the target service may include: and under the condition that the access domain name corresponding to the historical service comprises the target domain name, determining that the historical service comprises the target service.
The target domain name may include an access domain name corresponding to the target service, and one or more of a parent domain name and a child domain name of the access domain name corresponding to the target service. For example, if the access domain name corresponding to the historical service is cmbchina.com, and the access domain name corresponding to the target service is cmbchina.com or a sub-domain name of cmbchina.com, then it may be determined that the historical service includes the target service. Wherein, the sub-domain name of cmbchina.com can be, for example, a.cmbchina.com, or b.cmbchina.com. Accordingly, cmbchina.com is the parent domain name of a.cmbchina.com or b.cmbchina.com. The foregoing examples are illustrative only, and the disclosure is not limited thereto.
In addition, after receiving the access Domain Name sent by the terminal, the router can analyze the access Domain Name through a DNS (Domain Name System; Chinese: Domain Name resolution System) server, and convert the access Domain Name into a corresponding IP address, thereby facilitating the subsequent access of the target service according to the IP address.
And under the condition that the destination IP address corresponding to the historical service comprises the destination IP address corresponding to the target service, determining that the historical service comprises the target service.
For the access of part of the service, the access address information of the target service comprises a destination IP address. In this embodiment, if the destination IP address corresponding to the historical service includes the destination IP address corresponding to the target service, it may be determined that the historical service includes the target service. The destination IP address may be, for example, 1.1.1.1 or 2.2.2.0/24. It should be noted that the destination IP address can be directly accessed without being resolved by a DNS server.
The second method comprises the following steps: and under the condition that the access address information corresponding to the historical service and the access address information corresponding to the target service meet a preset corresponding relationship, determining that the historical service contains the target service.
The preset corresponding relationship may include a corresponding relationship between the historical service and at least one piece of access address information, and the preset corresponding relationship may be preset by a user.
Considering that part of services are complex, the same service may include both multiple access domain names and multiple destination IP addresses. Therefore, in this embodiment, in order to ensure the normal access of such services, the user may also preset the preset corresponding relationship of such services. Illustratively, the preset correspondence may include a correspondence between a service name and a terminal identifier (i.e., identification information of a terminal accessing the service) and at least one access address information. The terminal identifier may be, for example, a physical address (MAC address) or a host name (hostname) of the terminal. The at least one access address information may comprise, for example, at least one access domain name and/or at least one destination IP address. The destination IP address may be a complete IP address or an IP address segment.
Specifically, if the access address information corresponding to the historical service in the preset corresponding relationship includes the access address information corresponding to the target service, it may be determined that the access address information corresponding to the historical service and the access address information corresponding to the target service satisfy the preset corresponding relationship.
For example, taking the example that the preset correspondence includes the correspondence between the historical service and the first visited domain name, the second visited domain name, the first destination IP address, and the second destination IP address, first, the access address information of the historical service in the historical access record is obtained. If the access address information of the historical service comprises the first destination IP address, and the service access request message sent by the terminal comprises the first access domain name of the target service. According to the preset corresponding relationship, if the access address information corresponding to the historical service includes the access address information corresponding to the target service, that is, the first access domain name of the target service and the first destination IP address of the historical service satisfy the preset corresponding relationship, it can be determined that the historical service includes the target service, that is, the historical service and the target service belong to the same service.
It should be noted that, if the historical access record includes the access record of the historical service and the historical service has a preset corresponding relationship preset by the user, it is preferentially determined whether the historical service and the target service belong to the same service according to the preset corresponding relationship, that is, when the historical service has the preset corresponding relationship preset by the user, the priority for determining whether the historical service and the target service belong to the same service is higher than the priority for determining whether the historical service and the target service belong to the same service by using the access address information of the historical service according to the preset corresponding relationship.
Fig. 2 is a flowchart illustrating another method for service access according to an exemplary embodiment, and as shown in fig. 2, based on the steps in the above embodiment shown in fig. 1, the method may further include the following steps:
in step S105, in the case that the historical service does not include the target service, the target access interface is determined from a plurality of preset access interfaces.
If the historical service does not contain the target service, that is, the historical service and the target service do not belong to the same service, a target access interface of the target service can be determined from a plurality of preset access interfaces.
Accordingly, according to the embodiment shown in fig. 1, it can be obtained that the target service is not included in the historical service in step S105 by:
the first method is as follows: and determining that the historical service does not contain the target service under the condition that the access address information corresponding to the historical service does not contain the access address information corresponding to the target service.
The second method comprises the following steps: and under the condition that the access address information corresponding to the historical service and the access address information corresponding to the target service do not meet the preset corresponding relationship, determining that the historical service does not contain the target service.
As shown in fig. 3, the determining the target access interface from the plurality of preset access interfaces in step S105 may include the following steps:
in step S1051, bandwidth weights of a plurality of the preset access interfaces are obtained.
The bandwidth weight of each preset access interface (namely, WAN port) can be determined according to the bandwidth pair of each preset access interface. Illustratively, if two predetermined access interfaces, such as WAN1 port and WAN2 port, are included in the router, and the bandwidth of WAN1 port is 100M, and the bandwidth of WAN2 port is 50M, the weight of WAN1 port may be determined to be 2, and the weight of WAN2 port may be determined to be 1.
In step S1052, in the case that the historical traffic does not include the target traffic, the target access interface is determined from the plurality of access interfaces according to the bandwidth weights of the plurality of preset access interfaces.
In some embodiments, the access interface in the idle state may be obtained from the plurality of preset access interfaces in an order from a greater bandwidth weight to a smaller bandwidth weight of the plurality of preset access interfaces, so as to obtain the target access interface.
Illustratively, the weight of each preset access interface is obtained according to step S1051, that is, the weight of the WAN1 port is 2, and the weight of the WAN2 port is 1. It will be appreciated that if the terminal initiates three accesses to different services, there will be two passes through WAN1 port and one pass through WAN2 port. In this step, it may be determined whether the WAN1 port is in an idle state in an order from the largest bandwidth weight to the smallest bandwidth weight of the preset access interfaces, for example, it may be determined whether the WAN1 port reaches a preset load amount, and if the WAN1 port does not reach the preset load amount, it may be determined that the WAN1 port is in an idle state. If the WAN1 port is idle, the WAN1 port may be targeted access interface. If the WAN1 port is not idle, the WAN2 port may be the target access interface. It should be noted that, if the router includes a plurality of preset access interfaces, it needs to sequentially determine whether the access interface is in an idle state according to the order of the bandwidth weights of the preset access interfaces from large to small until a target access interface is obtained. The above examples are merely illustrative, and the present disclosure does not limit the number of preset access interfaces.
Fig. 4 is a flowchart illustrating another method for service access according to an exemplary embodiment, and as shown in fig. 4, based on the steps in the above embodiment shown in fig. 2, the method may further include the following steps:
in step S106, in case that it is not detected that the time for accessing the target service through the target access interface reaches the preset time threshold, the access record of the target service is deleted from the historical access records.
Considering that if the terminal does not access the target service through the target access interface for a long time, it may be that the user does not have a requirement for accessing the target service in a short time, that is, the service access is finished. Therefore, in order to allocate the access interfaces more reasonably, in this embodiment, the access record of the target service may be deleted from the historical access record when it is not detected that the time for accessing the target service through the target access interface reaches the preset time threshold.
That is to say, under the condition that it is not detected that the time for accessing the target service through the target access interface reaches the preset time threshold, it may be determined that the service access is finished this time. In order to fully utilize the bandwidth of each access interface, the access record of the target service may be deleted from the history access record, that is, when the target service is subsequently accessed again, the router may re-determine the target access interface according to the bandwidth weights of the plurality of preset access interfaces.
The preset time threshold may be, for example, 10 minutes, and if it is not detected that the time for accessing the target service through the target access interface reaches 10 minutes, it may be determined that the access of the terminal to the target service is ended, and the access record of the target service may be deleted from the historical access record.
By adopting the method, the target service can be accessed through the historical access interface corresponding to the target service in the historical access record under the condition that the historical service in the historical access record contains the currently accessed target service, namely the target service and the historical service belong to the same service, namely, the access is performed through the same access interface when the same service is accessed, and the problem that the service is possibly interrupted when the same target service is accessed through a plurality of access interfaces is solved.
Fig. 5 is a block diagram illustrating an apparatus for service access according to an exemplary embodiment, and as shown in fig. 5, the apparatus 200 includes:
a receiving module 201 configured to receive a service access request message sent by a terminal, where the service access request message is used to access a target service;
an obtaining module 202, configured to obtain a historical access record of the terminal, where the historical access record includes a historical service accessed by the terminal, and a historical access interface corresponding to the historical service, and the historical access interface is used to transmit data related to the historical service;
a first determining module 203, configured to, in a case that the historical service includes the target service, take the historical access interface corresponding to the target service in the historical access record as the target access interface of the target service;
an access module 204 configured to access the target service through the target access interface.
Optionally, the service access request message includes access address information corresponding to the target service; the historical service comprises the target service and is determined by the following modes: determining that the historical service comprises the target service under the condition that the access address information corresponding to the historical service comprises the access address information corresponding to the target service; or, determining that the historical service includes the target service under the condition that the access address information corresponding to the historical service and the access address information corresponding to the target service meet a preset corresponding relationship; the preset corresponding relation comprises a corresponding relation between the historical service and at least one piece of access address information.
Optionally, the accessing address information includes an accessing domain name or a destination IP address, and determining that the historical service includes the target service when the accessing address corresponding to the historical service includes the accessing address corresponding to the target service includes: determining that the historical service comprises the target service under the condition that the access domain name corresponding to the historical service comprises the target domain name; the target domain name comprises an access domain name corresponding to the target service and one or more of a father domain name and a son domain name of the access domain name corresponding to the target service; or, when the destination IP address corresponding to the historical service includes the destination IP address corresponding to the target service, it is determined that the historical service includes the target service.
Optionally, as shown in fig. 6, the apparatus 200 further includes:
a second determining module 205, configured to determine the target access interface from a plurality of preset access interfaces in case that the historical service does not include the target service.
Optionally, as shown in fig. 7, the second determining module 205 includes:
an obtaining sub-module 2051 configured to obtain bandwidth weights of a plurality of the preset access interfaces;
the determining sub-module 2052 is configured to, in a case that the historical service does not include the target service, determine the target access interface from the plurality of access interfaces according to bandwidth weights of the plurality of preset access interfaces.
Optionally, the determining sub-module 2052 is configured to obtain an access interface in an idle state from the multiple preset access interfaces according to an order that the bandwidth weights of the multiple preset access interfaces are from large to small, so as to obtain the target access interface.
Optionally, as shown in fig. 8, the apparatus 200 further includes: a deleting module 206 configured to delete the access record of the target service from the historical access record in case that the time for accessing the target service through the target access interface is not detected to reach a preset time threshold.
By adopting the device, the target service can be accessed through the historical access interface corresponding to the target service in the historical access record under the condition that the historical service in the historical access record contains the currently accessed target service, namely the target service and the historical service belong to the same service, namely, the target service is accessed through the same access interface when the same service is accessed, and the problem that the service is possibly interrupted when the same target service is accessed through a plurality of access interfaces is solved.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
The present disclosure also provides a computer readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the steps of the method of service access provided by the present disclosure.
Fig. 9 is a block diagram illustrating an electronic device 300 in accordance with an example embodiment. For example, the electronic device 300 may be provided as a router. Referring to FIG. 9, electronic device 300 includes a processing component 322 that further includes one or more processors and memory resources, represented by memory 332, for storing instructions, such as applications, that are executable by processing component 322. The application programs stored in memory 332 may include one or more modules that each correspond to a set of instructions. Further, the processing component 322 is configured to execute instructions to perform the method of service access described above.
The electronic device 300 may also include a power component 326 configured to perform power management of the electronic device 300, a wired or wireless network interface 350 configured to connect the electronic device 300 to a network, and an input/output (I/O) interface 358. The electronic device 300 may operate based on an operating system, such as Windows Server, stored in the memory 332TM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTMOr the like.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. A method for service access, comprising:
receiving a service access request message sent by a terminal, wherein the service access request message is used for accessing a target service;
acquiring a historical access record of the terminal, wherein the historical access record comprises a historical service accessed by the terminal and a historical access interface corresponding to the historical service, and the historical access interface is used for transmitting data related to the historical service;
taking the historical access interface corresponding to the target service in the historical access record as the target access interface of the target service under the condition that the historical service contains the target service;
and accessing the target service through the target access interface.
2. The method of claim 1, wherein the service access request message includes access address information corresponding to the target service; the historical service comprises the target service and is determined by the following modes:
determining that the historical service comprises the target service under the condition that the access address information corresponding to the historical service comprises the access address information corresponding to the target service; alternatively, the first and second electrodes may be,
determining that the historical service comprises the target service under the condition that the access address information corresponding to the historical service and the access address information corresponding to the target service meet a preset corresponding relationship; the preset corresponding relation comprises a corresponding relation between the historical service and at least one piece of access address information.
3. The method according to claim 2, wherein the access address information includes an access domain name or a destination IP address, and the determining that the historical service includes the target service when the access address corresponding to the historical service includes the access address corresponding to the target service comprises:
determining that the historical service comprises a target service under the condition that an access domain name corresponding to the historical service comprises the target domain name; the target domain name comprises an access domain name corresponding to the target service and one or more of a parent domain name and a child domain name of the access domain name corresponding to the target service; alternatively, the first and second electrodes may be,
and under the condition that the destination IP address corresponding to the historical service comprises the destination IP address corresponding to the target service, determining that the historical service comprises the target service.
4. The method of claim 1, further comprising:
and under the condition that the historical service does not contain the target service, determining the target access interface from a plurality of preset access interfaces.
5. The method of claim 4, wherein determining the target access interface from the plurality of preset access interfaces comprises:
acquiring bandwidth weights of a plurality of preset access interfaces;
and under the condition that the historical service does not contain the target service, determining the target access interface from the plurality of access interfaces according to the bandwidth weights of the plurality of preset access interfaces.
6. The method of claim 5, wherein the determining the target access interface from the plurality of access interfaces according to the bandwidth weights of the plurality of preset access interfaces comprises:
and acquiring the access interface in an idle state from the plurality of preset access interfaces according to the sequence of the bandwidth weights of the plurality of preset access interfaces from large to small to obtain the target access interface.
7. The method according to any one of claims 1 to 6, further comprising:
and under the condition that the time for accessing the target service through the target access interface is not detected to reach a preset time threshold, deleting the access record of the target service from the historical access record.
8. An apparatus for service access, comprising:
the terminal comprises a receiving module, a sending module and a receiving module, wherein the receiving module is configured to receive a service access request message sent by the terminal, and the service access request message is used for accessing a target service;
the acquisition module is configured to acquire a historical access record of the terminal, wherein the historical access record comprises a historical service accessed by the terminal and a historical access interface corresponding to the historical service, and the historical access interface is used for transmitting data related to the historical service;
a first determining module, configured to, when the historical service includes the target service, take the historical access interface corresponding to the target service in the historical access record as a target access interface of the target service;
an access module configured to access the target service through the target access interface.
9. An electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to implement the steps of the method of any one of claims 1 to 7 when invoking executable instructions stored on the memory.
10. A computer-readable storage medium, on which computer program instructions are stored, which program instructions, when executed by a processor, carry out the steps of the method according to any one of claims 1 to 7.
CN202210406847.4A 2022-04-18 2022-04-18 Service access method, device, electronic equipment and storage medium Active CN114710564B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210406847.4A CN114710564B (en) 2022-04-18 2022-04-18 Service access method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210406847.4A CN114710564B (en) 2022-04-18 2022-04-18 Service access method, device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114710564A true CN114710564A (en) 2022-07-05
CN114710564B CN114710564B (en) 2024-02-06

Family

ID=82174459

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210406847.4A Active CN114710564B (en) 2022-04-18 2022-04-18 Service access method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114710564B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010054101A1 (en) * 1999-12-23 2001-12-20 Tim Wilson Server and method to provide access to a network by a computer configured for a different network
CN101053213A (en) * 2004-11-04 2007-10-10 松下电器产业株式会社 Multi-interface communication equipment, terminal and path switching method
KR20080054831A (en) * 2006-12-13 2008-06-19 주식회사 케이티 Multiple network interface apparatus and method, and traffic control option information transmission method and network interface selection method in its
CN102056133A (en) * 2009-11-05 2011-05-11 中兴通讯股份有限公司 Device and method for realizing concentrated access into business operating support system
CN102684951A (en) * 2011-03-14 2012-09-19 鸿富锦精密工业(深圳)有限公司 Method and system for selecting network path from multiple wide area network ports and network path device
US20140259147A1 (en) * 2011-09-29 2014-09-11 Israel L'Heureux Smart router
CN109450869A (en) * 2018-10-22 2019-03-08 杭州安恒信息技术股份有限公司 A kind of service security means of defence based on user feedback
CN112153130A (en) * 2020-09-14 2020-12-29 腾讯科技(深圳)有限公司 Business resource access method and device
CN113630329A (en) * 2021-07-20 2021-11-09 湖北美和易思教育科技有限公司 Load balancing method and system based on user access amount and readable storage medium
CN113849362A (en) * 2020-06-28 2021-12-28 腾讯科技(深圳)有限公司 Business service platform management method, device and computer readable storage medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010054101A1 (en) * 1999-12-23 2001-12-20 Tim Wilson Server and method to provide access to a network by a computer configured for a different network
CN101053213A (en) * 2004-11-04 2007-10-10 松下电器产业株式会社 Multi-interface communication equipment, terminal and path switching method
KR20080054831A (en) * 2006-12-13 2008-06-19 주식회사 케이티 Multiple network interface apparatus and method, and traffic control option information transmission method and network interface selection method in its
CN102056133A (en) * 2009-11-05 2011-05-11 中兴通讯股份有限公司 Device and method for realizing concentrated access into business operating support system
CN102684951A (en) * 2011-03-14 2012-09-19 鸿富锦精密工业(深圳)有限公司 Method and system for selecting network path from multiple wide area network ports and network path device
US20120236739A1 (en) * 2011-03-14 2012-09-20 Hon Hai Precision Industry Co., Ltd. Network device, and multi-wide area network interface selection module and method
US20140259147A1 (en) * 2011-09-29 2014-09-11 Israel L'Heureux Smart router
CN109450869A (en) * 2018-10-22 2019-03-08 杭州安恒信息技术股份有限公司 A kind of service security means of defence based on user feedback
CN113849362A (en) * 2020-06-28 2021-12-28 腾讯科技(深圳)有限公司 Business service platform management method, device and computer readable storage medium
CN112153130A (en) * 2020-09-14 2020-12-29 腾讯科技(深圳)有限公司 Business resource access method and device
CN113630329A (en) * 2021-07-20 2021-11-09 湖北美和易思教育科技有限公司 Load balancing method and system based on user access amount and readable storage medium

Also Published As

Publication number Publication date
CN114710564B (en) 2024-02-06

Similar Documents

Publication Publication Date Title
EP3585095B1 (en) Method and device for controlling qos, smf, upf, ue, pcf and an
US7477648B2 (en) Packet forwarding apparatus and access network system
CN112437456B (en) Communication method and equipment in non-public network
US20160006686A1 (en) Dhcp proxy in a subscriber environment
JPH1065737A (en) Substitutive server device and server device
US20080304449A1 (en) Fa Assignment Method, Fa Assignment Module and Policy Server in the Wireless Portable Internet System
CN111327668B (en) Network management method, device, equipment and storage medium
KR20200130043A (en) Method and apparatus for managing an identifier of a terminal in edge computing service
EP3826359A1 (en) Radio access network information processing method and device, network element, and storage medium
EP2466796A1 (en) User access method, system and access server, access device
CN111050355B (en) Method, device and system for dynamically adjusting Qos of mobile terminal
US20190215723A1 (en) Packet transmission method, apparatus, and packet transmission system
CN114285900A (en) Scheduling system, authentication method, scheduling method, apparatus, server, and medium
CN110120932B (en) Multipath establishing method and device
CN110855596B (en) Communication connection method and device, communication equipment and computer readable storage medium
CN114710564B (en) Service access method, device, electronic equipment and storage medium
WO2021248971A1 (en) Network access method, electronic device, and storage medium
CN114938508A (en) 5G private network control method and device, electronic equipment and storage medium
CN110809033A (en) Message forwarding method and device and switching server
CN114500395B (en) Flow control method, device and equipment
CN114553771B (en) Method for virtual router loading and related equipment
CN112994996B (en) Home network sharing method, MEC server, computer device, and medium
US20230188957A1 (en) Communication Method and Apparatus
WO2022270228A1 (en) Device and method for providing communication service for accessing ip network, and program therefor
US20230025344A1 (en) Application Discovery Method, Apparatus, and System, and Computer Storage Medium

Legal Events

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