CN110035091A - Modify the method, apparatus and server of the session information in network information system - Google Patents

Modify the method, apparatus and server of the session information in network information system Download PDF

Info

Publication number
CN110035091A
CN110035091A CN201810026689.3A CN201810026689A CN110035091A CN 110035091 A CN110035091 A CN 110035091A CN 201810026689 A CN201810026689 A CN 201810026689A CN 110035091 A CN110035091 A CN 110035091A
Authority
CN
China
Prior art keywords
actual log
user identifier
target actual
user
session information
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
CN201810026689.3A
Other languages
Chinese (zh)
Other versions
CN110035091B (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.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital Technology 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 Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Priority to CN201810026689.3A priority Critical patent/CN110035091B/en
Publication of CN110035091A publication Critical patent/CN110035091A/en
Application granted granted Critical
Publication of CN110035091B publication Critical patent/CN110035091B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/142Managing session states for stateless protocols; Signalling session states; State transitions; Keeping-state mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/146Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding

Abstract

The embodiment of the invention provides the method, apparatus and network server of the session information in modification network information system, method includes: to obtain the first HTTP request of target actual log user identifier that target actual log user is sent by client, carrying target actual log user;Based on preset corresponding relationship, the corresponding first simulation login user mark of target actual log user identifier is determined;It determines the corresponding session information of target actual log user identifier, and the user identifier that will be stored in session information, is revised as the first simulation login user mark;First HTTP request is sent to network server, so that network server is generated the first HTTP and replied based on the first simulation login user mark stored in the first HTTP request and session information;And send the first HTTP and return back to client, corresponding interface is identified to show the first simulation login user.To realize the analog subscriber more easily in network information system.

Description

Modify the method, apparatus and server of the session information in network information system
Technical field
The present invention relates to Internet technical fields, more particularly to the session information in a kind of modification network information system Method, apparatus and server.
Background technique
In network (web) information system, since (Hyper Text Transport Protocol, hypertext pass HTTP Defeated agreement) agreement stateless feature, the network server in web information system can correspond to the user for logging in web information system Create session information, i.e. session, and in session information store login user user identifier;It is subsequent, when network service After device receives the HTTP request that the login user is sent by client, based on the user identifier stored in the session information with And HPPT request, it generates HPPT and replys, and be sent to client, client shows the user identifier stored in the session information Corresponding interface, so that the login user checks respective interface.
In web information system, often occur needing the scene of analog subscriber, i.e. the first user is modeled to second user and steps on The scene for recording web information system namely the first user are with the identity logs web information system of second user.Wherein, in above-mentioned field Jing Zhong, above-mentioned first user are properly termed as actual log user, and above-mentioned second user is properly termed as simulation login user.
Due to the stateless feature of above-mentioned http protocol, in the scene of existing analog subscriber, actual log user must be obtained The log-on messages such as the account for the simulation login user simulated needed for obtaining and password, nullify the account of oneself, log in simulate again and step on The account at family is employed, with can be to simulate the identity logs web information system of login user, to check the phase of simulation login user Close interface.Such as: above-mentioned scene be web information system operation stage scene, operation personnel receive user feedback about web After the problem of information system, which needs to simulate the user of above-mentioned feedback problem, thus with the use of above-mentioned feedback problem The identity logs web information system at family gets the related interfaces data of the user of above-mentioned feedback problem, and then determines user institute The problem of web information system of feedback, and determine corresponding solution.
As it can be seen that the scene of existing analog subscriber, when analog subscriber, is inconvenient.
Summary of the invention
The embodiment of the present invention is designed to provide a kind of method, apparatus for modifying the session information in network information system And server, to realize the analog subscriber more easily in network information system.Specific technical solution is as follows:
On the one hand, described the embodiment of the invention provides a kind of method of the session information in modification network information system Method includes:
It obtains target actual log user and passes through the first HTTP request that client is sent to network server, wherein institute State the target actual log user identifier that the first HTTP request carries the target actual log user;
Based on preset corresponding relationship, determines that corresponding first simulation of the target actual log user identifier logs in and use Family mark, wherein the preset corresponding relationship are as follows: the user identifier of actual log user and the user of simulation login user mark The corresponding relationship of knowledge;
It determines the corresponding session information of the target actual log user identifier, and will be stored in the session information User identifier is revised as the first simulation login user mark;
First HTTP request is sent to the network server, so that the network server is based on described first The the first simulation login user mark stored in HTTP request and the session information, generates the first HTTP and replys;Concurrently It send the first HTTP to return back to the client, identifies corresponding interface to show the first simulation login user.
Optionally, it is based on preset corresponding relationship described, determines that the target actual log user identifier is corresponding Before the step of first simulation login user mark, the method also includes:
Judge in preset corresponding relationship, if there is the corresponding relationship comprising the target actual log user identifier;
When the corresponding relationship for judging to have comprising the target actual log user identifier in the preset corresponding relationship When, execution is described to be based on preset corresponding relationship, determines that corresponding first simulation of the target actual log user identifier is stepped on The step of recording user identifier.
Optionally, the method also includes:
When judging in the preset corresponding relationship, closed there is no corresponding comprising the target actual log user identifier When being, first HTTP request is sent to the network server, so that the network server is based on described first The user identifier stored in HTTP request and the session information generates the 2nd HTTP and replys;And send described second HTTP returns back to the client, to show the corresponding interface of user identifier stored in the session information.
Optionally, it is based on preset corresponding relationship described, determines that the target actual log user identifier is corresponding Before the step of first simulation login user mark, the method also includes:
Judge whether session information modification function opens, wherein the session information modifies function are as follows: allow actual log User modifies the function of corresponding session information according to actual log user identifier and the corresponding relationship prestored;
When judging that the session information modification function is opened, execution is described to be based on preset corresponding relationship, determines institute State the step of corresponding first simulation login user of target actual log user identifier identifies.
Optionally, after described the step of first HTTP request obtained is sent to the network server, institute State method further include:
The modification received for the target actual log user identifier instructs, wherein includes the in modification instruction Two simulation login user marks;
By in the preset corresponding relationship, the target actual log user identifier corresponding described first simulates login User identifier is revised as the second simulation login user mark;
Obtain the 2nd HTTP that the target actual log user is sent by the client to the network server Request, wherein second HTTP request carries the target actual log user identifier;
Based on preset corresponding relationship, determine that corresponding second simulation of the target actual log user identifier is stepped on Record user identifier;
It determines the corresponding session information of the target actual log user identifier, and will be stored in the session information First simulation login user mark is revised as the second simulation login user mark;
Second HTTP request is sent to the network server, so that the network server is based on described second The the second simulation login user mark stored in HTTP request and the session information, generates the 3rd HTTP and replys;Concurrently It send the 3rd HTTP to return back to the client, identifies corresponding interface to show second analog subscriber.
Optionally, it is based on preset corresponding relationship described, determines that the target actual log user identifier is corresponding Before the step of target simulation login user identifies, the method also includes:
Based on the target actual log user identifier, judges whether the target actual log user is in and logged in shape State;
When judging that the target actual log user is in logging state, execute described based on preset corresponding pass System determines the step of corresponding target simulation login user of the target actual log user identifier identifies.
Optionally, the method also includes:
It is not logged in state when judging that the target actual log user is in, first HTTP request is sent to described Network server, so that the session information of the corresponding target actual log user identifier of network server creation;By institute Target actual log user identifier is stated, is stored in created session information;Based on first HTTP request and created The target actual log user identifier stored in the session information built generates the 4th HTTP and replys;Send the described 4th HTTP returns back to the client, to show the corresponding interface of the target actual log user identifier.
On the other hand, the embodiment of the invention provides a kind of device of the session information in modification network information system, institutes Stating device includes:
First obtains module, first sent by client to network server for obtaining target actual log user HTTP request, wherein first HTTP request carries the target actual log user identifier of the target actual log user;
First determining module determines the target actual log user identifier pair for being based on preset corresponding relationship The the first simulation login user mark answered, wherein the preset corresponding relationship are as follows: the user identifier and mould of actual log user The corresponding relationship of the user identifier of quasi- login user;
First determines modified module, for determining the corresponding session information of the target actual log user identifier, and will The user identifier stored in the session information is revised as the first simulation login user mark;;
First sending module, for first HTTP request to be sent to the network server, so that the network Server is generated based on the first simulation login user mark stored in first HTTP request and the session information First HTTP is replied;And send the first HTTP and return back to the client, to show the first simulation login user mark Know corresponding interface.
Optionally, described device further includes first judgment module,
The first judgment module determines the target actual log for being based on preset corresponding relationship described Before the corresponding first simulation login user mark of user identifier, judge in preset corresponding relationship, if exist comprising described The corresponding relationship of target actual log user identifier;
When the corresponding relationship for judging to have comprising the target actual log user identifier in the preset corresponding relationship When, trigger first determining module.
Optionally, described device further includes the second sending module;
Second sending module includes that the target is real for being not present when judging in the preset corresponding relationship When the corresponding relationship of border login user mark, first HTTP request is sent to the network server, so that the net Network server is generated the 2nd HTTP and is returned based on the user identifier stored in first HTTP request and the session information It is multiple;And send the 2nd HTTP and return back to the client, to show the user identifier pair stored in the session information The interface answered.
Optionally, described device further includes the second judgment module;
Second judgment module determines the target actual log for being based on preset corresponding relationship described Before the corresponding first simulation login user mark of user identifier, judge whether session information modification function opens, wherein described Session information modifies function are as follows: allows actual log user according to actual log user identifier and the corresponding relationship prestored, looks into See that corresponding simulation login user identifies the function at corresponding interface;
When judging that the session information modification function is opened, first determining module is triggered.
Optionally, described device further includes receiving module, modified module, the second acquisition module, the second determining module, second Determine modified module, third sending module;
The receiving module, for it is described by the first HTTP request obtained be sent to the network server it Afterwards, the modification received for the target actual log user identifier instructs, wherein includes the second simulation in the modification instruction Login user mark;
The modified module, for by the preset corresponding relationship, the target actual log user identifier to be corresponding It is described first simulation login user mark, be revised as it is described second simulation login user mark;
Described second obtains module, for obtaining the target actual log user by the client to the network The second HTTP request that server is sent, wherein second HTTP request carries the target actual log user identifier;
Second determining module determines the target actual log user mark for being based on preset corresponding relationship Know the corresponding second simulation login user mark;
Described second determines modified module, for determining the corresponding session information of the target actual log user identifier, And by the stored in the session information first simulation login user mark, it is revised as the second simulation login user mark Know;
The third sending module, for second HTTP request to be sent to the network server, so that described Network server is identified based on the second simulation login user stored in second HTTP request and the session information, Generate the 3rd HTTP reply;And send the 3rd HTTP and return back to the client, to show the second analog subscriber mark Know corresponding interface.
Optionally, described device further includes third judgment module;
The third judgment module determines the target actual log for being based on preset corresponding relationship described Before user identifier corresponding target simulation login user mark, it is based on the target actual log user identifier, described in judgement Whether target actual log user is in logging state;
When judging that the target actual log user is in logging state, first determining module is triggered.
Optionally, described device further includes the 4th sending module;
4th sending module judges that the target actual log user, will be described in state is not logged in for working as First HTTP request is sent to the network server, so that the corresponding target actual log of network server creation is used The session information of family mark;The target actual log user identifier is stored in created session information;Based on described The target actual log user identifier stored in first HTTP request and the session information created generates the 4th HTTP It replys;It sends the 4th HTTP and returns back to the client, to show the corresponding boundary of the target actual log user identifier Face.
On the other hand, the embodiment of the invention provides a kind of network servers, including processor, communication interface, memory And communication bus, wherein processor, communication interface, memory complete mutual communication by communication bus;
Communication interface, for being communicated with client;
Memory, for storing computer program;
Processor when for executing the computer program stored on memory, is realized provided by the embodiment of the present invention The method and step of session information in any of the above-described modification network information system.
On the other hand, the embodiment of the invention provides a kind of computer readable storage mediums, which is characterized in that the calculating Computer program is stored in machine readable storage medium storing program for executing, the computer program realizes the embodiment of the present invention when being executed by processor The method and step of session information in provided any of the above-described modification network information system.
The embodiment of the present invention obtains target actual log user and passes through the first HTTP that client is sent to network server (Hyper Text Transport Protocol, hypertext transfer protocol) request, wherein the first HTTP request carries target The target actual log user identifier of actual log user;Based on preset corresponding relationship, target actual log user is determined Identify it is corresponding first simulation login user mark, wherein preset corresponding relationship are as follows: the user identifier of actual log user with Simulate the corresponding relationship of the user identifier of login user;Determine the corresponding session information of target actual log user identifier, and will The user identifier stored in session information is revised as the first simulation login user mark;First HTTP request is sent to net Network server, so that network server is based on the first simulation login user stored in the first HTTP request and session information Mark generates the first HTTP and replys;And send the first HTTP and return back to client, to show the first simulation login user mark pair The interface answered.
In the embodiment of the present invention, when acquisition target actual log user passes through first that client is sent to network server When HTTP request, the target actual log user mark of target actual log user based on the corresponding relationship prestored, can be determined The the first simulation login user mark for knowing corresponding first simulation login user, in turn, by marking target actual log user Know the user identifier stored in corresponding session information, the first simulation login user mark is revised as, so that network service Device can be generated and be corresponded to based on the first simulation login user mark stored in above-mentioned first HTTP request and session information First HTTP of the first simulation login user mark is replied, and is concurrently served and is stated after the first HTTP returns back to client, client can Corresponding interface is identified to show the first simulation login user, i.e. target actual log user can simulate above-mentioned first simulation and step on Family is employed, the interface of above-mentioned first simulation login user is viewed.To realize the analog subscriber in network information system.The present invention By the user identifier stored in the corresponding session information of modification target actual log user identifier in embodiment, so that target is real Border login user can check the interface of the first simulation login user, simulation with the above-mentioned first simulation login user of automatic imitation User procedures are convenient, and only need the first of the first simulation login user to simulate login user mark, so that believing in network Analog subscriber is more convenient in breath system.Certainly, implement any of the products of the present invention or method must be not necessarily required to reach simultaneously with Upper all advantages.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Fig. 1 is a kind of process for the method for modifying the session information in network information system provided by the embodiment of the present invention Schematic diagram;
Fig. 2 is a kind of storage schematic diagram of preset corresponding relationship;
Fig. 3 is another for a kind of method for modifying the session information in network information system provided by the embodiment of the present invention Flow diagram;
Fig. 4 is another for a kind of method for modifying the session information in network information system provided by the embodiment of the present invention Flow diagram;
Fig. 5 is another for a kind of method for modifying the session information in network information system provided by the embodiment of the present invention Flow diagram;
Fig. 6 is another for a kind of method for modifying the session information in network information system provided by the embodiment of the present invention Flow diagram;
Fig. 7 is a kind of structure for the device for modifying the session information in network information system provided by the embodiment of the present invention Schematic diagram;
Fig. 8 is a kind of structural schematic diagram of network server provided by the embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
The embodiment of the present invention is designed to provide a kind of method, apparatus for modifying the session information in network information system And network server, to realize the analog subscriber more easily in network information system.
As shown in Figure 1, the embodiment of the invention provides a kind of method of the session information in modification network information system, it can To include the following steps:
S101: obtaining target actual log user and pass through the first HTTP request that client is sent to network server, In, the first HTTP request carries the target actual log user identifier of target actual log user;
In one implementation, the session information in modification network information system provided by the embodiment of the present invention is realized Method functional software, can exist in the form of plug-in unit.In oneainstance, above-mentioned plug-in unit can be installed on network service In device.Above-mentioned network server can be any electronic equipment that can be communicated with client, which can be Computer, mobile phone etc..
In a kind of situation, the interface that above-mentioned plug-in unit can be attached with the above-mentioned network server of real-time detection and client, When above-mentioned interface obtains the HTTP request that target actual log user is sent by client to network server, above-mentioned plug-in unit Above-mentioned HTTP request is obtained, as the first HTTP request, and executes the process of subsequent analog subscriber.
Wherein, above-mentioned target actual log user can be any user registered in above-mentioned network server.It can be with Understand, above-mentioned client and network server are present in consolidated network information system, can in above-mentioned network information system With there are at least one client, target actual log user can be by any client of network information system, to the net The network server of network information system sends HTTP request.
In one implementation, above-mentioned target actual log user identifier can be with are as follows: target actual log user is upper The account etc. in network information system is stated, it can be with the information of the above-mentioned target actual log user of unique identification.
S102: being based on preset corresponding relationship, determines that corresponding first simulation of target actual log user identifier logs in User identifier, wherein preset corresponding relationship are as follows: the user identifier of actual log user and the user identifier of simulation login user Corresponding relationship;
It in the embodiment of the present invention, may include in above-mentioned preset corresponding relationship: user's mark of multipair actual log user Know the corresponding relationship with the user identifier of simulation login user, such as: the user identifier of actual log user A and simulation are logged in and are used The user identifier of family B, the user identifier of actual log user C and the user identifier, etc. of simulation login user D.
It is understood that the actual log user and simulation login user being previously mentioned are opposite in the embodiment of the present invention For.Such as: when user 1 needs analog subscriber 2 to log in above-mentioned network server, to check user in above-mentioned network server When 2 interface, can deserve to be called and state user 1 is actual log user, states user 2 correspondingly, can deserve to be called as simulation login user.
After above-mentioned plug-in unit obtains above-mentioned first HTTP request, the target that can be carried based on above-mentioned first HTTP request is practical Login user mark, inquires preset corresponding relationship;From above-mentioned preset corresponding relationship, determine that target actual log user marks Know corresponding first simulation login user mark.
In one implementation, above-mentioned preset corresponding relationship can store local in above-mentioned network server, can also To be stored in the storage equipment connecting with above-mentioned network server, this is all possible.In general, can be deposited using persistence The mode of storage stores above-mentioned preset corresponding relationship.Wherein, above-mentioned persistent storage, which can refer to, stores data into and can permanently protect In the storage equipment deposited.For example, in the database by above-mentioned preset corresponding relationship storage, and/or be stored in configuration file, Etc., this is all possible.As shown in Fig. 2, being a kind of storage schematic diagram of preset corresponding relationship, wherein shown in Fig. 2 " mockusers " can identify preset corresponding relationship when analog subscriber, and " login_user " shown in Fig. 2 can be identified Actual log user in preset corresponding relationship, " mock_user " shown in Fig. 2 can be identified in preset corresponding relationship Simulation login user.
S103: the corresponding session information of target actual log user identifier, and the use that will be stored in session information are determined Family mark is revised as the first simulation login user mark;
It is understood that there is no the spy of memory capability to issued transaction due to the stateless feature of http protocol Point, when user passes through client logging in network server, network server needs to correspond to each login user creation one Session corresponds to each login user and creates a session information, and in the session information, store corresponding login user User identifier, wherein the corresponding session of each login user.Pass through client when network server receives login user When the HTTP request of transmission, can based on store in session information corresponding to received HTTP request and the login user The user identifier of login user generates HTTP and replys, and HTTP reply is sent to client, shows the login with client and uses The interface at family.Wherein, above-mentioned login user can characterize the user of logging in network server.
Above-mentioned plug-in unit obtains the first HTTP request for carrying target actual log user identifier, and based on preset corresponding pass System can continue to determine the target after determining the corresponding first simulation login user mark of target actual log user identifier The corresponding session information of actual log user identifier, i.e. session, and the user identifier that will be stored in the session, modification It is identified for the first simulation login user, and executes subsequent session information modification process.
S104: being sent to network server for the first HTTP request so that network server be based on the first HTTP request with And the first simulation login user mark stored in session information, it generates the first HTTP and replys;And it sends the first HTTP and replys To client, corresponding interface is identified to show the first simulation login user.
It is understood that in oneainstance, the form of above-mentioned one plug-in unit of plug-in unit is installed in above-mentioned network server, Above-mentioned first HTTP request is sent to the sending method of network server, is that the inside of network server is sent.Specifically, can be with Are as follows: above-mentioned first HTTP request is sent to the HTTP processing module of network server by above-mentioned plug-in unit with internal sending method, on Network server is stated by above-mentioned HTTP processing module, based on the first mould stored in the first HTTP request and session information Quasi- login user mark, generates the first HTTP and replys;And it sends the first HTTP and returns back to client.
In the embodiment of the present invention, above-mentioned plug-in unit will be stored in the corresponding session information of target actual log user identifier User identifier by the first HTTP request in such a way that inside is sent, is sent to after being revised as the first simulation login user mark Network server.At this point, above-mentioned network server is based on target actual log user mark entrained in first HTTP request Know, determines the corresponding session information of above-mentioned target actual log user identifier;And based on the use stored in the session information Family mark generates the first HTTP and replys.It is understood that the user identifier stored in the session information is that the first simulation is stepped on User identifier is recorded, above-mentioned network server the first HTTP generated is replied are as follows: based on above-mentioned first simulation login user mark It generates.Above-mentioned network server sends the first HTTP and returns back to client, and above-mentioned client shows the first simulation login user Identify corresponding interface.To realize that the virtual login user of target actual log user's simulated target logs in above-mentioned network server.
In one implementation, above-mentioned WEB information system is during operation, in order to guarantee that WEB information system can The demand of user is better met, the developer of above-mentioned WEB information system can correspond to the WEB information system and open up problem feedback canal Road, such as: when the user of above-mentioned WEB information system is by client, the network server of above-mentioned WEB information system is logged in, After logging in above-mentioned WEB information system, there are problems for discovery WEB information system, at this point, above-mentioned user can believe to above-mentioned WEB The operation personnel of breath system feeds back the problem of it is found.Above-mentioned operation personnel is in order to check that above-mentioned user fed back specifically asks Topic, determines solution etc. even for the particular problem, needs to simulate the network that above-mentioned user logs in above-mentioned WEB information system Server is needed with the above-mentioned WEB information system of the identity logs of above-mentioned user.
At this point, above-mentioned operation personnel in advance in above-mentioned preset corresponding relationship, can be arranged itself user identifier with The corresponding relationship of the user identifier of above-mentioned user.Subsequent, above-mentioned operation personnel is by client, based on the user identifier of itself Above-mentioned network server is logged in, above-mentioned network server corresponds to the user identifier creation session information of above-mentioned operation personnel, and will The user identifier of above-mentioned operation personnel is stored in above-mentioned session information;When above-mentioned operation personnel passes through client again to network When server sends HTTP request, above-mentioned plug-in unit obtains above-mentioned HTTP request, and based on preset corresponding relationship, determines above-mentioned The user identifier of the corresponding above-mentioned user of the user identifier of operation personnel;In turn, the user identifier of corresponding operation personnel is created Session information in the user identifier that stores, be revised as the user identifier of above-mentioned user;So that network server can be with base The user identifier of the above-mentioned user stored in above-mentioned HTTP request and above-mentioned session information generates HTTP and replys, and sends To client, so that above-mentioned operation personnel can be by checking the respective interface of above-mentioned user, and check that above-mentioned user institute is anti- The particular problem of feedback, and then solution can be determined for the particular problem.
The method of session information in provided modification network information system through the embodiment of the present invention, is realized to mesh The modification of the user identifier stored in the corresponding session information of mark actual log user realizes that target actual log is used in turn Other users are simulated at family, i.e., during simulation login user logs in above-mentioned WEB information system, above-mentioned target actual log user The privacy informations such as password that WEB information system is logged in without obtaining above-mentioned simulation login user, so that analog subscriber process is more just It is prompt.
In one implementation, above-mentioned plug-in unit can be realized based on the framework for the WEB frame for realizing WEB information system, For example, above-mentioned plug-in unit can pass through WEB frame when above-mentioned WEB information system is the WEB frame strut2 based on java language Blocker in strut2 is realized;For another example: when above-mentioned WEB information system is the WEB frame django based on python language When, above-mentioned plug-in unit can be realized by the middleware in WEB frame django.This is all possible.
In the embodiment of the present invention, when acquisition target actual log user passes through first that client is sent to network server When HTTP request, the target actual log user mark of target actual log user based on the corresponding relationship prestored, can be determined The the first simulation login user mark for knowing corresponding first simulation login user, in turn, by marking target actual log user Know the user identifier stored in corresponding session information, the first simulation login user mark is revised as, so that network service Device can be generated and be corresponded to based on the first simulation login user mark stored in above-mentioned first HTTP request and session information First HTTP of the first simulation login user mark is replied, and is concurrently served and is stated after the first HTTP returns back to client, client can Corresponding interface is identified to show the first simulation login user, i.e. target actual log user can simulate above-mentioned first simulation and step on Family is employed, the interface of above-mentioned first simulation login user is viewed.To realize the analog subscriber in network information system.The present invention By the user identifier stored in the corresponding session information of modification target actual log user identifier in embodiment, so that target is real Border login user can check the interface of the first simulation login user, simulation with the above-mentioned first simulation login user of automatic imitation User procedures are convenient, and only need the first of the first simulation login user to simulate login user mark, so that believing in network Analog subscriber is more convenient in breath system.
In one implementation, in order to preferably ensure above-mentioned WEB information system user information security, the present invention Embodiment, needs to limit which user can conversate information modification process, is only authorized to the information that can conversate and repairs Change the user of process, can just conversate information modification process.Specifically, as shown in figure 3, the method may include steps:
S301: obtaining target actual log user and pass through the first HTTP request that client is sent to network server, In, the first HTTP request carries the target actual log user identifier of target actual log user;
Wherein, above-mentioned S301 is identical as S101 shown in FIG. 1.
S302: judge in preset corresponding relationship, if there is the corresponding relationship comprising target actual log user identifier; When judging to have the corresponding relationship comprising target actual log user identifier in preset corresponding relationship, S303 is executed;
S303: being based on preset corresponding relationship, determines that corresponding first simulation of target actual log user identifier logs in User identifier, wherein preset corresponding relationship are as follows: the user identifier of actual log user and the user identifier of simulation login user Corresponding relationship;
S304: the corresponding session information of target actual log user identifier, and the use that will be stored in session information are determined Family mark is revised as the first simulation login user mark;
S305: being sent to network server for the first HTTP request so that network server be based on the first HTTP request with And the first simulation login user mark stored in session information, it generates the first HTTP and replys;And it sends the first HTTP and replys To client, corresponding interface is identified to show the first simulation login user.
Wherein, above-mentioned S303 is identical as S102 shown in FIG. 1, and above-mentioned S304 is identical as S103 shown in FIG. 1, S305 and figure S104 shown in 1 is identical.
In the embodiment of the present invention, in order to ensure above-mentioned WEB information system user information security, only specific user can To execute session information modification process provided by the embodiment of the present invention, i.e., target actual log user mark is carried when plug-in unit obtains After the first HTTP request known, need to judge in preset corresponding relationship, if exist comprising above-mentioned target actual log user The corresponding relationship of mark, only when judging in preset corresponding relationship exist comprising above-mentioned target actual log user identifier When corresponding relationship, the corresponding target actual log user of the target actual log user identifier could execute session information modification stream Journey.
In one implementation, when above-mentioned plug-in unit judges in preset corresponding relationship, there is no real comprising above-mentioned target When the corresponding relationship of border login user mark, the first HTTP request directly can be sent to network server by above-mentioned plug-in unit, with Execute corresponding process.Specifically, as shown in Fig. 2, the method can also include:
S306: when judging in preset corresponding relationship, there is no the corresponding relationships comprising target actual log user identifier When, the first HTTP request is sent to network server, so that network server is based on the first HTTP request and session information Middle stored user identifier generates the 2nd HTTP and replys;And send the 2nd HTTP and return back to client, to show session information The corresponding interface of middle stored user identifier.
In one implementation, user may not want that the corresponding session information of user identifier for corresponding to itself is repaired Change, and then analog subscriber, in order to preferably guarantee the demand of user, improves user experience.In the embodiment of the present invention, it can be directed to Above-mentioned session information modification process setting session information modifies functional switch.Specifically, as shown in figure 4, the method can wrap Include step:
S401: obtaining target actual log user and pass through the first HTTP request that client is sent to network server, In, the first HTTP request carries the target actual log user identifier of target actual log user;
Wherein, above-mentioned S401 is identical as S101 shown in FIG. 1.
S402: judge whether session information modification function opens, wherein the session information modifies function are as follows: allow practical Login user modifies the function of corresponding session information according to actual log user identifier and the corresponding relationship prestored;When sentencing When disconnected session information modification function is opened, S403 is executed;
S403: being based on preset corresponding relationship, determines that corresponding first simulation of target actual log user identifier logs in User identifier, wherein preset corresponding relationship are as follows: the user identifier of actual log user and the user identifier of simulation login user Corresponding relationship;
S404: the corresponding session information of target actual log user identifier, and the use that will be stored in session information are determined Family mark is revised as the first simulation login user mark;
S405: being sent to network server for the first HTTP request so that network server be based on the first HTTP request with And the first simulation login user mark stored in session information, it generates the first HTTP and replys;And it sends the first HTTP and replys To client, corresponding interface is identified to show the first simulation login user.
Wherein, above-mentioned S403 is identical as S102 shown in FIG. 1, and above-mentioned S404 is identical as S103 shown in FIG. 1, S405 and figure S404 shown in 1 is identical.
In the embodiment of the present invention, it can be opened by modifying function setting session information modification function for above-mentioned session information It closes, when above-mentioned plug-in unit obtains the first HTTP request for carrying target actual log user identifier, needs to first determine whether above-mentioned meeting Whether words information modification function opens, i.e., whether above-mentioned session information modification functional switch is in the open state;As long as when above-mentioned When session information modification functional switch is in the open state, above-mentioned plug-in unit executes subsequent session information modification process.By setting The session information modification functional switch opened or closed that can control above-mentioned session information modification function is set, can satisfy user To the selection demand of above-mentioned session information modification function, and the load of above-mentioned electronic equipment can be mitigated.
It is understood that above-mentioned target actual log user both can be with when above-mentioned session information modification function is opened Analog subscriber logs in WEB information system.In oneainstance, above-mentioned session information modification function is referred to as analog subscriber function Energy.
In one implementation, when above-mentioned plug-in unit judges that above-mentioned session information modification function is opened, can sentence first Break in preset corresponding relationship, if preset when judging when there is the corresponding relationship comprising target actual log user identifier In corresponding relationship, when there is the corresponding relationship comprising target actual log user identifier, continues to execute subsequent session information and repair Change process.While meeting selection demand of the user to above-mentioned session information modification function, above-mentioned WEB information is preferably ensured The information security of the user of system.
In oneainstance, in WEB information system, it is understood that there may be user needs the case where simulating multiple other users. For example, tester needs for the difference in above-mentioned WEB information system in the stage tested WEB information system Role creates corresponding user;Also, above-mentioned tester needs to log in respectively using the identity of above-mentioned different user above-mentioned WEB information system, to test the corresponding function of different role etc. in above-mentioned WEB information system.For example, above-mentioned WEB Information system is shopping class WEB information system, may include the roles such as buyer and seller in class WEB information system of doing shopping, right When above-mentioned shopping class WEB information system is tested, tester needs to simulate the roles such as above-mentioned buyer and seller difference respectively Corresponding user, in above-mentioned shopping class WEB information system buyer and the corresponding function of roles such as seller etc. carry out Test.
For example, tester, which needs first to simulate seller user, logs in above-mentioned shopping class WEB information system, seller user is tested Whether being capable of publishing commodity;Subsequent, tester also needs to simulate seller user and logs in above-mentioned shopping class WEB information system, To check commodity that whether buyer user can check that seller user is issued.
In order to which the user for meeting above-mentioned needs to simulate the demand of multiple other users, in the embodiment of the present invention, such as Fig. 5 institute Show, after above-mentioned the step of first HTTP request is sent to network server, the method can also include:
S501: the modification received for target actual log user identifier instructs, wherein includes the second mould in modification instruction Quasi- login user mark;
S502: by preset corresponding relationship, target actual log user identifier corresponding first simulates login user mark Know, is revised as the second simulation login user mark;
S503: obtaining target actual log user and pass through the second HTTP request that client is sent to network server, In, the second HTTP request carries target actual log user identifier;
S504: being based on preset corresponding relationship, determines that corresponding second simulation of target actual log user identifier logs in User identifier;
S505: the corresponding session information of target actual log user identifier, and will stored in session information are determined One simulation login user mark, is revised as the second simulation login user mark;
S506: being sent to network server for the second HTTP request so that network server be based on the second HTTP request with And the second simulation login user mark stored in session information, it generates the 3rd HTTP and replys;And it sends the 3rd HTTP and replys To client, corresponding interface is identified to show the second analog subscriber.
In one implementation, when there are multiple users for needing to be modeled, that is, there are multiple simulation login users When, the corresponding user identifier of above-mentioned multiple simulation login users can be stored in presetting database.In addition, for the ease of pipe The corresponding user identifier of above-mentioned simulation login user is managed, i.e. simulation login user mark, can be to log in for above-mentioned simulation and use Family mark, is arranged an administration page, is managed with unified to above-mentioned simulation login user mark.
In oneainstance, target actual log user, which simulates, completes the first simulation login user, and it is related to execute completion After operation, need to simulate another simulation login user.At this point, administrative staff can be triggered manually for target actual log user The modification of mark instructs, and plug-in unit receives above-mentioned modification instruction, wherein logs in above-mentioned modification instruction comprising institute's simulation to be simulated The user identifier of user, as the second simulation login user mark;Above-mentioned plug-in unit is stepped in preset corresponding relationship, target is practical The corresponding first simulation login user mark of user identifier is recorded, is revised as the second simulation login user mark, i.e., by target reality Login user mark is stored in above-mentioned preset corresponding relationship with the second simulation login user mark;It is subsequent, when target reality When border login user retransmits HTTP request to network server by client, above-mentioned plug-in unit obtains above-mentioned HTTP request, makees For the second HTTP request, and it is based on preset corresponding relationship, determines above-mentioned target actual log user identifier corresponding second Login user mark is simulated, and the first simulation that the corresponding session information of above-mentioned target actual log user identifier is stored is stepped on User identifier is recorded, the second simulation login user mark is revised as;Then, the second HTTP request is sent to network clothes by above-mentioned plug-in unit Business device, and then server generates third based on the second simulation login user mark that the second HTTP request and session information are stored HTTP is replied, and is sent to client.
It in the embodiment of the present invention, is instructed by modification, can directly modify the corresponding simulation of actual log user identifier and step on User identifier is recorded, avoids user that from could can only logging in again after the user for nullifying present day analog and simulate another user's Situation reduces under the scene for needing to simulate multiple simulation login users, simulates the time loss of multiple users, Yi Jicao Make.
In one implementation, as shown in fig. 6, the method may include steps:
S601: obtaining target actual log user and pass through the first HTTP request that client is sent to network server, In, the first HTTP request carries the target actual log user identifier of target actual log user;
Wherein, above-mentioned S601 is identical as S101 shown in FIG. 1.
S602: it is based on the target actual log user identifier, judges whether the target actual log user is in Logging state;When judging that target actual log user is in logging state, S603 is executed;
S603: being based on preset corresponding relationship, determines that corresponding first simulation of target actual log user identifier logs in User identifier, wherein preset corresponding relationship are as follows: the user identifier of actual log user and the user identifier of simulation login user Corresponding relationship;
S604: the corresponding session information of target actual log user identifier, and the use that will be stored in session information are determined Family mark is revised as the first simulation login user mark;
S605: being sent to network server for the first HTTP request so that network server be based on the first HTTP request with And the first simulation login user mark stored in session information, it generates the first HTTP and replys;And it sends the first HTTP and replys To client, corresponding interface is identified to show the first simulation login user.
Wherein, above-mentioned S603 is identical as S102 shown in FIG. 1, and above-mentioned S604 is identical as S103 shown in FIG. 1, S605 and figure S104 shown in 1 is identical.
It is understood that above-mentioned WEB information system can be in presumptive area memory when user logs in WEB information system The user identifier for storing up login user, after above-mentioned plug-in unit obtains the first HTTP request for carrying target actual log user identifier, Above-mentioned presumptive area can be inquired, is determined with the presence or absence of above-mentioned target actual log user identifier in above-mentioned presumptive area, when true There are when above-mentioned target actual log user identifier in fixed above-mentioned presumptive area, above-mentioned plug-in unit determines that above-mentioned target actual log is used Family is in logging state;It is above-mentioned to insert when determining in above-mentioned presumptive area there is no above-mentioned target actual log user identifier Part determines that above-mentioned target actual log user is in and is not logged in state.In one implementation, as the WEB of WEB information system When frame is the frame based on Java language, above-mentioned presumptive area can be for javax.servlet.http.HttpSession's Instance objects.When the WEB frame of WEB information system is the Django frame based on Python, above-mentioned presumptive area can Think request.session.
In one implementation, it when judging that target actual log user is in logging state, can also continue to sentence Whether above-mentioned session information modification function of breaking opens, and when judging that above-mentioned session information modification function is opened, it is pre- to continue judgement If corresponding relationship in, if there is the corresponding relationship comprising target actual log user identifier, judging preset corresponding close In system, when there is the corresponding relationship comprising target actual log user identifier, subsequent session information modification process is continued to execute.
In one implementation, when above-mentioned plug-in unit judge target actual log user be in be not logged in state when, it is above-mentioned First HTTP request directly can be sent to network server by plug-in unit, to execute corresponding process.Specifically, as shown in fig. 6, institute The method of stating can also include:
S606: it is not logged in state when judging that target actual log user is in, the first HTTP request is sent to network clothes Business device, so that network server creates the session information of corresponding target actual log user identifier;By target actual log user Mark, is stored in created session information;Based on the mesh stored in the first HTTP request and the session information created Actual log user identifier is marked, the 4th HTTP is generated and replys;It sends the 4th HTTP and returns back to client, target is practical to step on to show Record the corresponding interface of user identifier.
Corresponding to above method embodiment, the embodiment of the invention provides the session letters in a kind of modification network information system The device of breath, as shown in fig. 7, described device includes:
First obtains module 710, passes through what client was sent to network server for obtaining target actual log user First HTTP request, wherein first HTTP request carries the target actual log user of the target actual log user Mark;
First determining module 720 determines the target actual log user identifier for being based on preset corresponding relationship It is corresponding first simulation login user mark, wherein the preset corresponding relationship are as follows: the user identifier of actual log user with Simulate the corresponding relationship of the user identifier of login user;
First determines modified module 730, for determining the corresponding session information of the target actual log user identifier, and The user identifier that will be stored in the session information is revised as the first simulation login user mark;;
First sending module 740, for first HTTP request to be sent to the network server, so that the net Network server is raw based on the first simulation login user mark stored in first HTTP request and the session information It is replied at the first HTTP;And send the first HTTP and return back to the client, to show the first simulation login user Identify corresponding interface.
In the embodiment of the present invention, when acquisition target actual log user passes through first that client is sent to network server When HTTP request, the target actual log user mark of target actual log user based on the corresponding relationship prestored, can be determined The the first simulation login user mark for knowing corresponding first simulation login user, in turn, by marking target actual log user Know the user identifier stored in corresponding session information, the first simulation login user mark is revised as, so that network service Device can be generated and be corresponded to based on the first simulation login user mark stored in above-mentioned first HTTP request and session information First HTTP of the first simulation login user mark is replied, and is concurrently served and is stated after the first HTTP returns back to client, client can Corresponding interface is identified to show the first simulation login user, i.e. target actual log user can simulate above-mentioned first simulation and step on Family is employed, the interface of above-mentioned first simulation login user is viewed.To realize the analog subscriber in network information system.The present invention By the user identifier stored in the corresponding session information of modification target actual log user identifier in embodiment, so that target is real Border login user can check the interface of the first simulation login user, simulation with the above-mentioned first simulation login user of automatic imitation User procedures are convenient, and only need the first of the first simulation login user to simulate login user mark, so that believing in network Analog subscriber is more convenient in breath system.
In one implementation, described device further includes first judgment module,
The first judgment module determines the target actual log for being based on preset corresponding relationship described Before the corresponding first simulation login user mark of user identifier, judge in preset corresponding relationship, if exist comprising described The corresponding relationship of target actual log user identifier;
When the corresponding relationship for judging to have comprising the target actual log user identifier in the preset corresponding relationship When, trigger first determining module 720.
In one implementation, described device further includes the second sending module;
Second sending module includes that the target is real for being not present when judging in the preset corresponding relationship When the corresponding relationship of border login user mark, first HTTP request is sent to the network server, so that the net Network server is generated the 2nd HTTP and is returned based on the user identifier stored in first HTTP request and the session information It is multiple;And send the 2nd HTTP and return back to the client, to show the user identifier pair stored in the session information The interface answered.
In one implementation, described device further includes the second judgment module;
Second judgment module determines the target actual log for being based on preset corresponding relationship described Before the corresponding first simulation login user mark of user identifier, judge whether session information modification function opens, wherein described Session information modifies function are as follows: allows actual log user according to actual log user identifier and the corresponding relationship prestored, looks into See that corresponding simulation login user identifies the function at corresponding interface;
When judging that the session information modification function is opened, first determining module 720 is triggered.
In one implementation, described device further include receiving module, modified module, second obtain module, second really Cover half block, second determine modified module, third sending module;
The receiving module, for it is described by the first HTTP request obtained be sent to the network server it Afterwards, the modification received for the target actual log user identifier instructs, wherein includes the second simulation in the modification instruction Login user mark;
The modified module, for by the preset corresponding relationship, the target actual log user identifier to be corresponding It is described first simulation login user mark, be revised as it is described second simulation login user mark;
Described second obtains module, for obtaining the target actual log user by the client to the network The second HTTP request that server is sent, wherein second HTTP request carries the target actual log user identifier;
Second determining module determines the target actual log user mark for being based on preset corresponding relationship Know the corresponding second simulation login user mark;
Described second determines modified module, for determining the corresponding session information of the target actual log user identifier, And by the stored in the session information first simulation login user mark, it is revised as the second simulation login user mark Know;
The third sending module, for second HTTP request to be sent to the network server, so that described Network server is identified based on the second simulation login user stored in second HTTP request and the session information, Generate the 3rd HTTP reply;And send the 3rd HTTP and return back to the client, to show the second analog subscriber mark Know corresponding interface.
In one implementation, described device further includes third judgment module;
The third judgment module determines the target actual log for being based on preset corresponding relationship described Before user identifier corresponding target simulation login user mark, it is based on the target actual log user identifier, described in judgement Whether target actual log user is in logging state;
When judging that the target actual log user is in logging state, first determining module 620 is triggered.
In one implementation, described device further includes the 4th sending module;
4th sending module judges that the target actual log user, will be described in state is not logged in for working as First HTTP request is sent to the network server, so that the corresponding target actual log of network server creation is used The session information of family mark;The target actual log user identifier is stored in created session information;Based on described The target actual log user identifier stored in first HTTP request and the session information created generates the 4th HTTP It replys;It sends the 4th HTTP and returns back to the client, to show the corresponding boundary of the target actual log user identifier Face.
Corresponding to above method embodiment, the embodiment of the invention also provides a kind of network servers, as shown in figure 8, packet Include processor 810, communication interface 820, memory 830 and communication bus 840, wherein processor 810, communication interface 820 are deposited Reservoir 830 completes mutual communication by communication bus 840,
Communication interface 820, for being communicated with client;
Memory 830, for storing computer program;
Processor 810 when for executing the computer program stored on memory 830, realizes institute of the embodiment of the present invention The method of the session information in any modification network information system provided, the method comprising the steps of:
It obtains target actual log user and passes through the first HTTP request that client is sent to network server, wherein institute State the target actual log user identifier that the first HTTP request carries the target actual log user;
Based on preset corresponding relationship, determines that corresponding first simulation of the target actual log user identifier logs in and use Family mark, wherein the preset corresponding relationship are as follows: the user identifier of actual log user and the user of simulation login user mark The corresponding relationship of knowledge;
It determines the corresponding session information of the target actual log user identifier, and will be stored in the session information User identifier is revised as the first simulation login user mark;
First HTTP request is sent to the network server, so that the network server is based on described first The the first simulation login user mark stored in HTTP request and the session information, generates the first HTTP and replys;Concurrently It send the first HTTP to return back to the client, identifies corresponding interface to show the first simulation login user.
In the embodiment of the present invention, when acquisition target actual log user passes through first that client is sent to network server When HTTP request, the target actual log user mark of target actual log user based on the corresponding relationship prestored, can be determined The the first simulation login user mark for knowing corresponding first simulation login user, in turn, by marking target actual log user Know the user identifier stored in corresponding session information, the first simulation login user mark is revised as, so that network service Device can be generated and be corresponded to based on the first simulation login user mark stored in above-mentioned first HTTP request and session information First HTTP of the first simulation login user mark is replied, and is concurrently served and is stated after the first HTTP returns back to client, client can Corresponding interface is identified to show the first simulation login user, i.e. target actual log user can simulate above-mentioned first simulation and step on Family is employed, the interface of above-mentioned first simulation login user is viewed.To realize the analog subscriber in network information system.The present invention By the user identifier stored in the corresponding session information of modification target actual log user identifier in embodiment, so that target is real Border login user can check the interface of the first simulation login user, simulation with the above-mentioned first simulation login user of automatic imitation User procedures are convenient, and only need the first of the first simulation login user to simulate login user mark, so that believing in network Analog subscriber is more convenient in breath system.
The communication bus that above-mentioned network server is mentioned can be Peripheral Component Interconnect standard (Peripheral Component Interconnect, PCI) bus or expanding the industrial standard structure (Extended Industry Standard Architecture, EISA) bus etc..The communication bus can be divided into address bus, data/address bus, control bus etc..For just It is only indicated with a thick line in expression, figure, it is not intended that an only bus or a type of bus.
Communication interface is for the communication between above-mentioned network server and other equipment.
Memory may include random access memory (Random Access Memory, RAM), also may include non-easy The property lost memory (Non-Volatile Memory, NVM), for example, at least a magnetic disk storage.Optionally, memory may be used also To be storage device that at least one is located remotely from aforementioned processor.
Above-mentioned processor can be general processor, including central processing unit (Central Processing Unit, CPU), network processing unit (Network Processor, NP) etc.;It can also be digital signal processor (Digital Signal Processing, DSP), it is specific integrated circuit (Application Specific Integrated Circuit, ASIC), existing It is field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete Door or transistor logic, discrete hardware components.
It is described the embodiment of the invention also provides a kind of computer readable storage medium corresponding to above method embodiment It is stored with computer program in computer readable storage medium, realizes that the present invention is real when the computer program is executed by processor The method for applying the session information in any modification network information system provided by example, the method comprising the steps of:
It obtains target actual log user and passes through the first HTTP request that client is sent to network server, wherein institute State the target actual log user identifier that the first HTTP request carries the target actual log user;
Based on preset corresponding relationship, determines that corresponding first simulation of the target actual log user identifier logs in and use Family mark, wherein the preset corresponding relationship are as follows: the user identifier of actual log user and the user of simulation login user mark The corresponding relationship of knowledge;
It determines the corresponding session information of the target actual log user identifier, and will be stored in the session information User identifier is revised as the first simulation login user mark;
First HTTP request is sent to the network server, so that the network server is based on described first The the first simulation login user mark stored in HTTP request and the session information, generates the first HTTP and replys;Concurrently It send the first HTTP to return back to the client, identifies corresponding interface to show the first simulation login user.
In the embodiment of the present invention, when acquisition target actual log user passes through first that client is sent to network server When HTTP request, the target actual log user mark of target actual log user based on the corresponding relationship prestored, can be determined The the first simulation login user mark for knowing corresponding first simulation login user, in turn, by marking target actual log user Know the user identifier stored in corresponding session information, the first simulation login user mark is revised as, so that network service Device can be generated and be corresponded to based on the first simulation login user mark stored in above-mentioned first HTTP request and session information First HTTP of the first simulation login user mark is replied, and is concurrently served and is stated after the first HTTP returns back to client, client can Corresponding interface is identified to show the first simulation login user, i.e. target actual log user can simulate above-mentioned first simulation and step on Family is employed, the interface of above-mentioned first simulation login user is viewed.To realize the analog subscriber in network information system.The present invention By the user identifier stored in the corresponding session information of modification target actual log user identifier in embodiment, so that target is real Border login user can check the interface of the first simulation login user, simulation with the above-mentioned first simulation login user of automatic imitation User procedures are convenient, and only need the first of the first simulation login user to simulate login user mark, so that believing in network Analog subscriber is more convenient in breath system.
It should be noted that, in this document, the relational terms of such as target and second or the like are used merely to a reality Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that There is also other identical elements in process, method, article or equipment including the element.
Each embodiment in this specification is all made of relevant mode and describes, same and similar portion between each embodiment Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for system reality For applying example, since it is substantially similar to the method embodiment, so being described relatively simple, related place is referring to embodiment of the method Part explanation.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all Any modification, equivalent replacement, improvement and so within the spirit and principles in the present invention, are all contained in protection scope of the present invention It is interior.

Claims (16)

1. a kind of method of the session information in modification network information system, which is characterized in that the described method includes:
It obtains target actual log user and passes through the first HTTP request for sending to network server of client, wherein described the One HTTP request carries the target actual log user identifier of the target actual log user;
Based on preset corresponding relationship, the corresponding first simulation login user mark of the target actual log user identifier is determined Know, wherein the preset corresponding relationship are as follows: the user identifier of the user identifier and simulation login user of actual log user Corresponding relationship;
Determine the corresponding session information of the target actual log user identifier, and the user that will be stored in the session information Mark is revised as the first simulation login user mark;
First HTTP request is sent to the network server, so that the network server is based on the first HTTP The the first simulation login user mark stored in request and the session information, generates the first HTTP and replys;And send institute It states the first HTTP and returns back to the client, identify corresponding interface to show the first simulation login user.
2. being determined described the method according to claim 1, wherein being based on preset corresponding relationship described Before the step of corresponding first simulation login user of target actual log user identifier identifies, the method also includes:
Judge in preset corresponding relationship, if there is the corresponding relationship comprising the target actual log user identifier;
When judging to have the corresponding relationship comprising the target actual log user identifier in the preset corresponding relationship, It is based on preset corresponding relationship described in executing, determines that corresponding first simulation of the target actual log user identifier logs in and uses The step of family identifies.
3. according to the method described in claim 2, it is characterized in that, the method also includes:
When judging in the preset corresponding relationship, there is no the corresponding relationships comprising the target actual log user identifier When, first HTTP request is sent to the network server, so that the network server is based on the first HTTP The user identifier stored in request and the session information generates the 2nd HTTP and replys;And it sends the 2nd HTTP and returns The multiple extremely client, to show the corresponding interface of user identifier stored in the session information.
4. being determined described the method according to claim 1, wherein being based on preset corresponding relationship described Before the step of corresponding first simulation login user of target actual log user identifier identifies, the method also includes:
Judge whether session information modification function opens, wherein the session information modifies function are as follows: allow actual log user According to actual log user identifier and the corresponding relationship prestored, the function of corresponding session information is modified;
When judging that the session information modification function is opened, execution is described to be based on preset corresponding relationship, determines the mesh Mark the step of corresponding first simulation login user of actual log user identifier identifies.
5. method according to claim 1-4, which is characterized in that described by the first HTTP request obtained After the step of being sent to the network server, the method also includes:
The modification received for the target actual log user identifier instructs, wherein includes the second mould in the modification instruction Quasi- login user mark;
By in the preset corresponding relationship, the target actual log user identifier corresponding described first simulates login user Mark is revised as the second simulation login user mark;
The second HTTP request that the target actual log user is sent by the client to the network server is obtained, Wherein, second HTTP request carries the target actual log user identifier;
Based on preset corresponding relationship, determines that corresponding second simulation of the target actual log user identifier logs in and use Family mark;
Determine the corresponding session information of the target actual log user identifier, and first will stored in the session information Login user mark is simulated, the second simulation login user mark is revised as;
Second HTTP request is sent to the network server, so that the network server is based on the 2nd HTTP and asks Ask and the session information in stored second simulation login user mark, generate the 3rd HTTP reply;And described in sending 3rd HTTP returns back to the client, identifies corresponding interface to show second analog subscriber.
6. method according to claim 1-4, which is characterized in that be based on preset corresponding relationship described, really Before making the step of corresponding target simulation login user of the target actual log user identifier identifies, the method is also wrapped It includes:
Based on the target actual log user identifier, judge whether the target actual log user is in logging state;
When judging that the target actual log user is in logging state, execution is described to be based on preset corresponding relationship, really Make the step of corresponding target simulation login user of the target actual log user identifier identifies.
7. according to the method described in claim 6, it is characterized in that, the method also includes:
It is not logged in state when judging that the target actual log user is in, first HTTP request is sent to the network Server, so that the session information of the corresponding target actual log user identifier of network server creation;By the mesh Actual log user identifier is marked, is stored in created session information;Based on first HTTP request and created The target actual log user identifier stored in session information generates the 4th HTTP and replys;The 4th HTTP is sent to return The multiple extremely client, to show the corresponding interface of the target actual log user identifier.
8. a kind of device of the session information in modification network information system, which is characterized in that described device includes:
First obtains module, passes through the first HTTP that client is sent to network server for obtaining target actual log user Request, wherein first HTTP request carries the target actual log user identifier of the target actual log user;
First determining module determines that the target actual log user identifier is corresponding for being based on preset corresponding relationship First simulation login user mark, wherein the preset corresponding relationship are as follows: the user identifier of actual log user is stepped on simulation Employ the corresponding relationship of the user identifier at family;
First determines modified module, for determining the corresponding session information of the target actual log user identifier, and will be described The user identifier stored in session information is revised as the first simulation login user mark;;
First sending module, for first HTTP request to be sent to the network server, so that the network service Device generates first based on the first simulation login user mark stored in first HTTP request and the session information HTTP is replied;And send the first HTTP and return back to the client, to show the first simulation login user mark pair The interface answered.
9. device according to claim 8, which is characterized in that described device further includes first judgment module,
The first judgment module determines the target actual log user for being based on preset corresponding relationship described Before identifying corresponding first simulation login user mark, judge in preset corresponding relationship, if exist comprising the target The corresponding relationship of actual log user identifier;
When judging to have the corresponding relationship comprising the target actual log user identifier in the preset corresponding relationship, Trigger first determining module.
10. device according to claim 9, which is characterized in that described device further includes the second sending module;
Second sending module, for when judging in the preset corresponding relationship, there is no step on comprising the target is practical When recording the corresponding relationship of user identifier, first HTTP request is sent to the network server, so that the network takes Device be engaged in based on the user identifier stored in first HTTP request and the session information, generates the 2nd HTTP and replys; And send the 2nd HTTP and return back to the client, it is corresponding to show the user identifier stored in the session information Interface.
11. device according to claim 8, which is characterized in that described device further includes the second judgment module;
Second judgment module determines the target actual log user for being based on preset corresponding relationship described Before identifying corresponding first simulation login user mark, judge whether session information modification function opens, wherein the session Information modifies function are as follows: allows actual log user according to actual log user identifier and the corresponding relationship prestored, checks institute Corresponding simulation login user identifies the function at corresponding interface;
When judging that the session information modification function is opened, first determining module is triggered.
12. according to the described in any item devices of claim 8-11, which is characterized in that described device further includes receiving module, repairs Change module, the second acquisition module, the second determining module, the second determining modified module, third sending module;
The receiving module, for it is described first HTTP request obtained is sent to the network server after, connect The modification to the target actual log user identifier of narrowing instructs, wherein logs in the modification instruction comprising the second simulation User identifier;
The modified module, for by the preset corresponding relationship, the corresponding institute of the target actual log user identifier The first simulation login user mark is stated, the second simulation login user mark is revised as;
Described second obtains module, for obtaining the target actual log user by the client to the network service The second HTTP request that device is sent, wherein second HTTP request carries the target actual log user identifier;
Second determining module determines the target actual log user identifier pair for being based on preset corresponding relationship The the second simulation login user mark answered;
Described second determines modified module, for determining the corresponding session information of the target actual log user identifier, and will The the first simulation login user mark stored in the session information, is revised as the second simulation login user mark;
The third sending module, for second HTTP request to be sent to the network server, so that the network Server is generated based on the second simulation login user mark stored in second HTTP request and the session information 3rd HTTP is replied;And send the 3rd HTTP and return back to the client, to show the second analog subscriber mark pair The interface answered.
13. according to the described in any item devices of claim 8-11, which is characterized in that described device further includes that third judges mould Block;
The third judgment module determines the target actual log user for being based on preset corresponding relationship described Before identifying corresponding target simulation login user mark, it is based on the target actual log user identifier, judges the target Whether actual log user is in logging state;
When judging that the target actual log user is in logging state, first determining module is triggered.
14. device according to claim 13, which is characterized in that described device further includes the 4th sending module;
4th sending module judges the target actual log user in state is not logged in, by described first for working as HTTP request is sent to the network server, so that the corresponding target actual log user mark of network server creation The session information of knowledge;The target actual log user identifier is stored in created session information;Based on described first The target actual log user identifier stored in HTTP request and the session information created generates the 4th HTTP and returns It is multiple;It sends the 4th HTTP and returns back to the client, to show the corresponding interface of the target actual log user identifier.
15. a kind of network server, which is characterized in that including processor, communication interface, memory and communication bus, wherein place Device, communication interface are managed, memory completes mutual communication by communication bus;
Communication interface, for being communicated with client;
Memory, for storing computer program;
Processor when for executing the computer program stored on memory, realizes modification as claimed in claim 1 to 7 The method and step of session information in network information system.
16. a kind of computer readable storage medium, which is characterized in that be stored with computer in the computer readable storage medium Program, the computer program are realized when being executed by processor in modification network information system as claimed in claim 1 to 7 Session information method and step.
CN201810026689.3A 2018-01-11 2018-01-11 Method, device and server for modifying session information in network information system Active CN110035091B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810026689.3A CN110035091B (en) 2018-01-11 2018-01-11 Method, device and server for modifying session information in network information system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810026689.3A CN110035091B (en) 2018-01-11 2018-01-11 Method, device and server for modifying session information in network information system

Publications (2)

Publication Number Publication Date
CN110035091A true CN110035091A (en) 2019-07-19
CN110035091B CN110035091B (en) 2021-10-22

Family

ID=67234694

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810026689.3A Active CN110035091B (en) 2018-01-11 2018-01-11 Method, device and server for modifying session information in network information system

Country Status (1)

Country Link
CN (1) CN110035091B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7225256B2 (en) * 2001-11-30 2007-05-29 Oracle International Corporation Impersonation in an access system
CN101316179A (en) * 2007-06-01 2008-12-03 华为技术有限公司 Method, server and terminal for setting conversation role
CN101808294A (en) * 2005-01-26 2010-08-18 三星电子株式会社 The method and system that guarantees seamless session when replacing the PoC terminal
CN102246180A (en) * 2008-12-15 2011-11-16 国际商业机器公司 Method and system for impersonating a user
CN106487859A (en) * 2015-09-01 2017-03-08 北京国双科技有限公司 The method of monitoring user access activity, device, terminal unit and system
CN107147557A (en) * 2016-10-25 2017-09-08 北京小米移动软件有限公司 Change the method and device of session information
CN107179986A (en) * 2016-03-10 2017-09-19 阿里巴巴集团控股有限公司 The method for testing pressure and device of operation system
CN107294925A (en) * 2016-04-01 2017-10-24 腾讯科技(深圳)有限公司 A kind of identity switching method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7225256B2 (en) * 2001-11-30 2007-05-29 Oracle International Corporation Impersonation in an access system
CN101808294A (en) * 2005-01-26 2010-08-18 三星电子株式会社 The method and system that guarantees seamless session when replacing the PoC terminal
CN101316179A (en) * 2007-06-01 2008-12-03 华为技术有限公司 Method, server and terminal for setting conversation role
CN102246180A (en) * 2008-12-15 2011-11-16 国际商业机器公司 Method and system for impersonating a user
CN106487859A (en) * 2015-09-01 2017-03-08 北京国双科技有限公司 The method of monitoring user access activity, device, terminal unit and system
CN107179986A (en) * 2016-03-10 2017-09-19 阿里巴巴集团控股有限公司 The method for testing pressure and device of operation system
CN107294925A (en) * 2016-04-01 2017-10-24 腾讯科技(深圳)有限公司 A kind of identity switching method and device
CN107147557A (en) * 2016-10-25 2017-09-08 北京小米移动软件有限公司 Change the method and device of session information

Also Published As

Publication number Publication date
CN110035091B (en) 2021-10-22

Similar Documents

Publication Publication Date Title
CN104767613B (en) Signature verification method, apparatus and system
CN104363264B (en) The SDK access systems by all kinds of means of mobile terminal software
CN105765539B (en) Method and system for automatically generating virtual environment
US9641535B2 (en) Apparatus and data processing systems for accessing an object
CN108804336A (en) Interactive system test method, device, computer equipment and storage medium
CN106550033A (en) Based on the system and method that cloud computing system realizes simulation the whole network ability open platform
CN101939736A (en) System and method for developing rich internet applications for remote computing devices
CN106254462A (en) Method, server and the system of a kind of remote assistance realizing mobile terminal
CN104754287B (en) Video monitoring equipment configuration parameter delivery method and system
CN110535648A (en) Electronic certificate is generated and verified and key controlling method, device, system and medium
CN107464121A (en) Electronic account is reported the loss, solves extension, business management method, device and equipment
CN107395601A (en) A kind of mobile office system and method based on the safe Intranets of VPN
CN107172081A (en) A kind of method and apparatus of data check
CN108028840A (en) Realize the peer to peer connection for establishing safety
CN110489676A (en) Webpage evidence collecting method, device, storage medium and server based on block chain
CN110099129A (en) A kind of data transmission method and equipment
CN113011632A (en) Enterprise risk assessment method, device, equipment and computer readable storage medium
CN115439249A (en) Cross-block-chain business service implementation method, device and system
CN106254328A (en) A kind of access control method and device
CN112799970B (en) Test data processing method, device, electronic equipment and medium
CN106682744A (en) Repair service evaluation managing apparatus and repair service evaluation managing system
CN108345508A (en) Interface calls test method and device
CN110035091A (en) Modify the method, apparatus and server of the session information in network information system
CN116436689A (en) Vulnerability processing method and device, storage medium and electronic equipment
CN107733969B (en) Simulate login method, device, server-side and readable storage medium storing program for executing in website

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