Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to" determining "or" in response to detecting ". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
Furthermore, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used for distinguishing between descriptions and not necessarily for describing or implying relative importance.
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather "one or more but not all embodiments" unless specifically stated otherwise. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise.
The address configuration method provided by the embodiment of the application can be suitable for the access server, so that the access server dynamically configures the access address of the terminal device, and server switching and gray level verification are facilitated. The terminal device may be a Station (ST) in a WLAN, and may be a cellular phone, a cordless phone, a Session Initiation Protocol (SIP) phone, a Wireless Local Loop (WLL) station, a Personal Digital Assistant (PDA) device, a handheld device with Wireless communication capability, a computing device or other processing device connected to a Wireless modem, a vehicle-mounted device, a vehicle-mounted networking terminal, a computer, a laptop, a handheld communication device, a handheld computing device, a satellite radio device, a Wireless modem card, a television Set Top Box (STB), a Customer Premises Equipment (CPE), and/or other devices for communicating over a Wireless system, as well as a next generation communication system, e.g., a Mobile terminal in a 5G Network or a future-evolved Public Land Mobile Network (Public Land Mobile Network, PLMN) network, mobile terminal, etc
To explain the technical solution of the present application, first, an application architecture environment where an access server exists according to the address configuration method provided by the present application is exemplarily explained with reference to fig. 1.
The application architecture environment comprises at least one terminal device, a service access server, a routing web server and a routing web interface for user operation. The terminal device, i.e. the client device, may be connected to the service access server through a service access address provided by the service access server, and may be connected to the routing server through a routing access address provided by the routing server. The service access server is used for processing a service interface request of the terminal equipment and requesting the routing server to acquire an access address list; the routing server is used for caching the access address list, the configuration rule and other data synchronized by the routing web server into a local storage, writing the data into a disk file, and providing different interfaces for the terminal equipment and the service access server to request the access address list. The routing web server provides an adding and deleting modification interface for data such as service access addresses and routing access addresses of the interface configuration terminal equipment, and provides an interface for synchronizing the data to a routing service interface and configuring the effective interface.
For example, when the service access server is upgraded, in order to better provide a network service for a terminal, the terminal device needs to be switched and connected to another server, that is, an access address of the terminal device needs to be modified, so that the terminal device can be connected to a new service access server according to the modified access address, and the new service access server can continue to process subsequent service requests of the terminal device. However, since the access address of the terminal device is directly modified, if there are a plurality of connected terminal devices on the service access server for upgrading, the configuration of the access address of the user terminal is modified one by one, the switching efficiency is low, and the terminal device cannot be switched and connected to a new service access server quickly and flexibly.
Therefore, the address configuration method provided by the application can realize the IP address access of the switching server rapidly and flexibly in batches even for a single device according to the accurate configuration of the terminal device identification, and greatly improves the switching efficiency of the terminal device connecting with the service access server.
The address configuration method provided by the present application is exemplarily described below with reference to fig. 2 and by a specific embodiment.
Referring to fig. 3, a schematic flowchart of an address configuration method according to an embodiment of the present application is provided. The execution subject of the address configuration method in this embodiment is a service access server. The method comprises the following steps:
s101: the method comprises the steps of receiving a login request sent by terminal equipment, wherein the login request comprises access request information and a first identifier which is generated by using a preset encryption algorithm and used for identifying a first access address list of the terminal.
In this embodiment, when the terminal device intends to perform a related service activity through the service access server, a login request is sent to the service access server in advance based on an access address in the first access address list, and the service access server receives the login request sent by the terminal device and performs login verification according to the access request information. The first access address list comprises at least one service access address and at least one routing access address, and the first access address list is cached in a local storage of the terminal equipment. The first identifier may be a character string generated around the first access address list by the preset encryption algorithm, and the character string serves as a unique identifier of the first access address list. The character string may be a 16-bit character string, a 32-bit character string or a 64-bit character string, and is cached to the local storage of the service access server, so that when the first identifier is required subsequently, local cache acquisition may be performed, thereby improving the verification efficiency. The preset encryption algorithm may be any one of a symmetric encryption algorithm, an asymmetric encryption algorithm, or a hash algorithm.
S102: and receiving a second access address list sent by the routing server, and generating a second identifier for identifying the second access address list by using the preset encryption algorithm.
In this embodiment, the second access address list includes at least one service access address and at least one routing access address, and the second access address list is cached in a local storage of the service access server. The second identifier may be a character string generated around the second access address list by the preset encryption algorithm, and is used as a unique identifier of the second access address list. The string may be a 16-bit string, a 32-bit string, or a 64-bit string. And after the service access server receives a new second access address list from the routing server each time, the second identifier is encrypted and generated according to the preset encryption algorithm.
S103: and comparing the first identifier with the second identifier.
In this embodiment, after the second identifier is generated, the service access server obtains the first identifier of the first access address list corresponding to the terminal device from its local storage, and compares the first identifier with the second identifier. For example, the first identifier is a character string "abcdefgcde", the second identifier is a character string "abcdefgcde", the character strings of the first identifier and the second identifier are sequentially compared one by one, and according to a comparison result, whether the access addresses recorded in the first access address list and the second access address list of the respective identifiers are consistent or not is determined.
S104: and if the comparison is inconsistent, issuing the second access address list to the terminal equipment, updating the first access address list by the terminal equipment according to the second access address list, and resending the login request according to the service access address in the updated first access address list.
In this embodiment, when the first identifier is not consistent with the second identifier in comparison, that is, the access address list configured by the service access routing web server changes, the second access address list is not consistent with the first access address list, the service access server issues the second access address list received from the routing server to the terminal device, the terminal device updates the first access address list according to the second access address list, caches the updated first access address list in the local storage of the terminal device, and meanwhile, the updated service access address in the first access address list re-accesses the service access server, so that the service access server continues to process subsequent service requests. In addition, if the comparison is consistent, it is stated that the second access address list is consistent with the first access address list, and the service access server does not need to issue the second access address list to the terminal device.
After the terminal device finishes updating the first access address list, the first identifier used for identifying the updated first access address list is regenerated by using the preset encryption algorithm, and the first identifier is cached in the local storage of the terminal device.
In an embodiment, the login request further includes an access address identifier of the terminal device, where the access address identifier may be one or more of a device number, a user name, and an area code (Mcc) of the terminal device, and the access address identifier is cached in a local storage of the terminal device. In order to facilitate the routing server to more accurately and quickly inquire an access address list according to the request of the service access server, the service access server sends a routing service request containing the access address identifier to the routing server and receives the second access address list obtained by the routing server according to an access address identifier configuration rule.
Wherein the access address identification configuration rule comprises one or more of the following: 1) accurately configuring the access address of a single terminal device according to the device number; 2) configuring the access address of single or batch terminal equipment according to the regular expression matching of the equipment number; 3) accurately configuring an access address of a single terminal device according to a user name; 4) matching and configuring the access addresses of single or batch terminal equipment according to the regular expression of the user name; 5) configuring the access address of single or batch terminal equipment according to the region code (mcc).
Illustratively, the access address is configured according to the access requirements of the terminal device. For example, when a server is upgraded, in order to access a terminal device configuration starting with 86007492 for a certain group of device numbers to an access a server in a grayscale environment, the routing server configures the access address of the starting device number 86007492 as the access address of the a server according to a regular expression of the device number, returns to the access a server, and notifies the routing server of the configuration validation.
In an embodiment, after receiving a login request of the terminal device, the service access server extracts access request information, a first identifier and an access address identifier in the login request, wherein the access request information includes an account and a password; and verifying the account and the password, feeding back a verification result to the terminal equipment, and generating the routing service request containing the access address identifier.
In one embodiment, referring to fig. 5, in a possible scenario, only the address of the routing server is stored in the local storage of the terminal device, and none of the address of the service access server or the current service access address is available, so that a communication connection cannot be established with the service access server, and a service request is sent to the service access server. The embodiment of the application provides an address configuration method, which mainly relates to a process of acquiring an access address list from a routing server in advance by a terminal device.
The method comprises the following steps:
s301: the terminal equipment needs to send an address acquisition request to the routing server according to a pre-stored routing address.
S302: and the terminal equipment receives a first access address list sent by the response of the routing server. The first access address list comprises a service access address and a route access address, and is cached in the local storage of the terminal equipment.
S303: and the terminal equipment sends the login request to the service access server according to the service access address in the first access address list so as to establish communication connection.
In one possible scenario, a user provides a web interface operation through the routing web server to change the access address of the terminal device, and the routing web server sends a notification that the access address needs to be changed to the routing server, and the routing server continues to notify the service access servers. In order to facilitate the terminal device to reconnect to the service access server according to the changed access address, the access address of the terminal device needs to be reconfigured.
Exemplarily, fig. 4 is a schematic flowchart of an address configuration method according to another embodiment of the present application, and mainly relates to a process of reconfiguring an access address of the terminal device when an access address needs to be changed. The method comprises the following steps:
s201: and receiving an access address change notification sent by the routing server.
In this embodiment, the routing server receives the notification change notification sent by the routing web server, and continues to notify the service access server. And the service access server detects whether the routing server sends the access address change notification in real time.
S202: responding to and acquiring N pieces of online terminal equipment information according to the access address change notification; n is not less than 0 and is an integer.
In this embodiment, after receiving the notification of changing the access address, the service access server responds to detect the login status of the terminal device connected to the service access server, and obtains information of all currently online N terminal devices, where the information of the terminal device is that when the terminal device sends a login request to the service access server, the service access server caches the access address identifier.
S203: and sending N routing service requests containing the access address identifiers cached when the N online terminal devices log in to the routing server.
In this embodiment, after obtaining the information of the N online terminal devices, the service access server generates N routing service requests each including an access address identifier cached when the N online terminal devices log in, and sends the N routing service requests to the routing server, so as to obtain respective second access address lists corresponding to the N online terminal devices.
S204: and receiving N second access address lists acquired by the routing server according to the access address identifier configuration rule, and generating N second identifiers for identifying the N second access address lists in a one-to-one correspondence manner by using a preset encryption algorithm.
S205: comparing the N second identifications with a first identification of a first access address list for identifying the N online terminal devices, and determining M second identifications which are not consistent in comparison; n is more than or equal to M and more than or equal to 0, and M is an integer.
S206: and issuing the second access address lists corresponding to the M second identifiers to corresponding M online terminal devices, updating the respective first access address lists by the M online terminal devices according to the second access address lists, and retransmitting the login request according to the service access addresses in the updated first access address lists.
In another embodiment, in a possible scenario, in the notification that the access address needs to be changed, some terminal devices connected to the service access server have already been offline, and after receiving the notification of the change of the access address, the service access server cannot change the access address of the terminal device in the offline portion.
Therefore, an address configuration method provided in another embodiment of the present application mainly relates to a process of changing an access address of an offline terminal device. The method comprises the following steps:
responding to and acquiring information of J offline terminal devices according to the access address change notification; j is not less than 0, and N is an integer.
And sending J routing service requests containing access address identifiers cached when the J offline terminal devices log in to the routing server.
And receiving J second access address lists acquired by the routing server according to the access address identifier configuration rule, and generating J second identifiers for identifying the J second access address lists in a one-to-one correspondence manner by using a preset encryption algorithm.
Comparing the J second identifications with first identifications of a first access address list for identifying the J offline terminal equipment, and determining K second identifications which are not in accordance with the comparison; j is more than or equal to K and more than or equal to 0, and K is an integer.
And detecting the login states of the K offline terminal devices corresponding to the K second identifications. When the login state of L offline terminal devices in the K offline terminal devices is updated to be online, acquiring a second access address list identified by L second identifications corresponding to the L offline terminal devices, and issuing the second access address list to the L terminals; k is more than or equal to L and more than or equal to 0, and L is an integer.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Fig. 6 shows a block diagram of an address configuration apparatus provided in the embodiment of the present application, which corresponds to the address configuration method described in the above embodiment, and only shows a part related to the embodiment of the present application for convenience of description.
Referring to fig. 6, the apparatus includes: a first receiving module 100, a second receiving module 200, a comparing module 300, and a sending module 400.
The first receiving module 100 is configured to receive a login request sent by a terminal device, where the login request includes access request information and a first identifier, which is generated by using a preset encryption algorithm and is used to identify a first access address list of the terminal;
the second receiving module 200 is configured to receive a second access address list sent by a routing server, and generate a second identifier for identifying the second access address list by using the preset encryption algorithm;
the comparing module 300 is configured to compare the first identifier with the second identifier;
the issuing module 400 is configured to issue the access address list to the terminal device if the comparison is inconsistent, update the first access address list by the terminal device according to the second access address list, and resend the login request according to the updated service access address in the first access address list.
In another embodiment, an address configuration apparatus is further provided in an embodiment of the present application, where the apparatus includes:
and the third receiving module is used for receiving the access address change notification sent by the routing server.
The acquisition module is used for responding and acquiring the information of the N online terminal devices according to the access address change notification; n is not less than 0 and is an integer.
And the sending module is used for sending the N routing service requests containing the access address identifiers cached when the N online terminal devices log in to the routing server.
And the fourth receiving module is used for receiving the N second access address lists acquired by the routing server according to the access address identifier configuration rule and generating N second identifiers for identifying the N second access address lists in a one-to-one correspondence manner by using a preset encryption algorithm.
A comparison module, configured to compare the N second identifiers with a first identifier of a first access address list used for identifying the N online terminal devices, and determine M second identifiers that are inconsistent in comparison; n is more than or equal to M and more than or equal to 0, and M is an integer;
and the issuing module is used for issuing the second access address lists corresponding to the M second identifications to the corresponding M online terminal devices, updating the respective first access address lists by the M online terminal devices according to the second access address lists, and resending the login request according to the service access addresses in the updated first access address lists.
Fig. 7 is a schematic structural diagram of an access server according to an embodiment of the present application. As shown in fig. 7, the access server 7 of this embodiment includes: at least one processor 70 (only one processor is shown in fig. 7), a memory 71, and a computer program 72 stored in the memory 71 and executable on the at least one processor 70, the steps of any of the various method embodiments described above being implemented when the computer program 72 is executed by the processor 70.
The access server 7 may include, but is not limited to, a processor 70, a memory 71. Those skilled in the art will appreciate that fig. 7 is merely an example of the access server 7, and does not constitute a limitation of the access server 7, and may include more or less components than those shown, or combine some components, or different components, such as input output devices, network access devices, etc.
The Processor 70 may be a Central Processing Unit (CPU), and the Processor 70 may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 71 may in some embodiments be an internal storage unit of the access server 7, such as a hard disk or a memory of the access server 7. The memory 71 may also be an external storage device of the access server 7 in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the access server 7. Further, the memory 71 may also include both an internal storage unit of the access server 7 and an external storage device. The memory 71 is used for storing an operating system, an application program, a BootLoader (BootLoader), data, and other programs, such as program codes of the computer program. The memory 71 may also be used to temporarily store data that has been output or is to be output.
It should be noted that, for the information interaction, execution process, and other contents between the above-mentioned devices/units, the specific functions and technical effects thereof are based on the same concept as those of the embodiment of the method of the present application, and specific reference may be made to the part of the embodiment of the method, which is not described herein again.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps in the above-mentioned method embodiments.
The embodiments of the present application provide a computer program product, which, when the computer program product is in an access server, enables the access server to implement the steps in the above-mentioned method embodiments.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium and can implement the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include at least: any entity or device capable of carrying computer program code to a photographing apparatus/terminal apparatus, a recording medium, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), an electrical carrier signal, a telecommunications signal, and a software distribution medium. Such as a usb-disk, a removable hard disk, a magnetic or optical disk, etc. In certain jurisdictions, computer-readable media may not be an electrical carrier signal or a telecommunications signal in accordance with legislative and patent practice.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/network device and method may be implemented in other ways. For example, the above-described apparatus/network device embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implementing, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.