Contextual session dataset configuration method, apparatus, electronic device, and medium
Patent Information
- Application Number
- CN202111461155.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-01
- Publication Date
- 2026-11-03
- Estimated Expiration
- 2041-12-01
AI Technical Summary
In communication equipment, when multiple users perform context session operations on the same service module, it may lead to problems such as data conflicts and timing anomalies.
By obtaining the context session identifier, a global context object is created using gRPC, and the user identifier is set as the session identifier. A context management object is created, the user identifier field in the client request is parsed, and a context session proxy object is obtained or created to achieve context session isolation and ensure that the configuration business of different users is stored in different configuration datasets.
It reduces data conflicts and timing anomalies between business modules, achieves context session isolation, and ensures that the configuration business of different users does not affect each other.
Smart Images

Figure CN116204187B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of communication technology, and more specifically, to a method, apparatus, electronic device, and medium for configuring a dataset for a contextual session. Background Technology
[0002] Currently, communication equipment has increasingly more business functions, and the business functions of various modules of communication equipment are interconnected. In order to meet the configuration requirements of communication equipment, users need to perform a series of operations through the communication equipment.
[0003] In related technologies, the primary use of session context information is to set a value that can persist across multiple batches within the same session. Session context information enables applications to set binary values of up to 128 bytes, which can be referenced by multiple batches, stored procedures, triggers, or user-defined functions running within the same session.
[0004] However, if multiple users perform contextual session operations on the same business module, it may lead to data conflicts or timing anomalies between business modules.
[0005] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0006] The purpose of this disclosure is to provide a method, apparatus, electronic device, and medium for configuring a dataset for a context session, which can at least partially overcome the problem of data conflicts between business modules caused by limitations and defects in related technologies.
[0007] According to a first aspect of the present disclosure, a dataset configuration method for a context session is provided, comprising: obtaining an identifier of the context session; creating a global context object using gRPC and setting the user identifier of the context object as the session identifier; creating a context management object based on the user identifier; in response to a request sent by a client, parsing whether the user identifier field in the command of the request is empty; and obtaining the context management object or obtaining a context session proxy object through the context management object based on the parsing result of the user identifier field.
[0008] In one exemplary embodiment of this disclosure, obtaining the context management object or obtaining the context session proxy object through the context management object based on the parsing result of the user identifier field includes: if the user identifier field in the command parsing the request is empty, then obtaining the context management object; if the user identifier field in the command parsing the request is not empty, then creating the context session management object based on the user identifier of the command.
[0009] In one exemplary embodiment of this disclosure, the method further includes: after creating the context session management object based on the user identifier of the command, determining whether the request is a request to submit a command; if the request is determined to be a request to submit a command, then submitting the configuration dataset of the context session proxy object and storing the submission command in the configuration dataset.
[0010] In one exemplary embodiment of this disclosure, the method further includes: if it is determined that the request is not a request for the submit command, then determining whether the request is a request for the display command; if it is determined that the request is a request for the display command, then performing corresponding display according to the object requested by the display command.
[0011] In one exemplary embodiment of this disclosure, displaying a corresponding command based on the object requested by the display command includes: determining whether the object requested by the display command is a configuration command or an activation command; if the object requested by the display command is the configuration command, then displaying a configuration dataset command; if the object requested by the display command is the activation command, then displaying an activation dataset command.
[0012] In one exemplary embodiment of this disclosure, the method further includes: if it is determined that the request is not a request for the display command, then determining whether the command of the request is an undo command; if it is determined that the command of the request is not the undo command, then determining whether the configuration dataset contains the command corresponding to the undo command; if it is determined that the configuration dataset does not contain the command corresponding to the undo command, then storing the command corresponding to the undo command in the configuration dataset.
[0013] In one exemplary embodiment of this disclosure, the method further includes: if it is determined that the request is a request for the display command, then determining whether the configuration dataset contains a command corresponding to the undo command; if it is determined that the configuration dataset does not contain a command corresponding to the undo command, then storing the command corresponding to the undo command in the configuration dataset; if it is determined that the configuration dataset contains a command corresponding to the undo command, then deleting the command corresponding to the undo command from the configuration dataset.
[0014] According to a second aspect of the present disclosure, a dataset configuration apparatus for a context session is provided, comprising: an acquisition module configured to acquire an identifier of a context session; a creation module configured to create a global context object using gRPC and set the user identifier of the context object to the session identifier; the creation module configured to create a context management object based on the user identifier; a parsing module configured to, in response to a request sent by a client, parse whether the user identifier field in the command of the request is empty; and the acquisition module configured to acquire the context management object or acquire a context session proxy object through the context management object based on the parsing result of the user identifier field.
[0015] According to a third aspect of this disclosure, an electronic device is provided, comprising: a memory; and a processor coupled to the memory, the processor being configured to perform the method as described in any of the preceding methods based on instructions stored in the memory.
[0016] According to a fourth aspect of this disclosure, a computer-readable storage medium is provided having a program stored thereon that, when executed by a processor, implements a dataset configuration method for a context session as described in any of the preceding claims.
[0017] In this embodiment, by obtaining the identifier of the context session, a global context object is created using gRPC, and the user identifier of the context object is set as the session identifier. Then, a context management object is created based on the user identifier, thereby achieving context session isolation and allowing different users' configuration services to be stored in different configuration datasets. Furthermore, by responding to requests sent by clients, parsing whether the user identifier field in the request command is empty, and obtaining the context management object or a context session proxy object through the context management object based on the parsing result of the user identifier field, the conflict or timing anomaly between business modules caused by configuring through context sessions is reduced.
[0018] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0019] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure. It is obvious that the drawings described below are merely some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.
[0020] Figure 1This is a flowchart of a dataset configuration method for a context session according to an exemplary embodiment of this disclosure;
[0021] Figure 2 This is a flowchart of another method for configuring a dataset for a context session in an exemplary embodiment of this disclosure;
[0022] Figure 3 This is a flowchart of another method for configuring a dataset for a context session in an exemplary embodiment of this disclosure;
[0023] Figure 4 This is a flowchart of another method for configuring a dataset for a context session in an exemplary embodiment of this disclosure;
[0024] Figure 5 This is a flowchart of another method for configuring a dataset for a context session in an exemplary embodiment of this disclosure;
[0025] Figure 6 This is a flowchart of another method for configuring a dataset for a context session in an exemplary embodiment of this disclosure;
[0026] Figure 7 This is a flowchart of another method for configuring a dataset for a context session in an exemplary embodiment of this disclosure;
[0027] Figure 8 This is a flowchart of another method for configuring a dataset for a context session in an exemplary embodiment of this disclosure;
[0028] Figure 9 This is a schematic diagram of another dataset configuration scheme for a context session in an exemplary embodiment of this disclosure;
[0029] Figure 10 This is an interactive schematic diagram of another dataset configuration scheme for contextual sessions in an exemplary embodiment of this disclosure;
[0030] Figure 11 This is a block diagram of a dataset configuration apparatus for a context session according to an exemplary embodiment of the present disclosure;
[0031] Figure 12 This is a block diagram of an electronic device according to an exemplary embodiment of the present disclosure. Detailed Implementation
[0032] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided to make this disclosure more comprehensive and complete, and to fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a full understanding of embodiments of this disclosure. However, those skilled in the art will recognize that the technical solutions of this disclosure can be practiced with one or more of the specific details omitted, or other methods, components, apparatus, steps, etc., can be employed. In other instances, well-known technical solutions are not shown or described in detail to avoid obscuring various aspects of this disclosure.
[0033] Furthermore, the accompanying drawings are merely illustrative of this disclosure, and the same reference numerals in the drawings denote the same or similar parts, thus repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0034] The exemplary embodiments of this disclosure will now be described in detail with reference to the accompanying drawings.
[0035] Figure 1 This is a flowchart of a dataset configuration method for a context session in an exemplary embodiment of this disclosure.
[0036] refer to Figure 1 The dataset configuration methods for a context session can include:
[0037] Step S102: Obtain the identifier of the context session.
[0038] Step S104: Create a global context object using gRPC and set the user identifier of the context object to the session identifier (denoted as session_id).
[0039] In one exemplary embodiment of this disclosure, gRPC is an RPC (Remote Procedure Call Protocol) framework. Under the HTTP / 2 data streaming mechanism, gRPC clients and servers can optimize batch operations. The client can integrate multiple requests and send them to the server in a centralized manner, and the server can also return results in batches, thereby realizing streaming RPC.
[0040] Step S106: Create a context management object based on the user identifier.
[0041] Step S108: In response to the request sent by the client, parse whether the user identifier field in the command of the request is empty.
[0042] Step S110: Obtain the context management object or obtain the context session proxy object through the context management object based on the parsing result of the user identifier field.
[0043] In this embodiment, by obtaining the identifier of the context session, a global context object is created using gRPC, and the user identifier of the context object is set as the session identifier. Then, a context management object is created based on the user identifier, thereby achieving context session isolation and allowing different users' configuration services to be stored in different configuration datasets. Furthermore, by responding to requests sent by clients, parsing whether the user identifier field in the request command is empty, and obtaining the context management object or a context session proxy object through the context management object based on the parsing result of the user identifier field, the conflict or timing anomaly between business modules caused by configuring through context sessions is reduced.
[0044] The following section details each step of configuring the dataset for a context session.
[0045] In one exemplary embodiment of this disclosure, such as Figure 2 As shown, obtaining the context management object or obtaining the context session proxy object through the context management object based on the parsing result of the user identifier field includes:
[0046] Step S202: If the user identifier field in the command parsed from the request is empty, then obtain the context management object.
[0047] Step S204: If the user identifier field in the command parsing the request is not empty, then create the context session management object (denoted as confctx) based on the user identifier of the command.
[0048] In one exemplary embodiment of this disclosure, the user identifier (denoted as client_id) is overloaded by creating the context session management object based on the user identifier of the command, thus enabling functional expansion. Then, the member session proxy is obtained using confctx, and the command is configured into the session proxy.
[0049] In one exemplary embodiment of this disclosure, such as Figure 3 As shown, the dataset configuration method for context sessions also includes:
[0050] Step S302: After creating the context session management object based on the user identifier of the command, determine whether the request is a request to submit a command.
[0051] Step S304: If it is determined that the request is a request for the submit command, then submit the configuration dataset of the context session proxy object and store the submit command in the configuration dataset.
[0052] In one exemplary embodiment of this disclosure, if it is determined that the request is a request for the submission command, the configuration dataset of the context session proxy object is submitted, and the submission command is stored in the configuration dataset. Since the configuration dataset of the context session proxy object is created based on the user identifier, the user can isolate the submitted command through the configuration dataset without affecting the business modules of other users.
[0053] In one exemplary embodiment of this disclosure, such as Figure 4 As shown, the dataset configuration method for context sessions also includes:
[0054] Step S402: If it is determined that the request is not a request for the submit command, then determine whether the request is a request for the display command.
[0055] Step S404: If it is determined that the request is a request for the display command, then the corresponding display is performed according to the object requested by the display command.
[0056] In one exemplary embodiment of this disclosure, the user-requested display command is displayed based on the user's request. The displayed command is not limited to the configuration dataset corresponding to the user identifier, but can also be viewed in the configuration dataset corresponding to other user identifiers.
[0057] In one exemplary embodiment of this disclosure, such as Figure 5 As shown, displaying the corresponding object according to the request of the display command includes:
[0058] Step S502: Determine whether the object requested by the display command is a configuration command or an activation command.
[0059] Step S504: If it is determined that the object requested by the display command is the configuration command, then the configuration dataset command is displayed.
[0060] Step S506: If it is determined that the object of the request of the display command is the effective command, then display the effective dataset command.
[0061] In one exemplary embodiment of this disclosure, such as Figure 6 As shown, the dataset configuration method for context sessions also includes:
[0062] Step S602: If it is determined that the request is not a request for the display command, then determine whether the requested command is an undo command.
[0063] In one exemplary embodiment of this disclosure, the undo command is to not execute a command.
[0064] Step S604: If it is determined that the requested command is not the undo command, then determine whether the configuration dataset contains the command corresponding to the undo command.
[0065] Step S606: If it is determined that the configuration dataset does not contain the command corresponding to the undo command, then the command corresponding to the undo command is stored in the configuration dataset.
[0066] In one exemplary embodiment of this disclosure, if it is determined that the requested command is not the undo command and the configuration dataset does not contain the command corresponding to the undo command, it can be determined that the user is requesting the addition of a new command. Then, the command corresponding to the undo command is stored in isolation in the configuration dataset, thereby reducing data conflicts and impacts on the business modules of other users.
[0067] In one exemplary embodiment of this disclosure, such as Figure 7 As shown, the dataset configuration method for context sessions also includes:
[0068] Step S702: If it is determined that the request is a request for the display command, then determine whether the configuration dataset contains the command corresponding to the undo command.
[0069] Step S704: If it is determined that the configuration dataset does not contain the command corresponding to the undo command, then the command corresponding to the undo command is stored in the configuration dataset.
[0070] Step S706: If it is determined that the configuration dataset contains the command corresponding to the undo command, then delete the command corresponding to the undo command from the configuration dataset.
[0071] In one exemplary embodiment of this disclosure, if it is determined that the request is a request for the display command and the configuration dataset contains the command corresponding to the undo command, it can be determined that the user is requesting the deletion of a new command. Then, the command corresponding to the undo command is deleted from the configuration dataset, thereby isolating the command corresponding to the undo command in the configuration dataset, which also reduces data conflicts and impacts on the business modules of other users.
[0072] The following is combined with Figures 8 to 10 The dataset configuration scheme for context sessions according to this disclosure is described in detail.
[0073] like Figure 8 and Figure 9 As shown, the dataset configuration scheme for context sessions according to this disclosure includes a context session creation module, a command activation module, and a command configuration module.
[0074] The context session creation module includes a context management module 902 and a session creation module 904. When a user logs into the command line, a context management object can be created based on the session identifier in the command line window, and then the session agent can be initialized using the context management object.
[0075] In addition, the command configuration module includes a configuration dataset module 906 and a configuration preview module 908. Commands from different users are stored in different session agent configuration datasets. The preview module then displays the commands from different session agent configuration datasets for different users to preview. If a user's configuration is incorrect or misconfigured, the command can be directly deleted from that user's session agent configuration dataset, without affecting the commands of other users' session agents.
[0076] (1) The context session creation module performs the following steps:
[0077] Step S802: The user logs in to the command line.
[0078] Step S804: Obtain the session_id from the command line window.
[0079] Step S806: Create a global context object using gRPC.
[0080] Step S808: Set client_id = session_id in the context object.
[0081] Step S810: Create a context management object confctx using the client_id of the context object.
[0082] In step S812, the user begins configuration by entering commands to invoke gRPC to send requests.
[0083] In step S814, the gRPC client receives the configuration request for the command and the client_id set in the request.
[0084] Step S816: Determine if the client_id of the command is empty. If it is, proceed to step S818; otherwise, proceed to step S820.
[0085] Step S818: Directly obtain the context management object confctx.
[0086] Step S820: Recreate the context management object confctx using the client_id of the command.
[0087] Step S822: Obtain the session proxy object proxy through the object confctx.
[0088] Specifically, after a user logs into the command line, the session_id is obtained from the logged-in command line window. Then, a global context object, context, is created using gRPC. The client_id member of context is set to equal the session_id. Then, a context management object, confctx, is created using the client_id of context, and a session proxy in confctx is created at the same time.
[0089] The user enters a command to configure the system, which calls the gRPC client interface to send a command configuration request and sets a unique client_id for this command in the interface.
[0090] The gRPC server receives the configuration request and the client_id of the command, checks if the client_id is empty. If it is empty, it directly obtains the confctx; otherwise, it recreates the confctx using the client_id of this command. This allows for the overloading of the client_id to enable the expansion of functionality.
[0091] Then, use confctx to obtain the member session agent and start configuring commands to the session agent.
[0092] (2) The command activation module performs the following steps:
[0093] Step S824: Determine whether the command is a submit command. If yes, proceed to step S826; otherwise, proceed to step S830.
[0094] Step S826: Submit the configuration dataset for the session proxy.
[0095] Step S828, run, and store the command in the effective dataset of the session proxy.
[0096] Specifically, if the user does not enter a submit command, the system will proceed to the configuration module.
[0097] First, determine whether to display the naming command. If so, then determine whether to display the configuration command or the command that has already taken effect.
[0098] If it is not a display command, then determine whether it is an undo name.
[0099] If it is not an undo command and the session proxy's configuration dataset does not contain this command, then add the command to the configuration dataset.
[0100] If the undo command exists in the session proxy's configuration dataset, then remove the command from the configuration dataset.
[0101] If it is an undo command but the configuration dataset does not contain this command, then add this command along with undo to the configuration dataset.
[0102] (3) The command configuration module performs the following steps:
[0103] Step S830: Determine whether the command is a display command. If yes, proceed to step S832; otherwise, proceed to step S836.
[0104] In step S832, if the configuration command is to be displayed, then the configuration dataset command is displayed.
[0105] Step S834: If the command to apply is to be displayed, then the command to apply the dataset is to be displayed.
[0106] Step S836: Determine whether the command is an undo command. If yes, proceed to step S842; otherwise, proceed to step S838.
[0107] Step S838: Does the configuration dataset of the session proxy object (proxy) contain this command? If not, proceed to step S840.
[0108] Step S840: Save the command in the configuration dataset.
[0109] Step S842: Determine whether the configuration dataset of the session proxy object has this command. If yes, proceed to step S846; otherwise, proceed to step S844.
[0110] Step S844: Save this command along with an undo to the configuration dataset.
[0111] Step S846: Delete this command from the configuration dataset.
[0112] Specifically, if the user enters a submit command, the system will enter the command activation module.
[0113] The command to submit the session proxy configuration dataset, execute and distribute the configuration dataset, save it in the proxy's effective dataset, and delete the configuration dataset is executed.
[0114] If the user continues to enter commands, steps (2) and (3) above are repeated. If another user performs configuration, a new context session needs to be created based on the user identifier, and the following steps are performed: Figure 8 The steps shown are for configuring the command.
[0115] In related technologies, if a command is configured in single-session mode, when user 1002 and user 1004 configure the same command, after user 1002 saves the command to the configuration dataset, user 1004 also configures the same command. User 1004's command will be saved in the configuration dataset in the form of overwriting user 1002's command. After previewing the configuration, user 1002 may think that he has made a mistake and delete the command to the default state. Then, he may submit the configuration dataset command, run it, and issue it. In this case, user 1004's operation on the command will also be invalid.
[0116] Based on the technical shortcomings caused by the aforementioned single-session mode, such as Figure 10 As shown, embodiments of this disclosure propose a contextual multi-session mode that utilizes session isolation to first store the commands configured by user 1002 in configuration dataset 1006, and the commands configured by user 1004 in configuration dataset 1008.
[0117] If user 1002 makes a mistake, the command to delete the configuration dataset 1006 will be deleted directly, without affecting user 1004's configuration.
[0118] Then, users 1002 and 1004 submit commands to configure the dataset. Based on this, user 1002's erroneous operation has no impact on user 1004. The command is executed and stored in the Redis database.
[0119] Corresponding to the above method embodiments, this disclosure also provides a dataset configuration device for context sessions, which can be used to execute the above method embodiments.
[0120] Figure 11 This is a block diagram of a dataset configuration apparatus for a context session according to an exemplary embodiment of the present disclosure.
[0121] refer to Figure 11 The context session dataset configuration device 1100 may include:
[0122] Get module 1102, set to get the identifier of the context session.
[0123] Create module 1104, set it to use gRPC to create a global context object, and set the user identifier of the context object to the session identifier.
[0124] The creation module 1104 is configured to create a context management object based on the user identifier.
[0125] The parsing module 1106 is configured to respond to a request sent by the client by parsing whether the user identifier field in the command of the request is empty.
[0126] The acquisition module 1102 is configured to acquire the context management object or acquire the context session proxy object through the context management object based on the parsing result of the user identifier field.
[0127] In an exemplary embodiment of this disclosure, the acquisition module 1102 is further configured to: if the user identifier field in the command parsing the request is empty, then acquire the context management object; if the user identifier field in the command parsing the request is not empty, then create the context session management object according to the user identifier of the command.
[0128] In an exemplary embodiment of this disclosure, the creation module 1104 is further configured to: after creating the context session management object according to the user identifier of the command, determine whether the request is a request to submit a command; if the request is determined to be a request to submit a command, submit the configuration dataset of the context session proxy object and store the submission command in the configuration dataset.
[0129] In an exemplary embodiment of this disclosure, the creation module 1104 is further configured to: if it is determined that the request is not a request for the submit command, then determine whether the request is a request for the display command; if it is determined that the request is a request for the display command, then perform corresponding display according to the object of the request for the display command.
[0130] In an exemplary embodiment of this disclosure, the creation module 1104 is further configured to: determine whether the object requested by the display command is a configuration command or an activation command; if the object requested by the display command is the configuration command, then display the configuration dataset command; if the object requested by the display command is the activation command, then display the activation dataset command.
[0131] In an exemplary embodiment of this disclosure, the creation module 1104 is further configured to: if it is determined that the request is not a request for the display command, then determine whether the command of the request is an undo command; if it is determined that the command of the request is not the undo command, then determine whether the configuration dataset contains the command corresponding to the undo command; if it is determined that the configuration dataset does not contain the command corresponding to the undo command, then store the command corresponding to the undo command in the configuration dataset.
[0132] In an exemplary embodiment of this disclosure, the creation module 1104 is further configured to: if it is determined that the request is a request for the display command, determine whether the configuration dataset contains the command corresponding to the undo command; if it is determined that the configuration dataset does not contain the command corresponding to the undo command, store the command corresponding to the undo command in the configuration dataset; if it is determined that the configuration dataset contains the command corresponding to the undo command, delete the command corresponding to the undo command in the configuration dataset.
[0133] Since the functions of the device 1100 have been described in detail in their respective method embodiments, they will not be repeated here.
[0134] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0135] In an exemplary embodiment of this disclosure, an electronic device capable of implementing the above-described method is also provided.
[0136] Those skilled in the art will understand that various aspects of the present invention can be implemented as systems, methods, or program products. Therefore, various aspects of the present invention can be specifically implemented in the following forms: entirely hardware implementations, entirely software implementations (including firmware, microcode, etc.), or implementations combining hardware and software aspects, collectively referred to herein as “circuits,” “modules,” or “systems.”
[0137] The following reference Figure 12 To describe an electronic device 1200 according to this embodiment of the present invention. Figure 12 The electronic device 1200 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.
[0138] like Figure 12 As shown, the electronic device 1200 is manifested in the form of a general-purpose computing device. The components of the electronic device 1200 may include, but are not limited to: at least one processing unit 1210, at least one storage unit 1220, and a bus 1230 connecting different system components (including storage unit 1220 and processing unit 1210).
[0139] The storage unit stores program code that can be executed by the processing unit 1210, causing the processing unit 1210 to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of the present invention. For example, the processing unit 1210 can perform the method shown in the embodiments of this disclosure.
[0140] Storage unit 1220 may include a readable medium in the form of a volatile storage unit, such as random access memory (RAM) 12201 and / or cache memory 12202, and may further include a read-only memory (ROM) 12203.
[0141] Storage unit 1220 may also include a program / utility 12204 having a set (at least one) of program modules 12205, such program modules 12205 including but not limited to: operating system, one or more application programs, other program modules and program data, each or some combination of these examples may include an implementation of a network environment.
[0142] Bus 1230 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the various bus structures.
[0143] Electronic device 1200 can also communicate with one or more external devices 1240 (e.g., keyboard, pointing device, Bluetooth device, etc.), one or more devices that enable a user to interact with electronic device 1200, and / or any device that enables electronic device 1200 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 1250. Furthermore, electronic device 1200 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 1260. As shown, network adapter 1260 communicates with other modules of electronic device 1200 via bus 1230. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 1200, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0144] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, terminal device, or network device, etc.) to execute the methods according to the embodiments of this disclosure.
[0145] In exemplary embodiments of this disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the methods described above is stored. In some possible embodiments, various aspects of the invention may also be implemented as a program product comprising program code that, when the program product is run on a terminal device, causes the terminal device to perform the steps of the various exemplary embodiments of the invention described in the "Exemplary Methods" section of this specification.
[0146] The program product for implementing the above-described method according to embodiments of the present invention may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, the readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.
[0147] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0148] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting programs for use by or in conjunction with an instruction execution system, apparatus, or device.
[0149] The program code contained on the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.
[0150] Program code for performing the operations of this invention can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, and conventional procedural programming languages such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0151] Furthermore, the above figures are merely illustrative of the processes included in the method according to exemplary embodiments of the present invention, and are not intended to be limiting. It is readily understood that the processes shown in the above figures do not indicate or limit the temporal order of these processes. Additionally, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.
[0152] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and concept of this disclosure are indicated by the claims.
Claims
1. A method for configuring a dataset for a contextual session, characterized in that, include: Get the identifier of the context session; A global context object is created using gRPC, and the user identifier of the context object is set to the session identifier; Create a context management object based on the user identifier; In response to a request sent by the client, parse whether the user identifier field in the command of the request is empty; Based on the parsing result of the user identifier field, obtain the context management object or obtain the context session proxy object through the context management object, including: If the user identifier field in the command parsing the request is empty, then obtain the context management object; If the user identifier field in the command parsing the request is not empty, then the context session management object is created based on the user identifier of the command; After creating the context session management object based on the user identifier of the command, determine whether the request is a request to submit a command; If it is determined that the request is a request for the submit command, then the configuration dataset of the context session proxy object is submitted, and the submit command is stored in the configuration dataset.
2. The dataset configuration method for contextual sessions as described in claim 1, characterized in that, Also includes: If it is determined that the request is not a request for the submit command, then it is determined whether the request is a request for the display command; If it is determined that the request is a request for the display command, then the corresponding display is performed according to the object requested by the display command.
3. The dataset configuration method for contextual sessions as described in claim 2, characterized in that, Displaying the corresponding object according to the request of the display command includes: Determine whether the object requested by the display command is a configuration command or an activation command; If it is determined that the object requested by the display command is the configuration command, then the configuration dataset command is displayed; If it is determined that the object requested by the display command is the effective command, then the effective dataset command is displayed.
4. The dataset configuration method for contextual sessions as described in claim 2, characterized in that, Also includes: If it is determined that the request is not a request for the display command, then it is determined whether the command requested is an undo command; If it is determined that the requested command is not the undo command, then it is determined whether the configuration dataset contains the command corresponding to the undo command; If it is determined that the configuration dataset does not contain the command corresponding to the undo command, then the command corresponding to the undo command is stored in the configuration dataset.
5. The dataset configuration method for contextual sessions as described in claim 2, characterized in that, Also includes: If it is determined that the request is a request for the display command, then it is determined whether the configuration dataset contains a command corresponding to the undo command; If it is determined that the configuration dataset does not contain the command corresponding to the undo command, then the command corresponding to the undo command is stored in the configuration dataset; If it is determined that the configuration dataset contains the command corresponding to the undo command, then the command corresponding to the undo command is deleted from the configuration dataset.
6. A dataset configuration device for a contextual session, characterized in that, include: The module for obtaining information is set to retrieve the identifier of the context session. Create a module, configure it to use gRPC to create a global context object, and set the user identifier of the context object to the session identifier; The creation module is configured to create a context management object based on the user identifier; The parsing module is configured to respond to requests sent by the client by parsing whether the user identifier field in the command of the request is empty; The acquisition module is configured to acquire the context management object or acquire the context session proxy object through the context management object based on the parsing result of the user identifier field, including: If the user identifier field in the command parsing the request is empty, then obtain the context management object; If the user identifier field in the command parsing the request is not empty, then the context session management object is created based on the user identifier of the command; After creating the context session management object based on the user identifier of the command, determine whether the request is a request to submit a command; If it is determined that the request is a request for the submit command, then the configuration dataset of the context session proxy object is submitted, and the submit command is stored in the configuration dataset.
7. An electronic device, characterized in that, include: Memory; as well as A processor coupled to the memory, the processor being configured to execute a dataset configuration method for a context session as described in any one of claims 1-5, based on instructions stored in the memory.
8. A computer-readable storage medium having a program stored thereon that, when executed by a processor, implements the dataset configuration method for a context session as described in any one of claims 1-5.
Citation Information
Patent Citations
Context aware commands
CN106062689A
Login processing method, service processing method, apparatuses, and server
CN107483418A
