Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
Alternative embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
A first embodiment provided by the present disclosure is an embodiment of a method for managing a client.
The embodiment of the present disclosure is described in detail below with reference to fig. 1, where fig. 1 is a flowchart of a method for managing a client provided by the embodiment of the present disclosure.
Step S101, a first communication connection with a client is established.
The client, or called as the user end, refers to a process corresponding to the server end of the server for providing local services to the client. Running in the client. The client includes: desktop computers, notebook computers or mobile terminals.
The server side provides service for the client side, and the content of the service comprises providing resources for the client side and storing client side data. The server runs in the server.
The method is applied to the intermediate service between the client and the server and used for providing information communication for the client and the server.
And step S102, acquiring the unique registration identifier sent by the client based on the first communication connection.
The unique registration identification is globally unique information indicating the client identity of the running client. For example, the unique registration id is a string of numbers generated by a preset calculation rule of a MAC address (i.e., MAC address) and a device model of the client. In the prior art, there are many methods for calculating the unique value in the preset calculation rule, and the embodiments of the present disclosure are not described in detail here.
Step S103, determining whether the unique registration flag exists in the slave first mapping data set.
The data set is for holding information. May be a data table in a database, a text file, a configuration file, or a spreadsheet file. The embodiment of the present disclosure does not limit the application form of the data set.
And step S104, if yes, acquiring corresponding server communication information from the first mapping data set according to the unique registration identifier.
The server communication information comprises a server IP address related to the server.
That is, the first mapping data set stores the mapping relation information between the unique registration identifier of the client and the IP address of the server.
Retrieving the first mapping data set actually also plays a role in registering and authorizing the client, and only when the first mapping data set has a unique registration identifier, the client corresponding to the unique registration identifier can access the server of the server with a special function.
And step S105, establishing a second communication connection between the server side corresponding to the server and the client side according to the server side communication information.
The disclosed embodiment assigns different servers to the same client in each client, so that each client can access different servers to complete different tasks. For example, if a new function B is added to an a1 application server to become an a2 application server, or a new function C is added to an a1 application server to become an A3 application server, in order to test the new function B and the new function C without affecting the normal use of the original a1 application server, and to prevent the new function B and the new function C from interfering with each other during testing, three servers are required, a first server runs the a1 application server, a second server runs the a2 application server, and a third server runs the A3 application server; and dividing the clients into 2 test groups, and appointing the client of each client in the same group to carry out data communication with the server of the same server.
And step S106, if not, establishing a fifth communication connection between the server side of the corresponding server and the client side according to the preset server side communication information.
The preset server communication information may be default server communication information.
For example, continuing with the above example, the default server communication information is the communication information of the a1 application server of the first server, and when the unique registration id of the client does not exist in the first mapping data set, the client defaults to access the a1 application server of the first server.
In the embodiment of the disclosure, the server can be divided into a plurality of function groups according to different versions of the same application program service, and each client can access the designated server of the function group according to the server communication information in the first mapping data set, so that unified application management is performed on the clients and the servers of the same application program through unified intermediate service, the management is simpler and more efficient, a complex process of configuring an application environment for each client in actual application is reduced, and the working efficiency is improved.
The embodiment of the present disclosure provides four practical application scenarios for the above method.
Scene one
Optionally, the establishing a second communication connection between the server corresponding to the server and the client according to the server communication information includes the following steps:
and step S104-11, the server IP address is returned to the corresponding client so that the client can establish the second communication connection with the server of the corresponding server according to the server IP address.
The intermediate service of the application scene only plays the roles of information management and information distribution, after the IP address of the server is obtained, the IP address of the server is returned to the client initiating registration, and the client directly accesses the server side of the server pointed by the IP address of the server.
The client directly accesses the server of the server pointed by the server IP address, so that intermediate links are reduced, and the information transmission efficiency between the client and the server is improved.
Scene two
Optionally, the establishing a second communication connection between the server corresponding to the server and the client according to the server communication information includes the following steps:
and step S104-21, establishing a third communication connection with the server side of the corresponding server according to the IP address of the server so as to be used as a communication relay to form the second communication connection with the first communication connection and the third communication connection.
The intermediate service of the application scene not only plays the roles of information management and information distribution, but also serves as a communication relay to enable the first communication connection and the third communication connection to form a whole, namely the second communication connection, so that information is transmitted between the client and the server. The intermediate service is used as a communication relay to control the communication information between the client and the server. If a filtering function is added to the intermediate service, invalid information is filtered, and valid information (such as information needing to be tested) is transmitted, so that the working efficiency is improved.
The first communication connection of scenario one or scenario two may be a mobile network connection and/or a wired network connection.
Scene three
The client is applied to the mobile terminal.
The server communication information further comprises: mobile traffic type information.
The mobile traffic type information includes: a 2G communication type, a 3G communication type, a 4G communication type, or a 5G communication type.
Optionally, the obtaining of the server communication information of the corresponding server from the first mapping dataset according to the unique registration identifier includes the following steps:
and S104-31, acquiring the corresponding server IP address and the mobile flow type information from the first mapping data set according to the unique registration identifier.
Optionally, the establishing a second communication connection between the server corresponding to the server and the client according to the server communication information includes the following steps:
and step S104-32, returning the mobile flow type information and the server IP address to the client so that the client establishes a second communication connection with a server of a corresponding server according to the mobile flow type information and the server IP address.
That is, the client uses the mobile traffic associated with the mobile traffic type information to perform mobile communication with the server, and the client directly accesses the server to which the IP address of the server points. For example, the C1 client communicates with the server W using 2G communication; the C2 client communicates with the server W by 3G communication; the C3 client communicates with the server W by 3G communication; the C4 client communicates with the server W by adopting 4G communication; the C5 client communicates with the server W using 5G communication. Therefore, the use condition of the application program under various mobile traffic can be tested.
Scene four
The client is applied to the mobile terminal.
The server communication information further comprises: mobile traffic type information;
optionally, the obtaining of the server communication information of the corresponding server from the first mapping dataset according to the unique registration identifier includes the following steps:
and S104-41, acquiring the corresponding server IP address and the mobile flow type information from the first mapping data set according to the unique registration identifier.
Optionally, the establishing a second communication connection between the server corresponding to the server and the client according to the server communication information includes the following steps:
and step S104-42, establishing corresponding mobile flow connection with a corresponding server based on the mobile flow type information.
A mobile traffic connection, comprising: 2G communication connection, 3G communication connection, 4G communication connection or 5G communication connection.
And step S104-43, establishing a fourth communication connection with the server side of the corresponding server according to the mobile flow connection and the IP address of the server so as to be used as a communication relay to form the second communication connection with the first communication connection and the fourth communication connection.
The intermediate service performs unified control on the mobile traffic between the client and the server under the scene, and is beneficial to management and control of the mobile traffic.
In the embodiment of the disclosure, the server can be divided into a plurality of function groups according to different versions of the same application program service, and each client can access the server of the corresponding function group according to the designation of the first mapping data set, so that the unified application management is performed on the client and the server of the same application program through unified intermediate service, the management is simpler and more efficient, the tedious process of configuring an application environment for each client in actual application is reduced, and the working efficiency is improved.
Corresponding to the first embodiment provided by the present disclosure, the present disclosure also provides a second embodiment, that is, an apparatus for managing a client. Since the second embodiment is basically similar to the first embodiment, the description is simple, and the relevant portions should be referred to the corresponding description of the first embodiment. The device embodiments described below are merely illustrative.
Fig. 2 illustrates an embodiment of an apparatus for managing a client according to the present disclosure. Fig. 2 is a block diagram of elements of an apparatus for managing a client according to an embodiment of the present disclosure.
Referring to fig. 2, the present disclosure provides an apparatus for managing a client, including: a first communication connection establishing unit 201, an unique registration identification acquiring unit 202, a judging unit 203, a server communication information acquiring unit 204 and a second communication connection establishing unit 205.
A first communication connection establishing unit 201, configured to establish a first communication connection with a client;
an obtaining unique registration identifier unit 202, configured to obtain a unique registration identifier sent by a client based on the first communication connection;
a judging unit 203 for judging whether the unique registration identifier exists in the slave first mapping data set;
a server communication information obtaining unit 204, configured to obtain, if an output result of the determining unit is "yes," server communication information of a corresponding server from the first mapping dataset according to the unique registration identifier; the server communication information comprises a server IP address related to the server; and are
A second communication connection establishing unit 205, configured to establish a second communication connection between the server and the client of the corresponding server according to the server communication information.
Optionally, the establishing the second communication connection unit 205 includes:
and the first server side communication information returning subunit is used for returning the server IP address to the client side so as to facilitate the client side to establish the second communication connection with the server side of the corresponding server according to the server IP address.
Optionally, the establishing the second communication connection unit 205 includes:
and the third communication connection establishing subunit is used for establishing a third communication connection with the server side corresponding to the server according to the IP address of the server so as to be used as a communication relay to form the second communication connection with the first communication connection and the third communication connection.
Optionally, the client is applied to a mobile terminal; the server communication information further comprises: mobile traffic type information;
the unit 204 for obtaining the server communication information includes:
and the server communication information obtaining subunit is used for obtaining the corresponding server IP address and the mobile traffic type information from the first mapping data set according to the unique registration identifier.
Optionally, the establishing the second communication connection unit 205 includes:
and the second return server communication information subunit is used for returning the mobile traffic type information and the server IP address to the client so that the client establishes second communication connection with the server of the corresponding server according to the mobile traffic type information and the server IP address.
Optionally, the establishing the second communication connection unit 205 includes:
a mobile traffic connection establishing subunit, configured to establish a corresponding mobile traffic connection with a corresponding server based on the mobile traffic type information;
and the fourth communication connection establishing subunit is used for establishing fourth communication connection with the server side of the corresponding server according to the mobile flow connection and the IP address of the server so as to be used as a communication relay to form the second communication connection with the first communication connection and the fourth communication connection.
Optionally, in the apparatus, the apparatus further includes:
and the fifth communication connection establishing unit is used for establishing fifth communication connection between the server side of the corresponding server and the client side according to preset server side communication information if the output result of the judging unit is negative.
In the embodiment of the disclosure, the server can be divided into a plurality of function groups according to different versions of the same application program service, and each client can access the server of the corresponding function group according to the designation of the first mapping data set, so that the unified application management is performed on the client and the server of the same application program through unified intermediate service, the management is simpler and more efficient, the tedious process of configuring an application environment for each client in actual application is reduced, and the working efficiency is improved.
The third embodiment of the present disclosure provides an electronic device, where the electronic device is used in a method for managing a client, and the electronic device includes: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the one processor to cause the at least one processor to perform the method of managing clients as described in the first embodiment.
The disclosed embodiments provide a fourth embodiment, which is a computer storage medium for managing a client, the computer storage medium storing computer-executable instructions that can execute the method for managing a client as described in the first embodiment.
Referring now to FIG. 3, shown is a schematic diagram of an electronic device suitable for use in implementing embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 3 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 3, the electronic device may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 301 that may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)302 or a program loaded from a storage device 308 into a Random Access Memory (RAM) 303. In the RAM 303, various programs and data necessary for the operation of the electronic apparatus are also stored. The processing device 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input/output (I/O) interface 305 is also connected to bus 304.
Generally, the following devices may be connected to the I/O interface 305: input devices 306 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 307 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage devices 308 including, for example, magnetic tape, hard disk, etc.; and a communication device 309. The communication means 309 may allow the electronic device to communicate wirelessly or by wire with other devices to exchange data. While fig. 3 illustrates an electronic device having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication means 309, or installed from the storage means 308, or installed from the ROM 302. The computer program, when executed by the processing device 301, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText transfer protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of an element does not in some cases constitute a limitation on the element itself.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.