Session data processing method and device, electronic equipment and readable storage medium
By building temporary data storage files and feature temporary tables, and using private hash cache to manage session data, the problem of insufficient security in session data storage and processing in the existing technology is solved, and the data is securely isolated and efficiently deleted, which improves users Experience.
Patent Information
- Application Number
- CN202411165229.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-22
- Publication Date
- 2024-12-20
AI Technical Summary
In the prior art, the storage and processing of session data are insufficient in security, and data access rights are uncontrollable, resulting in risks in data access processing.
By building temporary data storage files and feature temporary tables, using private hash cache for data storage and management, and combining session tag information and global object identifiers for data distinction, ensuring data access security.
Improve the security and access control of session data, provide a better user experience, ensure data isolation and deletion processing, and enhance the security of data access.
Smart Images

Figure CN119167388A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology. The embodiments are applicable to but not limited to the field of financial technology, and in particular, to a session data processing method, device, electronic device and computer-readable storage medium. Background Art
[0002] With the continuous development of social economy and the continuous advancement of science and technology, intelligent financial systems have also developed rapidly. In the financial industry, as customers have higher and higher requirements for databases, they often have higher requirements for security, performance, and reliability, not just for data storage and access. The storage and processing of session data is a common application for business; currently, session data is generally stored in temporary tables, but based on temporary tables, it is difficult to control the security of the data, and the access rights to the data are uncontrollable or unclear, which leads to risks in data access processing. Summary of the invention
[0003] The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.
[0004] In order to solve the problems mentioned in the above background technology, the embodiments of the present application provide a session data processing method, device, electronic device and computer-readable storage medium, which can improve the security of data access, thereby bringing users a better user experience.
[0005] In a first aspect, an embodiment of the present application provides a session data processing method, including:
[0006] Receive session data;
[0007] In the case that the storage file of the preset feature temporary table does not exist, constructing a temporary data storage file according to the session tag information carried by the session data and the global object identifier of the feature temporary table;
[0008] Writing the information of the temporary data storage file and the feature temporary table into a preset private hash cache;
[0009] Writing the session data into the feature temporary table of the private hash cache and the temporary data storage file;
[0010] When the session ends, the temporary data storage file in the private hash cache and the data information of the feature temporary table corresponding to the temporary data storage file are deleted.
[0011] According to some embodiments of the present application, constructing a temporary data storage file according to the session tag information carried by the session data and the global object identifier of the feature temporary table includes:
[0012] Performing tag extraction processing on the session data to obtain the session tag information;
[0013] According to the session tag information, the global object identifier is obtained by matching from the feature temporary table;
[0014] The temporary data storage file is generated according to the session tag information and the global object identifier.
[0015] According to some embodiments of the present application, deleting the temporary data storage file in the private hash cache and data information of the feature temporary table corresponding to the temporary data storage file includes:
[0016] Determining the session tag information corresponding to the session data;
[0017] Determine the corresponding temporary data storage file from the private hash cache according to the session tag information;
[0018] Determine the corresponding global object identifier according to the temporary data storage file;
[0019] Determine corresponding data information from the feature temporary table according to the global object identifier;
[0020] The temporary data storage file and the corresponding data information in the feature temporary table are deleted.
[0021] According to some embodiments of the present application, the feature temporary table is obtained in the following manner:
[0022] Get the structure query statement;
[0023] Performing lexical and grammatical analysis on the structured query statement to generate a grammatical data structure tree;
[0024] Performing semantic analysis on the grammatical data structure tree to generate a semantic data structure tree;
[0025] The feature temporary table is generated according to the grammatical data structure tree and the semantic data structure tree.
[0026] According to some embodiments of the present application, after deleting the temporary data storage file in the private hash cache and the data information of the feature temporary table corresponding to the temporary data storage file, the method further includes:
[0027] Modify the information in the characteristic temporary table;
[0028] The modified information in the temporary feature table is broadcast to each session, so that each session performs data update processing on the corresponding private hash cache according to the updated temporary feature table.
[0029] According to some embodiments of the present application, after deleting the temporary data storage file in the private hash cache and the data information of the feature temporary table corresponding to the temporary data storage file, the method further includes:
[0030] Deleting the information in the feature temporary table and the temporary data storage file corresponding to the feature temporary table, and generating data invalidation information;
[0031] The data invalidation information is broadcasted to each session, so that each session deletes the information in the corresponding feature temporary table and the temporary data storage file according to the data invalidation information.
[0032] According to some embodiments of the present application, after receiving the session data, the method further includes:
[0033] Performing permission analysis on the session data to obtain permission information;
[0034] It is determined based on the permission information that the corresponding user has the data access permission.
[0035] In a second aspect, an embodiment of the present application further provides a session data processing device, including:
[0036] A first processing module, configured to receive session data;
[0037] A second processing module is used to construct a temporary data storage file according to the session tag information carried by the session data and the global object identifier of the temporary feature table when the storage file of the preset temporary feature table does not exist;
[0038] A third processing module, used for writing the information of the temporary data storage file and the feature temporary table into a preset private hash cache;
[0039] A fourth processing module, configured to write the session data into the feature temporary table of the private hash cache and the temporary data storage file;
[0040] The fifth processing module is used to delete the temporary data storage file in the private hash cache and the data information of the feature temporary table corresponding to the temporary data storage file when the session ends.
[0041] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the session data processing method as described in the first aspect above is implemented.
[0042] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute the session data processing method described in the first aspect above.
[0043] According to the session data processing method of the embodiment provided by the present application, there are at least the following beneficial effects: in the process of processing session data, firstly, session data is received, and then, when the storage file of the preset feature temporary table does not exist, a temporary data storage file is constructed according to the session tag information carried by the session data and the global object identifier of the feature temporary table; then, the information of the temporary data storage file and the feature temporary table is written into the preset private hash cache; then, the session data is written into the feature temporary table and the temporary data storage file of the private hash cache; finally, when the session ends, the temporary data storage file in the private hash cache and the data information of the feature temporary table corresponding to the temporary data storage file are deleted; through the above technical solution, the session data is stored based on the feature temporary table, and each session data will correspond to the corresponding global object identifier, so that different session data can be distinguished, which can improve the security of data access, thereby bringing a better user experience to the user. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The accompanying drawings are used to provide further understanding of the technical solution of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the technical solution of the present application and do not constitute a limitation on the technical solution of the present application.
[0045] Figure 1 is a flow chart of a method for processing session data provided by an embodiment of the present application;
[0046] Figure 2 is a specific flow chart of step S200 provided in one embodiment of the present application;
[0047] Figure 3 is a specific flow chart of step S500 provided in one embodiment of the present application;
[0048] Figure 4 This is a specific flow chart of constructing a temporary feature table provided by an embodiment of the present application;
[0049] Figure 5is a flow chart of a session data processing method provided by another embodiment of the present application;
[0050] Figure 6 is a flowchart of a session data processing method provided by another embodiment of the present application;
[0051] Figure 7 is a flow chart of a session data processing method provided by another embodiment of the present application;
[0052] Figure 8 is a schematic diagram of a session data processing device provided by an embodiment of the present application;
[0053] Fig. 9 It is a schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0054] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0055] It should be noted that although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification and claims and the above drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0056] It should be noted that, unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0057] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0058] AI is a new technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence. Artificial intelligence is a branch of computer science. Artificial intelligence attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Research in this field includes robots, language recognition, image recognition, natural language processing and expert systems. Artificial intelligence can simulate the information process of human consciousness and thinking. Artificial intelligence is also a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0059] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0060] Artificial intelligence is AI. AI is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0061] The servers involved in artificial intelligence technology can be independent servers or cloud servers that provide basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), as well as big data and artificial intelligence platforms.
[0062] The present application provides a session data processing method, device, electronic device and computer-readable storage medium. In the process of session data processing, session data is first received, and then, when the storage file of the preset feature temporary table does not exist, a temporary data storage file is constructed according to the session tag information carried by the session data and the global object identifier of the feature temporary table; then the information of the temporary data storage file and the feature temporary table is written into a preset private hash cache; then the session data is written into the feature temporary table and the temporary data storage file of the private hash cache; finally, when the session ends, the temporary data storage file in the private hash cache and the data information of the feature temporary table corresponding to the temporary data storage file are deleted; through the above technical solution, the session data is stored based on the feature temporary table, and each session data corresponds to the corresponding global object identifier, so that different session data can be distinguished, the security of data access can be improved, and a better user experience is brought to the user.
[0063] The session data processing method provided in the embodiment of the present application relates to the field of financial technology. The session data processing method provided in the embodiment of the present application can be applied to a terminal, can be applied to a server side, or can be software running in a terminal or a server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the session data processing method, etc., but is not limited to the above forms.
[0064] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0065] It should be noted that in each specific implementation of the present application, when it comes to the need to perform relevant processing based on data related to user identity or characteristics such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of these data will comply with relevant laws, regulations, and standards. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the normal operation of the embodiment of the present application will be obtained.
[0066] The embodiments of the present application are further described below in conjunction with the accompanying drawings.
[0067] like Figure 1 As shown, Figure 1 It is a flowchart of a session data processing method provided by an embodiment of the present application. The session data processing method includes but is not limited to steps S100 to S500.
[0068] Step S100, receiving session data;
[0069] Step S200, when the storage file of the preset feature temporary table does not exist, construct a temporary data storage file according to the session mark information carried by the session data and the global object identifier of the feature temporary table;
[0070] Step S300, writing the information of the temporary data storage file and the feature temporary table into a preset private hash cache;
[0071] Step S400, writing the session data into the feature temporary table and temporary data storage file of the private hash cache;
[0072] Step S500: When the session ends, the temporary data storage file in the private hash cache and the data information of the feature temporary table corresponding to the temporary data storage file are deleted.
[0073] It should be noted that, in the process of processing session data, the session data is first received, and then, when the storage file of the preset feature temporary table does not exist, a temporary data storage file is constructed according to the session tag information carried by the session data and the global object identifier of the feature temporary table; then the information of the temporary data storage file and the feature temporary table is written into the preset private hash cache; then the session data is written into the feature temporary table and the temporary data storage file of the private hash cache; finally, when the session ends, the temporary data storage file in the private hash cache and the data information of the feature temporary table corresponding to the temporary data storage file are deleted; through the above technical solution, the session data is stored based on the feature temporary table, and each session data will correspond to the corresponding global object identifier, so that different session data can be distinguished, which can improve the security of data access, thereby bringing a better user experience.
[0074] It should be noted that session data may be data generated when a user uses an intelligent conversational robot to consult about insurance business; and in the process of generating session data, the user's separate permission or consent will be obtained through pop-up windows or by jumping to a confirmation page. After clearly obtaining the user's separate permission or consent, the corresponding voice signal will be obtained, and the obtained voice signal will be subsequently converted into session data.
[0075] It is worth noting that, when the storage file of the preset feature temporary table does not exist, the session tag information carried by the session data and the global object identifier of the feature temporary table can be used to construct the temporary data storage file required for data storage; subsequently, the information of the temporary data storage file and the feature temporary table can be written into the preset private hash cache. Each session data will carry session tag information, and different session data can be distinguished based on different session tag information; a temporary data storage file can be constructed based on the session tag information carried by the session data and the global object identifier of the feature temporary table, and the constructed temporary data storage file will only store the corresponding session data, so that different session data can be isolated, thereby improving the security of data access. For example, two users consult the intelligent conversation robot about relevant financial issues respectively, which will generate two different session data, and because the two session data carry different session tag information, different temporary data storage files can be constructed to store the corresponding session data, so that the session data of different users can be isolated, thereby improving the security of data access.
[0076] It is worth noting that after the temporary data storage file is constructed, the information of the temporary data storage file and the feature temporary table can be written into the pre-set private hash cache. Among them, private hash cache usually refers to a cache mechanism implemented in software or system, which uses hash tables to store and quickly retrieve data. This cache can be in-memory or distributed, and is used to improve data access speed and reduce the number of requests to the original data source. The key features of a private hash cache include: hash tables provide an average access speed of O(1), which means that no matter how much data is stored in the cache, the time to access any data item is constant; data is stored in the form of key-value pairs, where the key is an index used to quickly locate data and the value is the actual data; hash tables may encounter hash conflicts, that is, different keys may map to the same hash value; private hash caches need to have mechanisms to resolve these conflicts, such as linked lists, open addressing, etc.; private hash caches usually have capacity limits, and when the cache is full, a strategy is needed to decide which data to remove, and common strategies include least recently used, least frequently used, etc.; in a multi-threaded environment, private hash caches need to ensure thread safety to avoid data contention and consistency issues; private hash caches can be configured according to application needs, such as setting the cache size, expiration time, load factor, etc.; private hash caches are designed for specific applications or services and are not shared with other applications or services, which can better control the behavior and performance of the cache.
[0077] It is worth noting that when a session ends, the temporary data storage files in the private hash cache and the data information of the feature temporary tables corresponding to the temporary data storage files can be deleted, which can not only save the corresponding storage space, but also improve the confidentiality of the session, making the session process safer. For example, when a user consults insurance-related questions through the intelligent dialogue system, session data will be generated. When the user's consultation is over, the temporary data storage files in the private hash cache and the data information of the feature temporary tables corresponding to the temporary data storage files will be deleted, which effectively prevents other users from viewing the relevant session data and improves security.
[0078] In some embodiments, Figure 2 As shown, the above step S200 may include but is not limited to steps S210 to S230.
[0079] Step S210, performing tag extraction processing on the session data to obtain session tag information;
[0080] Step S220, obtaining a global object identifier by matching from the feature temporary table according to the session tag information;
[0081] Step S230: Generate a temporary data storage file according to the session tag information and the global object identifier.
[0082] It should be noted that in the process of constructing a temporary data storage file based on the session tag information carried by the session data and the global object identifier of the feature temporary table, the session tag information can be obtained by firstly extracting the tags of the session data; then the corresponding global object identifier can be obtained by matching from the feature temporary table according to the session tag information; finally, the temporary data storage file can be constructed according to the session tag information and the global object identifier, so as to make the prerequisite preparation for the subsequent session data storage.
[0083] It is worth noting that session tag information can be obtained by tagging and extracting session data. Each session data corresponds to a session tag information, and each session tag information is unique. For example, when a first user inquires about the type of insurance through the intelligent answering system, a first session data will be generated. When a second user inquires about the current exchange rate through the intelligent answering system, a second session data will be generated. The session tag information of the first session data is different from the session tag information of the second session data to distinguish different users.
[0084] It can be understood that in the process of obtaining the global object identifier from the feature temporary table according to the session tag information, the session tag information can be matched with the tag information carried by the feature temporary table, and since each tag information corresponds to a global object identifier, the global object identifier corresponding to the session tag information can be determined through the above matching operation, so as to prepare for the subsequent generation of temporary data storage files.
[0085] It is worth noting that when a temporary data storage file is generated based on the session tag information and the global object identifier, since the session tag information and the global object identifier are unique, the generated temporary data storage file will be unique, and only the corresponding session data can be stored in the temporary data storage file, making the storage process of each temporary session data more secure.
[0086] In some embodiments, Figure 3 As shown, the above step S500 may include but is not limited to step S510 to step S550.
[0087] Step S510, determining the session tag information corresponding to the session data;
[0088] Step S520, determining a corresponding temporary data storage file from the private hash cache according to the session tag information;
[0089] Step S530, determining a corresponding global object identifier according to the temporary data storage file;
[0090] Step S540, determining corresponding data information from the feature temporary table according to the global object identifier;
[0091] Step S550: Deleting the temporary data storage file and the corresponding data information in the feature temporary table.
[0092] It should be noted that in the process of deleting the temporary data storage file in the private hash cache and the data information of the feature temporary table corresponding to the temporary data storage file, the session tag information corresponding to the session data is first determined; then the corresponding temporary data storage file is determined from the private hash buffer according to the session tag information; then the corresponding global object identifier is determined according to the temporary data storage file; then the corresponding data information is determined from the feature temporary table according to the global object identifier; finally, the temporary data storage file and the corresponding data information in the feature temporary table can be deleted. Through the above technical solution, the deletion of session data can be more accurate, safe and reliable.
[0093] It is worth noting that in the process of deleting session data, the session tag information of the session data to be deleted must be determined first; then the corresponding temporary data storage file can be determined from the private hash cache based on the determined session tag information; then the corresponding global object identifier can be determined based on the temporary data storage file; then the corresponding data information can be determined from the feature temporary table based on the global object identifier, and then the corresponding data information can be deleted. It can be understood that there are multiple temporary data storage files in the private hash cache. According to the session tag information, the corresponding temporary data storage file can be determined from the private hash cache; then the corresponding global object identifier can be determined based on the temporary data storage file; then the corresponding data information can be determined from the feature temporary table based on the determined global object identifier; finally, the corresponding data information in the temporary data storage file and the feature temporary table can be deleted, so as to save storage space and improve security.
[0094] In some embodiments, Figure 4 As shown, the process of constructing the temporary feature table may include but is not limited to steps S110 to S140.
[0095] Step S110, obtaining a structure query statement;
[0096] Step S120, performing lexical and grammatical analysis on the structured query statement to generate a grammatical data structure tree;
[0097] Step S130, performing semantic analysis on the grammatical data structure tree to generate a semantic data structure tree;
[0098] Step S140: Generate a temporary feature table according to the grammatical data structure tree and the semantic data structure tree.
[0099] It should be noted that in the process of constructing the feature temporary table, the structure query statement is first obtained; then the structure query statement is subjected to lexical and grammatical analysis to generate a grammatical data structure tree; then the grammatical data structure tree is subjected to semantic analysis to generate a semantic data structure tree; finally, the feature temporary table can be generated based on the grammatical data structure tree and the semantic data structure tree. After the feature temporary table is determined to be obtained, the session data can be stored and processed based on the feature temporary table.
[0100] Exemplarily, in the process of constructing a feature temporary table, the specific workflow can be as follows: define the data structure (syntactic data structure, semantic data structure) for creating a feature temporary table; define the Structured Query Language (SQL) syntax for creating a feature temporary table, ensure that the syntax can recognize the defined SQL syntax, and write the results of the SQL syntax parsing into the syntax data structure tree of the feature table. Semantically analyze the syntax structure tree of the feature temporary table to generate a corresponding semantic data structure tree. The semantic analysis process mainly verifies whether there is ambiguity in the syntax structure tree generated by the SQL syntax, verifies whether the object exists correctly, etc. Store the feature temporary table information in the system table and mark it as a feature temporary table. At this time, there is no need to create a storage file for the feature table. The storage file will be created when the feature table is used. Based on the feature temporary table, the prerequisites for subsequent session processes can be prepared.
[0101] It is worth noting that the feature temporary table provides a common table structure that all sessions can use to write data into the table structure, avoiding the need to re-create and delete the temporary table when each session logs in or out.
[0102] In some embodiments, Figure 5 As shown, after executing step S500, it may also include but not limited to step S610 and step S620.
[0103] Step S610, modifying the information in the feature temporary table;
[0104] Step S620: broadcasting to each session according to the information in the modified feature temporary table, so that each session performs data update processing on the corresponding private hash cache according to the updated feature temporary table.
[0105] It should be noted that after deleting the temporary data storage file in the private hash cache and the data information of the feature temporary table corresponding to the temporary data storage file, the information in the feature temporary table can also be modified, and broadcast to each session based on the information in the modified feature temporary table, so that each session updates the data of the corresponding private hash cache according to the updated feature temporary table; through the above technical solution, when the information in the feature temporary table changes, other sessions can be informed by broadcasting, so that each session updates the data of the corresponding private hash cache according to the updated feature temporary table, so that the data update of the hash cache can be simpler, faster and more reliable.
[0106] Exemplarily, in the process of modifying a feature temporary table, the specific workflow may be as follows: define the grammatical structure (grammatical data structure, semantic data structure) for modifying the feature temporary table; define the SQL grammar for modifying the feature temporary table, ensure that the grammar can recognize the defined SQL grammar, and write the result of the SQL grammar parsing into the grammatical data structure tree of the feature table; semantically analyze the grammatical structure tree of the feature temporary table, which is not much different from the behavior of creating a feature temporary table; mainly check whether there is ambiguity in the grammatical structure tree generated by the SQL grammar, check whether the object exists correctly, etc.; modify the corresponding information of the feature temporary table in the system table; broadcast the invalidation information of the feature temporary table structure to other sessions, and other sessions promptly update their own private memory and synchronize the corresponding feature temporary table information in the broadcast.
[0107] In some embodiments, Figure 6 As shown, after executing step S500, it may also include but not limited to step S710 and step S720.
[0108] Step S710, deleting the information in the feature temporary table and the temporary data storage file corresponding to the feature temporary table, and generating data invalidation information;
[0109] Step S720: broadcast data expiration information to each session, so that each session deletes the information in the corresponding feature temporary table and the temporary data storage file according to the data expiration information.
[0110] It should be noted that after deleting the temporary data storage file in the private hash cache and the data information of the feature temporary table corresponding to the temporary data storage file, the information in the feature temporary table can also be deleted. First, the information in the feature temporary table and the temporary data storage file corresponding to the feature temporary table are deleted, and data invalidation information is generated; then the data invalidation information is broadcast to each session, so that each session can delete the information in the corresponding feature temporary table and the temporary data storage file according to the data invalidation information; through the above technical solution, when the information in the feature temporary table is deleted, other sessions can be informed by broadcasting, so that each session can delete the information in the corresponding feature temporary table and the temporary data storage file according to the data invalidation information, further making the data update of the hash cache simpler, faster and more reliable. The table structure of the feature temporary table is global. If the table structure changes, it will be sent to all sessions by broadcasting, and other sessions can be synchronized to the latest public feature temporary table structure in time.
[0111] Exemplarily, in the process of deleting a feature temporary table, the specific workflow may be as follows: define the grammatical structure (grammatical data structure, semantic data structure) for deleting the feature temporary table; define the SQL grammar for deleting the feature temporary table, ensure that the grammar can recognize the defined SQL grammar, and write the result of the SQL grammar parsing into the grammatical data structure tree of the feature table; semantically analyze the grammatical structure tree of the feature temporary table, mainly to verify whether there is ambiguity in the grammatical structure tree generated by the SQL grammar, and whether the object exists correctly, etc.; delete the information corresponding to the feature temporary table in the system table; the current session deletes the feature temporary table information from the private hash cache and deletes the storage file of the feature temporary table in the current session; broadcasts the invalidation information to other sessions, and other sessions receive the broadcast signal, delete the corresponding feature temporary table information in the broadcast from their own private hash cache, and delete the storage file of the feature temporary table in the current session.
[0112] In some embodiments, Figure 7 As shown, after executing step S100, the following steps may also include but are not limited to step S150 and step S160.
[0113] Step S150, performing permission analysis on the session data to obtain permission information;
[0114] Step S160: Determine, based on the permission information, whether the corresponding user has data access rights.
[0115] It should be noted that after receiving the session data, it is necessary to perform permission analysis on the session data to obtain permission information; then, based on the permission information, it can be determined whether the corresponding user has data access rights, and then the session tag information of the received session data can be analyzed and processed, thereby further improving the security of the session process.
[0116] For example, when a user consults an intelligent conversational robot about insurance-related business, session data will be generated, but the session data must first be analyzed and processed for permissions. Only when the obtained permission information indicates that the corresponding user has data access rights, the session tag information of the session data will be analyzed and processed to further improve the security of the session.
[0117] In addition, if Figure 8 As shown, an embodiment of the present application further provides a session data processing device 10, comprising:
[0118] A first processing module 100, configured to receive session data;
[0119] The second processing module 200 is used to construct a temporary data storage file according to the session tag information carried by the session data and the global object identifier of the temporary feature table when the storage file of the preset temporary feature table does not exist;
[0120] The third processing module 300 is used to write the information of the temporary data storage file and the feature temporary table into a preset private hash cache;
[0121] A fourth processing module 400 is used to write the session data into the feature temporary table of the private hash cache and the temporary data storage file;
[0122] The fifth processing module 500 is used to delete the temporary data storage file in the private hash cache and the data information of the feature temporary table corresponding to the temporary data storage file when the session ends.
[0123] It should be noted that, in the process of processing session data, the session data is first received, and then, when the storage file of the preset feature temporary table does not exist, a temporary data storage file is constructed according to the session tag information carried by the session data and the global object identifier of the feature temporary table; then the information of the temporary data storage file and the feature temporary table is written into the preset private hash cache; then the session data is written into the feature temporary table and the temporary data storage file of the private hash cache; finally, when the session ends, the temporary data storage file in the private hash cache and the data information of the feature temporary table corresponding to the temporary data storage file are deleted; through the above technical solution, the session data is stored based on the feature temporary table, and each session data will correspond to the corresponding global object identifier, so that different session data can be distinguished, which can improve the security of data access, thereby bringing a better user experience.
[0124] The specific implementation of the session data processing device 10 is substantially the same as the specific implementation of the above-mentioned session data processing method, and will not be described in detail herein.
[0125] In addition, if Fig. 9 As shown, an embodiment of the present application further provides an electronic device 700 , which includes: a memory 720 , a processor 710 , and a computer program stored in the memory 720 and executable on the processor 710 .
[0126] The processor 710 and the memory 720 may be connected via a bus or in other ways.
[0127] The non-transient software programs and instructions required to implement the session data processing methods of the above embodiments are stored in the memory 720 , and when executed by the processor 710 , the session data processing methods of the above embodiments are executed.
[0128] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0129] In addition, an embodiment of the present application further provides a computer-readable storage medium, which stores computer-executable instructions, and the computer-executable instructions are executed by a processor 710 or a controller, for example, by a processor 710 in the above-mentioned device embodiment, so that the above-mentioned processor 710 can execute the session data processing method in the above-mentioned embodiment.
[0130] The above embodiments may be used in combination, and modules with the same name in different embodiments may be the same or different.
[0131] The above describes specific embodiments of the present application, and other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily have to be performed in the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0132] Each embodiment in this application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, equipment, and computer-readable storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0133] The apparatus, device, computer-readable storage medium and method provided in the embodiments of the present application correspond to each other. Therefore, the apparatus, device and non-volatile computer storage medium also have similar beneficial technical effects as the corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the corresponding apparatus, device and computer storage medium will not be repeated here.
[0134] In the 1990s, it was very clear whether the improvement of a technology was hardware improvement (for example, improvement of the circuit structure of diodes, transistors, switches, etc.) or software improvement (improvement of the method flow). However, with the development of technology, many improvements of the method flow today can be regarded as direct improvements of the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that the improvement of a method flow cannot be implemented with a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask chip manufacturers to design and produce dedicated integrated circuit chips. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs. The original code before compilation must also be written in a specific programming language, which is called Hardware Description Language (HDL). There is not only one kind of HDL, but many kinds, such as ABEL (Advanced Basic Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCall, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used one is VHDL (Very-High-Speed Integrated Circuit Hardware Description Language). Those skilled in the art should also be aware that by programming the method flow in the above-mentioned hardware description languages and programming it into an integrated circuit, a hardware circuit for implementing the logic method flow can be easily obtained.
[0135] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicon Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the means for realizing various functions may be regarded as both a software module for realizing the method and a structure within a hardware component.
[0136] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0137] For the convenience of description, the above devices are described in terms of functions and are divided into various units. Of course, when implementing the embodiments of the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0138] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the embodiments of the present application may adopt the form of complete hardware embodiments, complete software embodiments, or embodiments in combination with software and hardware. Moreover, the embodiments of the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0139] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0140] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0141] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0142] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0143] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash memory (Flash RAM). The memory is an example of a computer-readable medium.
[0144] Computer readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (Transitory Med ia), such as modulated data signals and carrier waves.
[0145] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0146] In the embodiments of the present application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. Among them, A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can be represented by: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, c can be single or multiple.
[0147] Embodiments of the present application may be described in the general context of computer executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. Embodiments of the present application may also be practiced in distributed computing environments, where tasks are performed by remote processing devices connected via a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0148] Each embodiment in this application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0149] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A session data processing method, It is characterized in that The method comprises: Receive session data; In the case that the storage file of the preset feature temporary table does not exist, constructing a temporary data storage file according to the session tag information carried by the session data and the global object identifier of the feature temporary table; Writing the information of the temporary data storage file and the feature temporary table into a preset private hash cache; Writing the session data into the feature temporary table of the private hash cache and the temporary data storage file; When the session ends, the temporary data storage file in the private hash cache and the data information of the feature temporary table corresponding to the temporary data storage file are deleted.
2. The session data processing method according to claim 1, It is characterized in that The step of constructing a temporary data storage file according to the session tag information carried by the session data and the global object identifier of the feature temporary table includes: Performing tag extraction processing on the session data to obtain the session tag information; According to the session tag information, the global object identifier is obtained by matching from the feature temporary table; The temporary data storage file is generated according to the session tag information and the global object identifier.
3. The session data processing method according to claim 1, It is characterized in that Deleting the temporary data storage file in the private hash cache and data information of the feature temporary table corresponding to the temporary data storage file includes: Determining the session tag information corresponding to the session data; Determine the corresponding temporary data storage file from the private hash cache according to the session tag information; Determine the corresponding global object identifier according to the temporary data storage file; Determine corresponding data information from the feature temporary table according to the global object identifier; The temporary data storage file and the corresponding data information in the feature temporary table are deleted.
4. The session data processing method according to claim 1, It is characterized in that The feature temporary table is obtained in the following way: Get the structure query statement; Performing lexical and grammatical analysis on the structured query statement to generate a grammatical data structure tree; Performing semantic analysis on the grammatical data structure tree to generate a semantic data structure tree; The feature temporary table is generated according to the grammatical data structure tree and the semantic data structure tree.
5. The session data processing method according to claim 1, It is characterized in that After deleting the temporary data storage file in the private hash cache and the data information of the feature temporary table corresponding to the temporary data storage file, the method further includes: Modify the information in the characteristic temporary table; The modified information in the temporary feature table is broadcast to each session, so that each session performs data update processing on the corresponding private hash cache according to the updated temporary feature table.
6. The session data processing method according to claim 1, It is characterized in that After deleting the temporary data storage file in the private hash cache and the data information of the feature temporary table corresponding to the temporary data storage file, the method further includes: Deleting the information in the feature temporary table and the temporary data storage file corresponding to the feature temporary table, and generating data invalidation information; The data invalidation information is broadcasted to each session, so that each session deletes the information in the corresponding feature temporary table and the temporary data storage file according to the data invalidation information.
7. The session data processing method according to claim 1, It is characterized in that After receiving the session data, the method further includes: Performing permission analysis on the session data to obtain permission information; It is determined based on the permission information that the corresponding user has the data access permission.
8. A session data processing device, It is characterized in that include: A first processing module, configured to receive session data; A second processing module is used to construct a temporary data storage file according to the session tag information carried by the session data and the global object identifier of the temporary feature table when the storage file of the preset temporary feature table does not exist; A third processing module, used for writing the information of the temporary data storage file and the feature temporary table into a preset private hash cache; A fourth processing module, configured to write the session data into the feature temporary table of the private hash cache and the temporary data storage file; The fifth processing module is used to delete the temporary data storage file in the private hash cache and the data information of the feature temporary table corresponding to the temporary data storage file when the session ends.
9. An electronic device, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the session data processing method as described in any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing computer-executable instructions, It is characterized in that The computer executable instructions are used to execute the session data processing method described in any one of claims 1 to 7.
Citation Information
Cited By
Data processing method and device based on global index, computer equipment and readable storage medium
CN121542271A
