CN116795560A - Session sharing method and device and related equipment - Google Patents
Session sharing method and device and related equipment Download PDFInfo
- Publication number
- CN116795560A CN116795560A CN202211209811.3A CN202211209811A CN116795560A CN 116795560 A CN116795560 A CN 116795560A CN 202211209811 A CN202211209811 A CN 202211209811A CN 116795560 A CN116795560 A CN 116795560A
- Authority
- CN
- China
- Prior art keywords
- target
- session
- identity
- service
- updating
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 53
- 238000012545 processing Methods 0.000 claims abstract description 48
- 230000006870 function Effects 0.000 claims description 24
- 230000004044 response Effects 0.000 claims description 9
- 238000011161 development Methods 0.000 abstract description 7
- 230000000977 initiatory effect Effects 0.000 description 20
- 230000008569 process Effects 0.000 description 18
- 238000010586 diagram Methods 0.000 description 6
- 230000007246 mechanism Effects 0.000 description 5
- 238000004590 computer program Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 230000002159 abnormal effect Effects 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 239000013307 optical fiber Substances 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 239000003795 chemical substances by application Substances 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Landscapes
- Computer And Data Communications (AREA)
Abstract
The application provides a session sharing method, a session sharing device and related equipment, wherein the method comprises the following steps: acquiring a target session, wherein the target session is a session in an idle state in a spark processing engine; responding to a target service request, and updating the current identity of a target session to a target identity corresponding to the target service request; and executing the target service indicated by the target service request according to the target session after the identity update. In the embodiment of the application, the session starting step is skipped by acquiring the session in the idle state in the spark processing engine and updating the current identity of the target session to the target identity corresponding to the target service request when responding to the target service request, so that the starting times of the session are reduced, the multiple times of one-time starting of the session are realized, the starting time of waiting for the session is shortened, and the development efficiency of the service code is improved.
Description
Technical Field
The present application relates to the field of computer technologies, and in particular, to a session sharing method, apparatus, and related devices.
Background
When the service code is developed under the spark processing engine, the problem that the native function of the spark processing engine does not support part of the service requirement is encountered, and in order to solve the problem, the related technology adopts a hard coding mode, and a custom function (also called an expansion function) is embedded in the spark processing engine, namely, the function expansion is performed on the spark processing engine so as to meet the problem that the native function of the spark processing engine does not support part of the service requirement.
In practical business demand application, the discovery is that in most cases, both the native function in the spark processing engine and the expansion function are required, and in this case, the native function and the expansion function are respectively called by starting a plurality of sessions in the spark processing engine. Because the session initiation step is required to be executed before each session is run, the execution process of the session initiation step is time-consuming, and therefore further improvement of the service code development efficiency is hindered to a certain extent.
Disclosure of Invention
The embodiment of the application aims to provide a session sharing method, a session sharing device and related equipment, which are used for solving the problem of low development efficiency when a related technology develops service codes under a spark processing engine.
In a first aspect, an embodiment of the present application provides a session sharing method, including:
acquiring a target session, wherein the target session is a session in an idle state in the spark processing engine;
responding to a target service request, and updating the current identity of a target session to a target identity corresponding to the target service request;
and executing the target service indicated by the target service request according to the target session after the identity update.
Optionally, the target service is an extended service or a standard service;
the standard service is a service corresponding to a native function of the spark processing engine, and the expansion service is a service corresponding to an expansion function of the spark processing engine.
Optionally, the executing the target service indicated by the target service request according to the target session after the identity update includes:
under the condition that an authentication request is acquired, updating the identity of the target session from the target identity to an original identity corresponding to the target session;
executing an authentication task corresponding to the authentication request according to the original identity;
and after the authentication task is executed, updating the identity of the target session from the original identity to the target identity.
Optionally, after the target session is acquired, the method further includes:
acquiring the waiting time of the target session;
and under the condition that the waiting time is greater than or equal to a time threshold value, logging off the target session.
Optionally, the method further comprises:
under the condition that the target service request is received and the target session does not exist, a service session is newly established according to the target identity;
and executing the target service according to the service session.
Optionally, the updating the current identity of the target session to the target identity corresponding to the target service request includes:
and updating N business roles corresponding to the current identity of the target session into M business roles corresponding to the target identity, wherein N and M are integers which are larger than or equal to 1.
Optionally, the updating the current identity of the target session to the target identity corresponding to the target service request includes:
and under the condition that the current identity of the target session and the target identity are different, updating the identity of the target session from the current identity to the target identity.
In a second aspect, an embodiment of the present application provides a session sharing device, which is applied to a spark processing engine, including:
the session acquisition module is used for acquiring a target session, wherein the target session is a session in an idle state in the spark processing engine;
the request response module is used for responding to the target service request and updating the current identity of the target session to the target identity corresponding to the target service request;
and the session execution module is used for executing the target service indicated by the target service request according to the target session after the identity update.
Optionally, the target service is an extended service or a standard service;
the standard service is a service corresponding to a native function of the spark processing engine, and the expansion service is a service corresponding to an expansion function of the spark processing engine.
Optionally, the session execution module includes:
the first authentication submodule is used for updating the identity of the target session from the target identity to the original identity corresponding to the target session under the condition that an authentication request is acquired;
the second authentication sub-module is used for executing an authentication task corresponding to the authentication request according to the original identity;
and the third authentication sub-module is used for updating the identity of the target session from the original identity to the target identity after the authentication task is executed.
Optionally, the session sharing device further includes:
and the timing module is used for acquiring the waiting time of the target session, and logging off the target session under the condition that the waiting time is greater than or equal to a time threshold value.
Optionally, the session sharing device further includes:
the session creation module is used for creating a service session according to the target identity under the condition that the target service request is received and the target session does not exist;
the session execution module is further configured to execute the target service according to the service session.
Optionally, the request response module includes:
and the role updating sub-module is used for updating N service roles corresponding to the current identity of the target session into M service roles corresponding to the target identity, wherein N and M are integers which are larger than or equal to 1.
Optionally, the request response module includes:
and the first updating sub-module is used for updating the identity of the target session from the current identity to the target identity under the condition that the current identity of the target session and the target identity are different.
In a third aspect, an embodiment of the present application provides an electronic device, including:
a processor, a memory and a program or instruction stored on the memory and executable on the processor, which when executed by the processor implements the steps of the session sharing method as described in the first aspect above.
In a fourth aspect, embodiments of the present application provide a readable storage medium having stored thereon a program or instructions which, when executed by a processor, implement the steps in the session sharing method as described in the first aspect above.
In the embodiment of the application, the session starting step is skipped by acquiring the session in the idle state in the spark processing engine and updating the current identity of the target session to the target identity corresponding to the target service request when responding to the target service request, so that the starting times of the session are reduced, the multiple times of one-time starting of the session are realized, the starting time of waiting for the session is shortened, and the development efficiency of the service code is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments of the present application will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort to a person of ordinary skill in the art.
Fig. 1 is a schematic flow chart of a session sharing method according to an embodiment of the present application;
FIG. 2 is a timing diagram of an identity switching operation according to an embodiment of the present application;
FIG. 3 is a timing diagram of another identity switching operation provided by an embodiment of the present application;
FIG. 4 is a timing diagram of yet another identity switching operation provided by an embodiment of the present application;
fig. 5 is a schematic structural diagram of a session sharing device according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the application. All other embodiments, which are derived by a person skilled in the art from the embodiments according to the application without creative efforts, fall within the protection scope of the application.
Referring to fig. 1, fig. 1 is a flowchart of a session sharing method according to an embodiment of the present application, as shown in fig. 1, the session sharing method is applied to a spark processing engine, and the session sharing method includes:
step 101, acquiring a target session.
Wherein the target session (session) is a session in an idle state in the spark processing engine.
Step 102, in response to a target service request, updating the current identity of a target session to a target identity corresponding to the target service request.
In the spark processing engine, the session starting step is skipped by acquiring the session in the idle state and updating the current identity of the target session to the target identity corresponding to the target service request when responding to the target service request, so that the waiting session starting time is shortened.
It should be noted that the foregoing target session may be understood as a session in which the session initiation step is performed; a session that skips the session initiation step is also understood.
For example, session 1 is set to be a session generated through a session initiation procedure, session 2 is a session of multiplexing session 1, session 3 is a session of multiplexing session 2, that is, session 1 is a session of performing a session initiation step, and session 2 and session 3 are both sessions of skipping a session initiation step, in this example, the foregoing target session may be session 1, session 2, or session 3, which is not limited in this embodiment of the present application.
And 103, executing the target service indicated by the target service request according to the target session after the identity update.
As described above, by acquiring the session in the idle state in the spark processing engine and updating the current identity of the target session to the target identity corresponding to the target service request when responding to the target service request, the session starting step is skipped, the starting times of the session are reduced, multiple times of one-time starting of the session are realized, the starting time of waiting for the session is shortened, and the development efficiency of the service code is improved.
Optionally, the target service is an extended service or a standard service;
the standard service is a service corresponding to a native function of the spark processing engine, and the expansion service is a service corresponding to an expansion function of the spark processing engine.
Because the method provided by the spark processing engine cannot completely cover the actual service requirement, the embodiment of the application adopts the cut-plane-oriented programming (Aspect Oriented Programming, AOP) to carry out peripheral expansion on the spark processing engine based on Java Agent (proxy), so that the built service code does not invade the native code of the spark processing engine on the premise of fully covering the actual service requirement, and the service code can be upgraded along with the upgrade of the spark processing engine, thereby achieving the effect of reducing the code maintenance difficulty in the later stage of the service code.
In this embodiment, the extended function of the spark processing engine may be understood as a custom function adaptively created by a developer based on the foregoing specific service requirement in the case where the native function of the spark processing engine cannot achieve the specific service requirement, and the custom function is set on the spark processing engine with an AOP. That is, the standard service and the extended service are two types of services independent of each other.
For example, if the method provided by the spark processing engine is set to support only the service 1 and the service 2, and the actual service requirement requires that the service codes support the service 1 and the service 3, in the service code development process, the code development work of the service 1 can be omitted by applying the spark processing engine, and the spark processing engine is peripherally expanded based on the AOP mode to form a code body for executing the service 3, so that the service codes meet the actual service requirement, at this time, the service 1 can be understood as a standard service, and the service 3 can be understood as an expanded service.
The foregoing target session may be a session for implementing an extended service, or may be a session for implementing a standard service, which is not limited in the embodiment of the present application.
It should be noted that, in the case that the target service is an extended service, the target service request may exist in the form of a section flag, where the section flag may be understood as an identifier for indicating a section, which is used to direct the program to perform a peripheral extended function at the section.
Optionally, the executing the target service indicated by the target service request according to the target session after the identity update includes:
under the condition that an authentication request is acquired, updating the identity of the target session from the target identity to an original identity corresponding to the target session;
executing an authentication task corresponding to the authentication request according to the original identity;
and after the authentication task is executed, updating the identity of the target session from the original identity to the target identity.
The spark processing engine is provided with an authentication mechanism, namely an identity verification mechanism, the authentication mechanism is realized through an authentication task in an authentication thread, the authentication task is periodically executed through a preset timer, and an authentication request is generated when the timer is triggered so as to verify whether the current identity of the target session is the original identity corresponding to the target session. The foregoing target session may be understood as a session in which the session initiation step is performed, and may be understood as a session in which the session initiation step is skipped.
It should be emphasized that, when the aforementioned target session is a session in which the session initiation step is performed, the original identity corresponding to the target session is understood as the identity of the target session in the session initiation step; and when the target session is a session in which the session initiation step is skipped, the original identity corresponding to the target is understood to be the identity of the initial session corresponding to the target session in the session initiation step, wherein the initial session is a session in which the session initiation step is performed.
For example, setting session 1 as a session generated through a session initiation flow, session 2 as a session multiplexing session 1, session 3 as a session multiplexing session 2, the identity of session 1 in the session initiation step being a first identity, the identity of session 1 in the execution phase being also a first identity, the identity of session 2 in the execution phase being a second identity, the identity of session 3 in the execution phase being a third identity, at this time, session 1 being both an initial session corresponding to session 2 and an initial session corresponding to session 3, if the target session is session 1, the original identity corresponding to the target session being the first identity; if the target session is session 2 or session 3, the original identity corresponding to the target session is still the first identity.
As described above, in this embodiment, by reserving the original identity, the condition that the target session is logged out due to the failure in executing the authentication task is avoided, specifically, the identity of the target session is updated from the target identity to the original identity, and based on the authentication task corresponding to the authentication request, the existence of the target session is maintained through the authentication task corresponding to the authentication mechanism, so that smooth execution of the target session is ensured.
Optionally, after the target session is acquired, the method further includes:
acquiring the waiting time of the target session;
and under the condition that the waiting time is greater than or equal to a time threshold value, logging off the target session.
As described above, in some embodiments, by setting the time threshold, the situation that the session in the idle state remains unrestrictedly is avoided, that is, resources occupied by the target session with excessively long waiting time are recovered by means of logging out the target session, so that the system overhead is reduced, and the overall resource utilization rate of the system is improved.
If the waiting time is less than the time threshold, the flow of step 102 may be referred to as a response to the target service request if the target service request is acquired.
Optionally, the method further comprises:
under the condition that the target service request is received and the target session does not exist, a service session is newly established according to the target identity;
and executing the target service according to the service session.
In some embodiments, if a target service request is received, a session initiation step may be performed according to the target identity to complete a new establishment of a service session, where the obtained service session is a native type session, for a case where the target session does not exist (for example, a case where the initiated session does not exist in the initial stage of the system, or a case where the target session is logged off due to excessively long waiting time in the operation stage of the system).
As described above, the service session new process under the condition that the target service request is received and the target session does not exist is configured, so that the integrity of session management logic is ensured, and the stable running of the program is ensured.
Optionally, the updating the current identity of the target session to the target identity corresponding to the target service request includes:
and updating N business roles corresponding to the current identity of the target session into M business roles corresponding to the target identity, wherein N and M are integers which are larger than or equal to 1.
It should be noted that, under the spark processing engine, execution of each session depends on mutual coordination of multiple service roles, and the service roles under the spark processing engine include two types of service scheduling roles (drivers) and service execution roles (executors).
When the identity of the target session is switched from the current identity to the target identity, N business roles corresponding to the current identity are switched to M business roles corresponding to the target identity, so that the problem of incomplete identity switching is avoided, the situation that the target session is executed incorrectly or fails is avoided, and the session stability of the target session in the executing process is ensured.
The values of N and M may be the same or different, which is not limited by this embodiment of the present application, and exemplary setting a first identity corresponds to a first role set, where the first role set includes a service scheduling role A1 and a service executing role B1 (where n=2), and a second identity corresponds to a second role set, where the second role set includes a service scheduling role A2, a service executing role B2, and a service executing role B3 (where m=3), it may be understood that switching the identity of the target session from the current identity to the target identity switches the role set corresponding to the identity of the target session from the first role set to the second role set.
Optionally, the updating the current identity of the target session to the target identity corresponding to the target service request includes:
and under the condition that the current identity of the target session and the target identity are different, updating the identity of the target session from the current identity to the target identity.
As above, in some embodiments, after the target identity is obtained, a consistency check may be performed on the current identity and the target identity, and in a case where the current identity and the target identity are not the same, an identity update operation is performed; and under the condition that the current identity and the target identity are the same, skipping the step corresponding to the identity updating operation, and directly executing the target session, so as to reduce the system overhead (the system overhead corresponding to the consistency check is smaller than the system overhead corresponding to the identity updating operation), and improve the utilization rate of system resources.
For ease of understanding, examples are illustrated below:
as shown in fig. 2, during the execution of the session initiation step, the Wapper component sends a session initiation request to the server component, so that the server component notifies the relevant components of the Spark processing engine of loading the configuration environment, and after the configuration environment is loaded (i.e. after the Spark session environment is initiated), the server component feeds back a message about completion of the initiation to the Wapper component.
After the Spark session environment is started, the Wapper component sends the identity information keytab (i.e. the original identity) corresponding to the current session environment to the server component, so that the server component sends the keytab to the Spark processing engine for storage, and after each new process (which can be understood as a session) is started based on the Spark session environment, the keytab is copied and stored to cope with the authentication mechanism of the Spark session environment.
As shown in fig. 3, in the process of reading and writing hdfs, the Wapper component sends a request for reading and writing hdfs to the server component, so that the server component applies Spark environment and a preset file system.get section to perform hdfs read-write operation, after acquiring a file system object, consistency check is performed on the target identity and the current identity, if the identities are consistent, an identity switching step is skipped, the current identity is still used as the identity of a new process, and the hdfs read-write operation is performed; if the two identities are not identical, the current identity is replaced by the target identity, and the target identity is taken as the identity of a new process (namely, the process of re-authentication if the identities are not identical is mentioned in fig. 2).
In the process of loading hive and jdbc data, the Wapper component sends a request for loading hive and jdbc data to the server component, so that the server component loads hive and jdbc data by applying Spark environment, a preset dataframe reader/load section (corresponding to a driver role) and a preset task run section (corresponding to an executor role), and the identity authentication process is also involved, namely, under the condition that the current identity and the target identity are consistent, the current identity is still used as the identity of a new process; and in case the current identity and the target identity are not identical, the target identity is used as the identity of the new process. It should be noted that, in the process of replacing the current identity with the target identity, if the current identity and the target identity both correspond to multiple executor roles, then multiple executor roles corresponding to the target identity need to be applied to perform full replacement on multiple executor roles corresponding to the current identity, so as to avoid the situation that the process is closed due to abnormal roles.
As shown in fig. 4, in the identity authentication process of Yarn, or in the communication authentication process of the executor role and the driver role, the target identity in the current thread can be replaced by the keytab (i.e. the original identity) stored after the Spark session environment is started, so as to avoid the abnormal termination of Spark.
Referring to fig. 5, fig. 5 is a session sharing apparatus 500 according to an embodiment of the present application, including:
a session obtaining module 501, configured to obtain a target session, where the target session is a session in an idle state in a spark processing engine;
a request response module 502, configured to respond to a target service request, and update a current identity of a target session to a target identity corresponding to the target service request;
a session execution module 503, configured to execute the target service indicated by the target service request according to the target session after the identity update.
Optionally, the target service is an extended service or a standard service;
the standard service is a service corresponding to a native function of the spark processing engine, and the expansion service is a service corresponding to an expansion function of the spark processing engine.
Optionally, the session execution module 503 includes:
the first authentication submodule is used for updating the identity of the target session from the target identity to the original identity corresponding to the target session under the condition that an authentication request is acquired;
the second authentication sub-module is used for executing an authentication task corresponding to the authentication request according to the original identity;
and the third authentication sub-module is used for updating the identity of the target session from the original identity to the target identity after the authentication task is executed.
Optionally, the session sharing device further includes:
and the timing module is used for acquiring the waiting time of the target session, and logging off the target session under the condition that the waiting time is greater than or equal to a time threshold value.
Optionally, the session sharing device further includes:
the session creation module is used for creating a service session according to the target identity under the condition that the target service request is received and the target session does not exist;
the session execution module 503 is further configured to execute the target service according to the service session.
Optionally, the request response module 502 includes:
and the role updating sub-module is used for updating N service roles corresponding to the current identity of the target session into M service roles corresponding to the target identity, wherein N and M are integers which are larger than or equal to 1.
Optionally, the request response module 502 includes:
and the first updating sub-module is used for updating the identity of the target session from the current identity to the target identity under the condition that the current identity of the target session and the target identity are different.
It should be noted that, in the embodiment of the present application, the session sharing apparatus 300 may be an apparatus, or may be a component, an integrated circuit, or a chip in an electronic device.
The session sharing device 500 can implement the processes of the method embodiment of fig. 1 in the embodiment of the present application, and achieve the same beneficial effects, and in order to avoid repetition, the description is omitted here.
Referring to fig. 6, fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application, and as shown in fig. 6, the electronic device includes: may include a processor 601, a memory 602, and a program 6021 stored on the memory 602 and executable on the processor 601.
The program 6021, when executed by the processor 601, may implement any steps and achieve the same advantageous effects in the method embodiment corresponding to fig. 1, and will not be described herein.
Those of ordinary skill in the art will appreciate that all or a portion of the steps of implementing the methods of the embodiments described above may be implemented by hardware associated with program instructions, where the program may be stored on a readable medium.
The embodiment of the present application further provides a readable storage medium, where a computer program is stored, where the computer program when executed by a processor may implement any step in the method embodiment corresponding to fig. 1, and may achieve the same technical effect, so that repetition is avoided, and no further description is given here.
The computer-readable storage media of embodiments of the present application may take the form of any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium may be, for example, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or terminal. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
While the foregoing is directed to the preferred embodiments of the present application, it will be appreciated by those skilled in the art that various modifications and adaptations can be made without departing from the principles of the present application, and such modifications and adaptations are intended to be comprehended within the scope of the present application.
Claims (10)
1. A session sharing method, applied to a spark processing engine, comprising:
acquiring a target session, wherein the target session is a session in an idle state in the spark processing engine;
responding to a target service request, and updating the current identity of a target session to a target identity corresponding to the target service request;
and executing the target service indicated by the target service request according to the target session after the identity update.
2. The method of claim 1, wherein the target service is an extended service or a standard service;
the standard service is a service corresponding to a native function of the spark processing engine, and the expansion service is a service corresponding to an expansion function of the spark processing engine.
3. The method according to claim 1, wherein the performing the target service indicated by the target service request according to the target session after the identity update comprises:
under the condition that an authentication request is acquired, updating the identity of the target session from the target identity to an original identity corresponding to the target session;
executing an authentication task corresponding to the authentication request according to the original identity;
and after the authentication task is executed, updating the identity of the target session from the original identity to the target identity.
4. The method of claim 1, wherein after the acquiring the target session, the method further comprises:
acquiring the waiting time of the target session;
and under the condition that the waiting time is greater than or equal to a time threshold value, logging off the target session.
5. The method according to claim 1, wherein the method further comprises:
under the condition that the target service request is received and the target session does not exist, a service session is newly established according to the target identity;
and executing the target service according to the service session.
6. The method of claim 1, wherein the updating the current identity of the target session to the target identity corresponding to the target service request comprises:
and updating N business roles corresponding to the current identity of the target session into M business roles corresponding to the target identity, wherein N and M are integers which are larger than or equal to 1.
7. The method of claim 1, wherein the updating the current identity of the target session to the target identity corresponding to the target service request comprises:
and under the condition that the current identity of the target session and the target identity are different, updating the identity of the target session from the current identity to the target identity.
8. A session sharing device, applied to a spark processing engine, comprising:
the session acquisition module is used for acquiring a target session, wherein the target session is a session in an idle state in the spark processing engine;
the request response module is used for responding to the target service request and updating the current identity of the target session to the target identity corresponding to the target service request;
and the session execution module is used for executing the target service indicated by the target service request according to the target session after the identity update.
9. An electronic device, comprising: a processor, a memory and a program or instruction stored on the memory and executable on the processor; characterized in that the program or instructions, when executed by the processor, implement the steps in the session sharing method as claimed in any one of claims 1 to 7.
10. A readable storage medium storing a program, wherein the program when executed by a processor implements the steps in the session sharing method according to any one of claims 1 to 7.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211209811.3A CN116795560A (en) | 2022-09-30 | 2022-09-30 | Session sharing method and device and related equipment |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211209811.3A CN116795560A (en) | 2022-09-30 | 2022-09-30 | Session sharing method and device and related equipment |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN116795560A true CN116795560A (en) | 2023-09-22 |
Family
ID=88048630
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202211209811.3A Pending CN116795560A (en) | 2022-09-30 | 2022-09-30 | Session sharing method and device and related equipment |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN116795560A (en) |
-
2022
- 2022-09-30 CN CN202211209811.3A patent/CN116795560A/en active Pending
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN110147240B (en) | Cloud storage-based application program installation method, system and storage medium | |
| CN110175677A (en) | Automatic update method, device, computer equipment and storage medium | |
| EP2864873B1 (en) | Auto-update while running a client software application with update handshake between versions and runtime validation of the successor version | |
| US10122815B1 (en) | Dynamic class mapping in messaging middleware | |
| KR20060051932A (en) | Systems, methods, and computer-readable media for updating the software while running | |
| CN111143023B (en) | Resource changing method and device, equipment and storage medium | |
| US10649765B2 (en) | Systems and methods for preventing service disruption during software updates | |
| CN108874825B (en) | Abnormal data verification method and device | |
| CN107241315A (en) | Cut-in method, device and the computer-readable recording medium of bank's gateway interface | |
| CN109391673A (en) | A kind of method, system and the terminal device of management update file | |
| CN110162344B (en) | Isolation current limiting method and device, computer equipment and readable storage medium | |
| CN107168758A (en) | The code compilation inspection method and device of many code libraries | |
| CN113961346A (en) | Data cache management and scheduling method and device, electronic equipment and storage medium | |
| CN111897543B (en) | Software management method, device, management equipment and storage medium | |
| US20120166893A1 (en) | Recording and Preventing Crash in an Appliance | |
| CN113094211A (en) | Backup data processing method and device | |
| CN108958785B (en) | Application program upgrading method and device | |
| CN112732292A (en) | Method, system, equipment and readable storage medium for software upgrading | |
| CN111447136A (en) | Message pushing method and device, computer equipment and storage medium | |
| CN107168719A (en) | Application program running method and device, terminal and computer readable storage medium | |
| CN113360558B (en) | Data processing method, data processing device, electronic equipment and storage medium | |
| CN112685063B (en) | Feature library updating method, device, network equipment and readable storage medium | |
| CN111008035B (en) | Software operation and maintenance method, electronic equipment and storage medium | |
| CN116795560A (en) | Session sharing method and device and related equipment | |
| US20240045733A1 (en) | Method and apparatus for deploying deep learning system |
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 |