CN109104499B - Session establishing method, device, equipment and storage medium - Google Patents

Session establishing method, device, equipment and storage medium Download PDF

Info

Publication number
CN109104499B
CN109104499B CN201811150341.1A CN201811150341A CN109104499B CN 109104499 B CN109104499 B CN 109104499B CN 201811150341 A CN201811150341 A CN 201811150341A CN 109104499 B CN109104499 B CN 109104499B
Authority
CN
China
Prior art keywords
session
parameter
user
historical
identity
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.)
Active
Application number
CN201811150341.1A
Other languages
Chinese (zh)
Other versions
CN109104499A (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.)
Shanghai Dameng Database Co Ltd
Original Assignee
Shanghai Dameng Database 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 Shanghai Dameng Database Co Ltd filed Critical Shanghai Dameng Database Co Ltd
Priority to CN201811150341.1A priority Critical patent/CN109104499B/en
Publication of CN109104499A publication Critical patent/CN109104499A/en
Application granted granted Critical
Publication of CN109104499B publication Critical patent/CN109104499B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0876Network architectures or network communication protocols for network security for authentication of entities based on the identity of the terminal or configuration, e.g. MAC address, hardware or software configuration or device fingerprint
    • 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 discloses a method, a device, equipment and a storage medium for session establishment. Wherein, the method comprises the following steps: acquiring a session establishment request, wherein the session establishment request is triggered when a user logs in; determining historical session parameters of the login user during historical login according to the identity of the login user; and establishing a session with a background server according to the historical session parameters. The technical scheme provided by the embodiment of the invention solves the problem that the same session parameter is required to be repeatedly configured every time the session is established in the prior art, realizes the automatic configuration of the session parameter in the session establishment process, simplifies the session establishment steps and improves the configuration efficiency of the session parameter.

Description

Session establishing method, device, equipment and storage medium
Technical Field
The embodiment of the invention relates to the field of database processing, in particular to a session establishing method, a session establishing device, session establishing equipment and a storage medium.
Background
With the rapid development of database technology, the application of database management systems in the market is becoming more and more popular. The database management system has a plurality of parameters which can be configured by users, so that the users can update the configuration parameters according to the specific conditions of the current application of different databases, for example, the corresponding parameters are selected for configuration according to the hardware environment, the size of service data volume or service characteristics and the like of the current application of the databases.
The parameters in the database management system at present include two parameters, a system level parameter and a session level parameter. The system level parameters are generally configured by an administrator user of the database system, and become effective in the range of the whole database system after successful configuration; the session level parameters are configured by the ordinary user connected to the local database application and are only valid in the current session establishing the connection with the background server at the time of database login. Because the session level parameters are only valid in the current session, the user can only reset when logging out, that is, after disconnecting from the background server, and logging in again next time, even if the same session level parameters as those in the previous login need to be set.
In many service systems, a user logs in a database system, and after a session with a background server is established, the same type of service operation is usually executed, and the use of session-level parameters requires that the user performs the same parameter configuration after each session is established, so that the same parameter configuration process during each session establishment is complicated, the same parameters need to be configured repeatedly, the configuration efficiency is low, and great manpower is wasted.
Disclosure of Invention
Embodiments of the present invention provide a session establishment method, an apparatus, a device, and a storage medium, so as to solve the problem in the prior art that the same session parameter may be repeatedly configured each time a session is established, simplify the session establishment procedure, and improve the configuration efficiency of the session parameter.
In a first aspect, an embodiment of the present invention provides a session establishment method, where the method includes:
acquiring a session establishment request, wherein the session establishment request is triggered when a user logs in;
determining historical session parameters of the login user during historical login according to the identity of the login user;
and establishing a session with a background server according to the historical session parameters.
In a second aspect, an embodiment of the present invention provides a session establishing apparatus, where the apparatus includes:
the device comprises a request acquisition module, a session establishment module and a processing module, wherein the request acquisition module is used for acquiring a session establishment request which is triggered when a user logs in;
the parameter determining module is used for determining historical session parameters of the login user during historical login according to the identity of the login user;
and the session establishing module is used for establishing a session with the background server according to the historical session parameters.
In a third aspect, an embodiment of the present invention provides an apparatus, where the apparatus includes:
one or more processors;
storage means for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement a session establishment method as described in any of the embodiments of the present invention.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a session establishment method according to any embodiment of the present invention.
The embodiment of the invention provides a session establishing method, a device, equipment and a storage medium, which solves the problem that the same session parameter is required to be repeatedly configured every time a session is established in the prior art by determining the historical session parameter matched with the identity of a login user and directly establishing the session connection between a database local machine and a background server according to the historical session parameter, realizes the automatic configuration of the session parameter in the session establishing process, simplifies the session establishing step and improves the configuration efficiency of the session parameter.
Drawings
Other features, objects and advantages of the invention will become more apparent upon reading of the detailed description of non-limiting embodiments made with reference to the following drawings:
fig. 1A is a flowchart of a session establishment method according to an embodiment of the present invention;
fig. 1B is a flowchart of a method for determining a historical session parameter in a method according to an embodiment of the present invention;
fig. 2 is a flowchart of a method for determining a parameter configuration table in a method according to a second embodiment of the present invention;
fig. 3 is a flowchart of a session establishment method according to a third embodiment of the present invention;
fig. 4 is a scene block diagram of a specific scene of a session establishment application according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of a session establishment apparatus according to a fifth embodiment of the present invention;
fig. 6 is a schematic structural diagram of an apparatus according to a sixth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1A is a flowchart of a session establishment method according to an embodiment of the present invention, where this embodiment is applicable to any database application deployed to log a user in a database native of a database system. The session establishing method provided in this embodiment may be executed by the session establishing apparatus provided in the embodiment of the present invention, the apparatus may be implemented in a software and/or hardware manner, and is integrated into a device for executing the method, and the device for executing the method in this embodiment may be any intelligent terminal with a database application function, such as a tablet computer, a desktop computer, a notebook computer, and the like. Specifically, referring to fig. 1A, the method may include the steps of:
s110, a session establishment request is obtained.
Wherein, the session establishment request is triggered when the user logs in. Specifically, in this embodiment, a computer device deployed with a corresponding database application is used as a database native machine. The user can log in the corresponding database system by inputting the corresponding account password on the database local machine so as to execute certain database business operations; when the database local machine receives login information input by a user and executes corresponding login operation, a session connection is simultaneously triggered to be established between the database local machine and the background server, the established session is communication information of the database local machine and the background server from the beginning to the end of communication, namely the communication content of the database local machine and the background server from the beginning of user login to the user logout; the established session can record the machine number of the local database connected this time, the application program of which database is logged in and the user login information.
Optionally, when the database local machine provides each service operation function for the user, the user is required to log in through the database application program deployed on the database local machine, and when the login information is received, the database local machine is triggered to establish a session connection with the background database at the same time, so as to implement normal execution of each service operation function. Therefore, in this embodiment, when receiving login information input by a user through a deployed database application program, the database local acquires a session establishment request triggered according to a user login operation in the database local.
And S120, determining historical session parameters of the logged-in user during historical login according to the identity of the logged-in user.
Specifically, the identity of the login user is information that can uniquely determine the identity of the login user, for example: the login account of the login user or other identity information bound by the login account, and the like. The historical session parameter is a session parameter which is configured for the session between the database local machine and the background server established by the historical login when the login user logs in the historical before the login. The historical session parameters may include a connection mode between the database local machine and the background server, or an execution algorithm for executing various service function operations on the database local machine, and the like, where the execution algorithm for each user service may be selected from algorithms that are matched with each user and can efficiently complete corresponding service operations, so as to improve the service execution rate of each user. For example, the user a and the user B both execute the sorting operation of the service data in the database, the service data volume of the user a operation is low, the service data volume of the user B is much higher than that of the user a, at this time, the session parameters include the corresponding sorting algorithm, the user a can set the sorting algorithm in the corresponding historical session parameters to the first sorting algorithm capable of quickly realizing the sorting of a small amount of data for a small amount of service data during the historical login, the user B can set the sorting algorithm in the corresponding historical session parameters to the second sorting algorithm capable of quickly realizing the sorting of a large amount of data for a large amount of service data during the historical login, and respectively match and bind the session parameters with the corresponding users during the configuration, so that the corresponding session parameters can be directly matched during the subsequent re-login of the user, the configuration of the corresponding session parameters during the current login, therefore, the service operation performance of each user on the local database is improved.
In this embodiment, when user login information is received, a session establishment request for establishing a corresponding session between a database local and a background server triggered by login is acquired, at this time, by judging the login information of the current login user, an identity of the current login user can be determined, that is, a login account of the login user or at least one of other identity information which is bound with the login account and can uniquely identify the user identity, such as an identity card number, a mobile phone number, and the like, is determined, according to the identity of the login user, a history session parameter selected when a history session is established with the background server during history login of the login user before the login, and the history session parameter at this time can be a corresponding session parameter which is configured by the login user of a common user according to self service requirements during history login, or the session parameters can be configured for the login user according to the service requirements of the login user when the administrator user logins in history.
Illustratively, when the user who logs in at this time is a common user, the session parameter which can be set by the corresponding system and supports the user can be configured according to the service requirement of the user during historical login, and the session parameter is bound with the user; the administrator user can also configure different session parameters for each user in a unified way according to the service requirements of each user, and the session parameters are bound with each user and correspondingly stored in the database, namely the background server, so that the historical session parameters bound with the user can be directly found out when the user logs in.
Optionally, as shown in fig. 1B, in this embodiment, determining a historical session parameter when the login user logins in history according to the identity of the login user may specifically include:
and S121, acquiring a pre-stored parameter configuration table.
The parameter configuration table is a relation table storing matching relation information between session parameters and users, wherein the session parameters are correspondingly set by the users during historical login. Specifically, the session establishment method in this embodiment may be applied to a database system, so that a storage form of a database table is adopted to store a matching relationship between each user and a corresponding set historical session parameter. The database table is a parameter configuration table in this embodiment, and the parameter configuration table may include user identification, session parameter identification bound to each user, and corresponding session parameter values. Optionally, the structure of the parameter configuration table in this embodiment is predefined, as shown in table 1.
TABLE 1 parameter configuration Table Structure
Figure BDA0001817804350000061
Figure BDA0001817804350000071
Specifically, each piece of session parameter information corresponding to each user and the user is stored in the parameter configuration table as a data record.
For example, when the user a logs in the history, the corresponding sorting algorithm needs to be configured as the first sorting algorithm according to the own traffic volume, and at this time, after the session parameter configuration is successful, the identity identifier of the user a, the sorting algorithm identifier and the corresponding first sorting algorithm may be used as a new data record and stored in the parameter configuration table correspondingly.
Optionally, in this embodiment, when determining the historical session parameters, first, a parameter configuration table stored in a database system and storing a matching relationship between each user and the corresponding session parameter needs to be obtained, so as to determine the historical session parameters matched with the login user in the parameter configuration table in the subsequent process.
And S122, searching the session parameters bound by the login user in the parameter configuration table according to the identity of the login user, wherein the session parameters are used as historical session parameters.
Specifically, after the parameter configuration table is obtained, firstly, the identity of the login user is determined according to the login information of the login user, all the session parameters bound to the login user and stored in advance are sequentially searched in the obtained parameter configuration table according to the identity of the login user, at this time, multiple session parameters may be bound to the login user in the parameter configuration table, for example, the session parameters bound to the user a may have multiple session connection modes, sorting algorithms or other business function algorithms, and at this time, all the session parameters bound to the login user and searched in the parameter configuration table are used as the historical session parameters.
And S130, establishing a session with the background server according to the historical session parameters.
Optionally, after determining the historical session parameters of the login user during the historical login according to the identity of the login user, in order to simplify the configuration operation of the same user on the same session parameters, in this embodiment, the historical session parameters bound to the login user and acquired in the parameter configuration table may be directly and automatically configured as the session parameters corresponding to the session established between the database local machine and the background server, which is triggered during the login, so as to implement the session establishment between the database local machine and the background server.
According to the technical scheme provided by the embodiment, the historical session parameters matched with the identity of the login user are determined, and the session connection between the database local machine and the background server is established directly according to the historical session parameters, so that the problem that the same session parameters are required to be repeatedly configured every time a session is established in the prior art is solved, the automatic configuration of the session parameters in the session establishment process is realized, the session establishment steps are simplified, and the configuration efficiency of the session parameters is improved.
Example two
Fig. 2 is a flowchart of a method for determining a parameter configuration table in the method according to the second embodiment of the present invention. The embodiment is optimized on the basis of the embodiment. Optionally, each user may configure a corresponding session parameter by invoking a corresponding algorithm provided by the database system during the history login, and correspondingly store the session parameter as the history session parameter in the parameter configuration table. In the present embodiment, the determination of the parameter configuration table at the time of history entry is mainly specifically described. Optionally, referring to fig. 2, this embodiment may specifically include the following steps:
and S210, acquiring a parameter updating statement after history login.
The parameter updating statement comprises the identity of the user to be configured and the session parameter to be updated. Specifically, when a user logs in historically, if a session parameter which is correspondingly bound with the identity of the user exists, a session with a background server is established according to the session parameter; if the session parameter which is correspondingly bound with the identity of the user does not exist at present, the session with the background server can be established according to the default session parameter. After historical conversation between a database local machine and a background server is established during historical login, if the conversation parameters corresponding to the historical login user need to be configured according to the service requirements of the historical login user, the conversation parameters which are allowed to be configured by the historical login user can be configured by the historical login user by calling a conversation parameter configuration method provided by a system; the session parameters corresponding to the user needing to be configured can be configured by the system through calling the session parameter configuration method provided by the system and logging in the account of the administrator by the administrator user.
The session parameter configuration method provided by the system invoked in this embodiment may be implemented by the database locally acquiring a parameter update statement corresponding to a user input. Specifically, when the session parameters of the user need to be configured, a parameter update statement input by the user needs to be obtained first, where the parameter update statement includes an identity of the user to be configured and the session parameters to be updated. The user to be configured is a user corresponding to the session parameter that needs to be configured, for example, when the session parameter in the user a is configured, the parameter to be configured is the identity of the user a; the session parameter to be updated is a session parameter which needs to be updated by configuration, and comprises a session parameter identifier and a corresponding session parameter value.
Specifically, the parameter update statement in this embodiment includes two types, namely a parameter configuration statement and a parameter deletion statement, and the session parameters corresponding to the user can be reconfigured by the parameter configuration statement, and some session parameters already configured for the user can be deleted by the parameter deletion statement.
For example, the parameter configuration statement for configuring the session parameter in this embodiment may be: SP _ SET _ USER _ PARA (USER, PARA _ NAME, VALUE); the USER parameter is the identity of the USER to be configured, that is, the USER corresponding to the session parameter to be configured, when the ordinary USER configures the session parameter, only the session parameter of the USER can be configured, that is, the USER must be the same as the identity of the current login USER, and the administrator USER can configure the session parameter for all USERs; the parameter PARA _ NAME is a session parameter identifier which needs to be configured in the session parameters to be updated; the parameter VALUE is a parameter VALUE of a session parameter that needs to be configured.
The parameter deletion statement for deleting the currently configured session parameter may be: SP _ CLEAR _ USER _ PARA (USER, PARA _ NAME); i.e. session parameters corresponding to the PARA _ NAME that is configured for the USER are cancelled.
Therefore, when the session parameters of the user need to be updated after the history login, a parameter update statement input by the history login user or the administrator user for the session parameters that need to be updated is first acquired.
S220, determining the updating type of the parameter updating statement.
Specifically, the update type of the parameter update statement includes two types, namely parameter configuration and parameter deletion, after the parameter update statement is obtained, the update statement is firstly analyzed to obtain a corresponding update type, so as to judge whether to reconfigure the session parameter or cancel the existing session parameter configuration. The updating types are different, and the subsequent parameter updating operations in the parameter configuration table which are correspondingly executed are also different.
S230, judging whether the historical login user is a common user, if so, executing S240; if not, go to S250.
Because the allowed parameter configuration authority of the common user is different from that of the administrator user, the common user can only configure the session parameters of the common user, and the administrator user can configure the corresponding session parameters for all the users. Therefore, when the parameter update statement after the history login is acquired and the corresponding session parameter is updated, it is first necessary to determine whether the history login user performing the parameter update is a normal user, so as to determine the parameter update operation under the corresponding parameter configuration authority. Optionally, in this embodiment, a corresponding identifier may be preset for the administrator user, and whether the historical login user is a normal user may be accurately distinguished according to the identifier.
S240, the identity of the user to be configured, which is matched with the identity of the historical login user, and the session parameter to be updated, which meets the parameter configuration authority of the historical login user, are bound and updated into a parameter configuration table.
Specifically, when the history login USER is an ordinary USER, it is described that a parameter update statement during history login is input by the ordinary USER, that is, the ordinary USER updates and configures a corresponding session parameter, at this time, the database local firstly checks each parameter in the obtained parameter update statement, that is, checks a USER, PARA _ NAME, or VALUE in the parameter update statement, and when the history login USER is an ordinary USER, only the session parameter of the history login USER can be updated, so that it is determined whether the USER to be configured (USER) is an identity of the history login USER at this time, and it is determined whether the session parameter to be updated (PARA _ NAME and/or VALUE) at this time is a session parameter identity or a legal session parameter VALUE that is allowed to be set by the history login USER at this time.
Optionally, because the ordinary user can only update and configure the session parameter of the ordinary user, when the history login user is the ordinary user, the identity of the user to be configured, which is matched with the identity of the history login user, and the session parameter to be updated, which satisfies the parameter configuration authority of the history login user, can be selected from the parameter update statement to be bound, that is, it is determined that the identity of the user to be configured in the parameter update statement is the same as the identity of the history login user, and the session parameter to be updated is the session parameter that allows the history login user to perform the update and configuration, the identity of the user to be configured and the corresponding session parameter to be updated, which satisfy the setting, are updated into the parameter configuration table.
Optionally, the update types of the parameter update statements are different, and the operations corresponding to updating into the parameter configuration table are also different, and the updating into the parameter configuration table in this embodiment may specifically include:
and if the updating type is parameter configuration, adding the matched identity of the user to be configured and the session parameter to be updated into a parameter configuration table according to the identity of the historical login user.
Specifically, when it is determined that the update type of the parameter update statement is parameter configuration, it is described that the obtained parameter update statement is: SP _ SET _ USER _ PARA (USER, PARA _ NAME, VALUE); at this time, firstly, determining that each parameter USER included in the parameter configuration is matched with a historical login USER, the parameter PARA _ NAME is a session parameter identifier allowing the historical login USER to configure and the parameter VALUE is a legal session parameter VALUE, then judging whether the same data record bound with the USER and the PARA _ NAME exists in a parameter configuration table, and if so, modifying a corresponding VALUE VALUE in the data record into a VALUE new VALUE configured in the current parameter updating statement; if the current configuration does not exist, directly taking the USER, the PARA _ NAME and the VALUE of the current configuration as a new data record and inserting the new data record into the parameter configuration table.
In addition, if the update type is parameter deletion, the specified identity of the user to be configured and the session parameter to be updated are deleted in the parameter configuration table according to the identity of the historical login user.
Specifically, when it is determined that the update type of the parameter update statement is parameter deletion, it is described that the obtained parameter update statement is: SP _ CLEAR _ USER _ PARA (USER, PARA _ NAME); at this time, it is also necessary to first determine that each parameter USER included in the parameter deletion matches the historical login USER and that the parameter PARA _ NAME is a session parameter identifier allowing the historical login USER to operate, then search a specified data record corresponding to the parameter USER and the parameter PARA _ NAME in a parameter configuration table, and delete the data record; if the specified data record is not found, the processing can be omitted or corresponding error information can be returned to the history login user.
And S250, binding the identity of the user to be configured and the session parameter to be updated, and updating the bound identity and the session parameter to be updated into a parameter configuration table.
Specifically, when the history login user is an administrator user, it is described that the current parameter update statement is input by the administrator user, that is, the administrator user updates and configures the corresponding session parameter. Since the administrator user can configure session parameters for all users. Therefore, when the historical login USER is determined to be the administrator USER, the PARA _ NAME or the VALUE of each parameter in the parameter updating statement is checked, whether the USER of the parameter is a legal USER identity in the system or not is judged, whether the PARA _ NAME is a session parameter allowed to be configured by the system or not is judged, whether the VALUE of the parameter is a legal parameter VALUE of the PARA _ NAME or not is confirmed, and after the success, the identity of the USER to be configured and the session parameter to be updated in the parameter updating statement can be directly bound and updated into the parameter configuration table.
At this time, when the update type is parameter configuration, the identity of the user to be configured and the session parameter to be updated are added to the parameter configuration table. That is, whether the same data record bound with USER and PARA _ NAME already exists in the parameter configuration table is judged, if yes, the corresponding VALUE in the data record is modified to the new VALUE of VALUE configured in the current parameter updating statement; if the current configuration does not exist, directly taking the USER, the PARA _ NAME and the VALUE of the current configuration as a new data record and inserting the new data record into the parameter configuration table.
In addition, when the update type is parameter deletion, the specified identity of the user to be configured and the session parameter to be updated are deleted in the parameter configuration table. That is, looking up the specified data record identical to the parameter USER and the parameter PARA _ NAME in the parameter configuration table, and deleting the data record; if the specified data record is not found, the processing can be omitted or corresponding error information can be returned to the history login user.
According to the technical scheme provided by the embodiment, the historical session parameters matched with the identity of the login user are directly determined in the parameter configuration table, and the session connection between the database local machine and the background server is directly established according to the historical session parameters, so that the problem that the same session parameters are required to be repeatedly configured every time the session is established in the prior art is solved, the automatic configuration of the session parameters in the session establishment process is realized, the session establishment steps are simplified, and the configuration efficiency of the session parameters is improved.
EXAMPLE III
Fig. 3 is a flowchart of a session establishment method according to a third embodiment of the present invention. The embodiment is optimized on the basis of the embodiment. Specifically, as shown in fig. 3, the present embodiment may include the following steps:
s310, a session establishment request is obtained, and the session establishment request is triggered when the user logs in.
And S320, determining historical session parameters of the logged-in user during historical login according to the identity of the logged-in user.
And S330, establishing a session with the background server according to the historical session parameters.
S340, acquiring a parameter query statement input by a login user.
Specifically, when the matching relationship between each user and the corresponding session parameter is stored by the parameter configuration table, each user can query the parameter configuration table because the parameter configuration table is stored in the database as a database table. At this time, when the login user queries the parameter configuration table, the corresponding parameter query statement is input first, and the database local machine obtains the parameter query statement input by the login user.
And S350, determining the matched query authority according to the identity of the login user, and acquiring the session parameters under the query authority.
Optionally, in order to ensure data security in the database system, when querying the parameter configuration table, the query authority of the login user needs to be determined first. Specifically, the defined scope of allowing query in the parameter configuration table is different because the identity of the login user is different. If the login USER is a common USER, the login USER is limited to only inquire the data record related to the login USER in the parameter configuration table, and the session parameter information of other USERs cannot be inquired, namely only the data record with the USER value being the same as the identity of the login USER in the parameter configuration table can be inquired; if the login user is an administrator user, all data records in the parameter configuration table are allowed to be inquired, that is, the session parameter information of any user can be inquired.
In this embodiment, when a parameter query statement input by a login user is obtained, the identity of the login user needs to be determined first, so as to determine whether the login user is a normal user. When the login user is a common user, determining the matched query authority, and only acquiring the data record which is the same as the identity of the login user in the parameter configuration table, namely the session parameter related to the login user, and displaying the session parameter to the login user; when the login user is an administrator user, the authority is completely opened, all data records in the parameter configuration table, namely the session parameters correspondingly bound by all users, can be acquired, and are displayed to the login user.
According to the technical scheme provided by the embodiment, the historical session parameters matched with the identity of the login user are directly determined in the parameter configuration table, and the session connection between the database local machine and the background server is directly established according to the historical session parameters, so that the problem that the same session parameters are required to be repeatedly configured every time the session is established in the prior art is solved, the automatic configuration of the session parameters in the session establishment process is realized, the session establishment steps are simplified, and the configuration efficiency of the session parameters is improved.
Example four
Fig. 4 is a scene block diagram of a specific scene of a session establishment application according to the fourth embodiment of the present invention, where corresponding database application programs are respectively deployed on the database local 1 and the database local 2, and belong to the same database system, and when a user logs in, the database local respectively establishes a session with a background server. At this time, in this embodiment, a process of establishing a session between the database local machine 1 or the database local machine 2 and the background server when the general user a logs in the database local machine 1 or the administrator user B logs in the database local machine 2, and different processes of performing update configuration on session parameters of the user a in the parameter configuration table by the general user a on the database local machine 1 or performing update configuration on session parameters of the user a in the parameter configuration table by the administrator user B on the database local machine 2 are specifically described respectively.
The database local machine 1 receives the login information of the common user A, and triggers session establishment, and if the session parameters bound with the common user A are found out in the parameter configuration table according to the login information of the common user A, a session with a background server is established according to the session parameters; and if the session parameters bound with the common user A are not found out, establishing a session with the background server according to the default session parameters. After the session is established, if the general USER a needs to update the session parameters bound in the parameter configuration table according to the service requirement of the general USER a, a corresponding parameter update statement, SP _ SET _ USER _ PARA (USER, PARA _ NAME, VALUE) or SP _ CLEAR _ USER _ PARA (USER, PARA _ NAME) is input at this time to configure or cancel the configuration of the session parameters of the current general USER a. At this time, in the parameter update statement, the parameter USER is the identity of the general USER a, the parameter PARA _ NAME is the configurable session parameter identity of the general USER a, and the parameter VALUE is a legal session parameter VALUE, so that the USER, the PARA _ NAME, and the VALUE are added to the parameter configuration table as one data record, or the data records corresponding to the USER and the PARA _ NAME are deleted from the parameter configuration table, and the updated parameter configuration table is saved.
Or, the database local machine 2 receives the login information of the administrator user B and triggers the session establishment; and the database local machine 2 searches the corresponding session parameters according to the login information of the administrator user B, and establishes a session with the background server. At this time, if the administrator USER B needs to update and configure the session parameter corresponding to the general USER a in the parameter configuration table, the corresponding parameter update statement is also input, at this time, the parameter USER in the parameter update statement is the identity of the general USER a, and the parameter PARA _ NAME and the parameter VALUE are the session parameter reconfigured by the administrator USER B for the general USER a, so that the USER, the PARA _ NAME, and the parameter VALUE are added to the parameter configuration table as one data record, or the data record corresponding to the USER and the PARA _ NAME is deleted from the parameter configuration table, and the updated parameter configuration table is saved.
Therefore, the session parameters corresponding to the session parameters reconfigured by the common user a and the session parameters reconfigured by the administrator user B for the common user a can be both stored in the parameter configuration table and only bound with the identity of the common user a. At this time, if the common user a logs in the database local machine 1 again, the database local machine 1 can find out the session parameters that have been reconfigured for the common user a and the administrator user B in the parameter configuration table according to the identity of the common user a, and establish a session with the background server according to the session parameters.
According to the technical scheme provided by the embodiment, the historical session parameters matched with the identity of the login user are directly determined in the parameter configuration table, and the session connection between the database local machine and the background server is directly established according to the historical session parameters, so that the problem that the same session parameters are required to be repeatedly configured every time the session is established in the prior art is solved, the automatic configuration of the session parameters in the session establishment process is realized, the session establishment steps are simplified, and the configuration efficiency of the session parameters is improved.
EXAMPLE five
Fig. 5 is a schematic structural diagram of a session establishing apparatus according to a fifth embodiment of the present invention, and as shown in fig. 5, the apparatus may include:
a request obtaining module 510, configured to obtain a session establishment request, where the session establishment request is triggered when a user logs in;
a parameter determining module 520, configured to determine, according to the identity of the login user, a historical session parameter when the login user logs in historically;
a session establishing module 530, configured to establish a session with the background server according to the historical session parameters.
According to the technical scheme provided by the embodiment, the historical session parameters matched with the identity of the login user are determined, and the session connection between the database local machine and the background server is established directly according to the historical session parameters, so that the problem that the same session parameters are required to be repeatedly configured every time a session is established in the prior art is solved, the automatic configuration of the session parameters in the session establishment process is realized, the session establishment steps are simplified, and the configuration efficiency of the session parameters is improved.
Further, the parameter determining module 520 may include: a table acquisition unit 5201 configured to acquire a parameter configuration table stored in advance; the parameter searching unit 5202 is configured to search, according to the identity of the login user, the session parameter bound by the login user in the parameter configuration table, as a historical session parameter.
Further, the parameter configuration table may be determined by the parameter updating module 540 described below.
The parameter update module 540 may be configured to: acquiring a parameter updating statement after historical login, wherein the parameter updating statement comprises an identity of a user to be configured and session parameters to be updated; if the historical login user is a common user, binding the identity of the user to be configured matched with the identity of the historical login user and the session parameter to be updated meeting the parameter configuration authority of the historical login user, and updating the session parameter to be updated into a parameter configuration table; and if the historical login user is an administrator user, binding the identity of the user to be configured and the session parameter to be updated, and updating the identity into a parameter configuration table.
Further, the above apparatus may further include: and a type determining module 550, configured to determine an update type of the parameter update statement, where the update type includes parameter configuration and parameter deletion.
Accordingly, the parameter updating module 540 may be specifically configured to: if the updating type is parameter configuration, adding the matched identity of the user to be configured and the session parameter to be updated into a parameter configuration table according to the identity of the historical login user; and if the updating type is parameter deletion, deleting the specified identity of the user to be configured and the session parameter to be updated in the parameter configuration table according to the identity of the historical login user.
Further, the above apparatus may further include: a parameter query module 560, configured to obtain a parameter query statement input by a login user; and determining the matched inquiry authority according to the identity of the login user, and acquiring the session parameters under the inquiry authority.
The session establishing apparatus provided in this embodiment is applicable to the session establishing method provided in any of the above embodiments, and has corresponding functions and advantageous effects.
EXAMPLE six
Fig. 6 is a schematic structural diagram of an apparatus according to a fifth embodiment of the present invention. As shown in fig. 6, the apparatus comprises a processor 60, a storage means 61, a communication means 62, an input means 63 and an output means 64; the number of processors 60 in the device may be one or more, and one processor 60 is taken as an example in fig. 6; the processor 60, the storage means 61, the communication means 62, the input means 63 and the output means 64 of the device may be connected by a bus or other means, as exemplified by the bus connection in fig. 6.
The storage device 61 is a computer-readable storage medium, and can be used to store software programs, computer-executable programs, and modules, such as the modules corresponding to the session establishment method in the embodiment of the present invention (for example, the request acquisition module 510, the parameter determination module 520, and the session establishment module 530 in the session establishment device). The processor 60 executes various functional applications and data processing of the device by running software programs, instructions and modules stored in the storage means 61, i.e. implements the session establishment method described above.
The storage device 61 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the storage device 61 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the storage 61 may further include memory located remotely from the processor 60, which may be connected to the device over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The communication device 62 may be used to implement a network connection or a mobile data connection.
The input means 63 may be used to receive entered numerical or character information and to generate key signal inputs relating to user settings and function control on the device, such as to retrieve parameter update statements.
The output device 64 may include a display device such as a display screen.
The device provided by this embodiment may be configured to execute the session establishment method provided by any of the above embodiments, and has corresponding functions and beneficial effects.
EXAMPLE seven
Seventh, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, can implement the session establishment method in any of the above embodiments. The method specifically comprises the following steps:
acquiring a session establishment request, wherein the session establishment request is triggered when a user logs in;
determining historical session parameters of the login user during historical login according to the identity of the login user;
and establishing a session with the background server according to the historical session parameters.
Of course, the storage medium provided by the embodiment of the present invention contains computer-executable instructions, and the computer-executable instructions are not limited to the operations of the method described above, and may also perform related operations in the session establishment method provided by any embodiment of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It should be noted that, in the embodiment of the session establishing apparatus, the included units and modules are only divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (5)

1. A session establishment method, comprising:
acquiring a session establishment request, wherein the session establishment request is triggered when a user logs in;
determining historical session parameters of the login user during historical login according to the identity of the login user;
establishing a session with a background server according to the historical session parameters;
the historical session parameters include:
the connection mode between the database local machine and the background server or the execution algorithm for executing various service function operations on the database local machine;
the determining the historical session parameters of the login user during historical login according to the identity of the login user comprises the following steps:
acquiring a pre-stored parameter configuration table;
according to the identity of the login user, searching the session parameters bound by the login user in the parameter configuration table to be used as the historical session parameters;
the parameter configuration table is determined as follows:
acquiring a parameter updating statement after historical login, wherein the parameter updating statement comprises an identity of a user to be configured and session parameters to be updated;
if the historical login user is a common user, binding the identity of the user to be configured matched with the identity of the historical login user and the session parameter to be updated meeting the parameter configuration authority of the historical login user, and updating the session parameter to be updated into the parameter configuration table;
if the historical login user is an administrator user, binding the identity of the user to be configured and the session parameter to be updated, and updating the identity into the parameter configuration table;
after the session with the background server is established according to the historical session parameters, the method further comprises the following steps:
acquiring a parameter query statement input by the login user;
determining matched inquiry authority according to the identity of the login user, and acquiring session parameters under the inquiry authority; if the login user is a common user, limiting the login user to be only capable of inquiring the data record related to the login user in the parameter configuration table; and if the login user is an administrator user, allowing all data records in the parameter configuration table to be inquired.
2. The method of claim 1, after obtaining the parameter update statement after the historical login, further comprising:
determining an update type of the parameter update statement, wherein the update type comprises parameter configuration and parameter deletion;
correspondingly, the updating to the parameter configuration table includes:
if the update type is parameter configuration, adding the matched identity of the user to be configured and the session parameter to be updated into the parameter configuration table according to the identity of the historical login user;
and if the update type is parameter deletion, deleting the specified identity of the user to be configured and the session parameter to be updated in the parameter configuration table according to the identity of the historical login user.
3. A session establishment apparatus, comprising:
the device comprises a request acquisition module, a session establishment module and a processing module, wherein the request acquisition module is used for acquiring a session establishment request which is triggered when a user logs in;
the parameter determining module is used for determining historical session parameters of the login user during historical login according to the identity of the login user;
the session establishing module is used for establishing a session with a background server according to the historical session parameters;
the historical session parameters include:
the connection mode between the database local machine and the background server or the execution algorithm for executing various service function operations on the database local machine;
the table acquisition unit is used for acquiring a pre-stored parameter configuration table;
a parameter searching unit, configured to search, according to the identity of the login user, a session parameter bound by the login user in the parameter configuration table, where the session parameter is used as the historical session parameter;
the parameter configuration table is determined by a parameter updating module;
the parameter updating module is used for acquiring a parameter updating statement after historical login, wherein the parameter updating statement comprises an identity of a user to be configured and a session parameter to be updated; if the historical login user is a common user, binding the identity of the user to be configured matched with the identity of the historical login user and the session parameter to be updated meeting the parameter configuration authority of the historical login user, and updating the session parameter to be updated into the parameter configuration table; if the historical login user is an administrator user, binding the identity of the user to be configured and the session parameter to be updated, and updating the identity into the parameter configuration table;
the parameter query module is used for acquiring a parameter query statement input by a login user; and determining the matched inquiry authority according to the identity of the login user, and acquiring the session parameters under the inquiry authority.
4. A session establishment apparatus, characterized in that the apparatus comprises:
one or more processors;
storage means for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the session establishment method of any of claims 1-2.
5. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a session establishment method according to any one of claims 1-2.
CN201811150341.1A 2018-09-29 2018-09-29 Session establishing method, device, equipment and storage medium Active CN109104499B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811150341.1A CN109104499B (en) 2018-09-29 2018-09-29 Session establishing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811150341.1A CN109104499B (en) 2018-09-29 2018-09-29 Session establishing method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109104499A CN109104499A (en) 2018-12-28
CN109104499B true CN109104499B (en) 2021-11-05

Family

ID=64868084

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811150341.1A Active CN109104499B (en) 2018-09-29 2018-09-29 Session establishing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109104499B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111813458A (en) * 2019-09-02 2020-10-23 厦门雅基软件有限公司 Session data acquisition method and device, electronic equipment and readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103986695A (en) * 2014-04-23 2014-08-13 广州华多网络科技有限公司 Method and device for controlling speech session
CN106027600A (en) * 2016-04-29 2016-10-12 北京小米移动软件有限公司 Connection establishing method and device
CN106385356A (en) * 2015-08-06 2017-02-08 中兴通讯股份有限公司 Login method and terminal, session establishing method and server
CN107483418A (en) * 2017-07-27 2017-12-15 阿里巴巴集团控股有限公司 Login process method, method for processing business, device and server

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10043204B2 (en) * 2014-02-02 2018-08-07 Henry Thomas Peter Perpetual communication session: portability/reusability across applications, networks and devices

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103986695A (en) * 2014-04-23 2014-08-13 广州华多网络科技有限公司 Method and device for controlling speech session
CN106385356A (en) * 2015-08-06 2017-02-08 中兴通讯股份有限公司 Login method and terminal, session establishing method and server
CN106027600A (en) * 2016-04-29 2016-10-12 北京小米移动软件有限公司 Connection establishing method and device
CN107483418A (en) * 2017-07-27 2017-12-15 阿里巴巴集团控股有限公司 Login process method, method for processing business, device and server

Also Published As

Publication number Publication date
CN109104499A (en) 2018-12-28

Similar Documents

Publication Publication Date Title
CN110287709B (en) User operation authority control method, device, equipment and medium
US10999721B2 (en) Communication identifier binding processing method and terminal
WO2020029388A1 (en) File transmission method, system, computer device and storage medium
WO2021012568A1 (en) Data processing method and related device
CN107911249B (en) Method, device and equipment for sending command line of network equipment
CN108829838B (en) Batch processing method of account information and server
US9516700B1 (en) Cloud-based controller for managing access points
WO2019242162A1 (en) Middleware installation method and apparatus, and computer device and storage medium
CN111753223A (en) Access control method and device
CN111199028A (en) Resource information access method and device, computer equipment and storage medium
CN108154024B (en) Data retrieval method and device and electronic equipment
CN109104499B (en) Session establishing method, device, equipment and storage medium
US11431795B2 (en) Method, apparatus and storage medium for resource configuration
CN114610449B (en) Multi-cluster resource operation method and system based on unified request entry
CN115328520A (en) Remote upgrading method and device, electronic equipment and storage medium
CN110688201B (en) Log management method and related equipment
CN109947892B (en) Analysis path determination method and system, interface and log tree construction method
CN112925841B (en) Distributed JDBC implementation method, device and computer-readable storage medium
CN116684282B (en) Method and device for initializing newly-added cloud server and computer equipment
CN115114361B (en) Resource retrieval method and system based on unified interface of container cloud platform
CN113010196B (en) Patch screening method, device, equipment and storage medium
CN111132121B (en) Information processing method and network warehouse function NRF network element
CN115705319A (en) Operation log management method and device and electronic equipment
CN116260853A (en) Connection management method and device for node equipment and storage medium
CN116909680A (en) Method for entering Pod container in container arranging system cluster

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