Business data processing method, device and server
By using the target session identifier and a shared cache database in the server of the business processing system, the user's interaction interruption problem caused by network interruption is solved, efficient business data processing is achieved, user experience is improved and server storage burden is reduced.
Patent Information
- Application Number
- CN202210954429.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-10
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2042-08-10
AI Technical Summary
In the business processing system, when the user interacts with the server with data, the interaction is interrupted due to network interruption and other reasons. When reconnecting to the system, the interaction process needs to be repeated, which increases the waiting time of the user and affects the interactive experience.
By introducing a target session identifier into the server of the service processing system, it detects whether the request carries the identifier. If it exists, query the local session data record. If it does not exist, synchronize the session data through the shared cache database, and obtain the synchronized local session data record for business data processing.
It realizes that when the user reconnects to the system, the server can directly obtain and utilize the session data in the previous interaction process, avoid repeated interaction processes, improve processing efficiency, shorten the user's waiting time, improve the interactive experience, and reduce the local storage burden of the server.
Smart Images

Figure CN115334163B_ABST
Abstract
Description
Technical Field
[0001] This specification belongs to the field of big data technology, and in particular, relates to business data processing methods, devices and servers. Background Art
[0002] In the field of big data technology, the business processing system responsible for business data processing often includes multiple servers. Usually, when a user needs to process business data through the business processing system, the business processing system will assign one of the servers to connect with the user. The server can first interact with the user for business-related data to obtain the required session data; then perform specific business data processing based on the above session data.
[0003] However, in the process of data interaction between the server and the user, the interaction between the user and the server may be interrupted due to reasons such as network interruption. When the user reconnects to the business processing system, the business processing system may assign a new server to connect with the user. At this time, based on the existing method, the new server needs to interact with the user again and reacquire the session data before it can perform subsequent business data processing. In this way, the user needs to repeat the interaction process that has been carried out before; at the same time, it also increases the user's waiting time, affecting the user's interactive experience.
[0004] To address the above problems, no effective solution has been proposed yet. Summary of the invention
[0005] This specification provides a business data processing method, device and server, which can improve the overall processing efficiency, shorten the waiting time of the target user, and enable the target user to obtain a relatively good interactive experience; on the other hand, it can also effectively reduce the local storage burden of the server.
[0006] This specification provides a business data processing method, which is applied to a server in a business processing system. The business processing system includes a server cluster and a shared cache database. The method includes:
[0007] Receiving a target service data processing request initiated by a target terminal;
[0008] Detecting whether the target service data processing request carries a target session identifier; wherein the target session identifier is used to indicate the target session data in the last unfinished interaction process between the target terminal and the service processing system;
[0009] When it is determined that the target service data processing request carries a target session identifier, querying the local session data record according to the target session identifier;
[0010] When it is determined that the target session identifier does not exist in the local session data record, the session data is synchronized with the shared cache database according to a preset synchronization rule to obtain a synchronized local session data record;
[0011] Perform corresponding business data processing based on the synchronized local session data records.
[0012] In one embodiment, the local session data record includes one or more session data; wherein the session data respectively corresponds to a session identifier.
[0013] In one embodiment, the session data further includes session time.
[0014] In one embodiment, in the process of processing the target service data processing request according to the synchronized local session data record, the method further includes: storing the relevant session data involved in the processing into the local session data record according to the target session identifier.
[0015] In one embodiment, the method further comprises:
[0016] At every preset first time interval, according to the session time of the session data, detecting whether there is first invalid session data whose storage time exceeds the first valid time length in the current local session data record;
[0017] When it is determined that the first invalid session data exists in the current local session data record, the first invalid session data is deleted from the current local session data record.
[0018] In one embodiment, the method further comprises:
[0019] At every preset second time interval, the current local session data record is uploaded to the shared cache database to update the session data stored in the shared cache database.
[0020] In one embodiment, while uploading the current local session data record to the shared cache database, the method further includes:
[0021] Accessing the shared cache database, and detecting, based on the session time of the session data, whether there is second invalid session data in the current shared cache database whose storage time exceeds the second valid time length;
[0022] When it is determined that the second invalidated session data exists in the current shared cache database, the second invalidated session data is deleted from the current shared cache database.
[0023] In one embodiment, the session data also carries a status tag for indicating whether the interaction process is finished.
[0024] In one embodiment, the method further comprises:
[0025] At every preset second time interval, the session data with a status tag of "unfinished" in the current local session data record is uploaded to the shared cache database to update the session data stored in the shared cache database.
[0026] In one embodiment, after detecting whether the target service data processing request carries the target session identifier, the method further includes:
[0027] If it is determined that the target service data processing request does not carry a target session identifier, generating a target session identifier; and providing the target session identifier to the target terminal;
[0028] Interact with the target terminal to obtain relevant session data; and store the session data in a local session data record according to the target session identifier;
[0029] Perform corresponding business data processing based on session data.
[0030] In one embodiment, after querying the local session data record according to the target session identifier, the method further includes:
[0031] When it is determined that the target session identifier exists in the local session data record, corresponding business data processing is performed according to the local session data record.
[0032] This specification also provides a service data processing method, which is applied to a target terminal, including:
[0033] When a trigger operation initiated by a target user is detected, detecting whether the last interaction process with the business processing system is completed;
[0034] When it is determined that the last interaction process with the business processing system has not ended, obtaining a target session identifier indicating target session data in the last interaction process;
[0035] In response to the trigger operation, a target business data processing request carrying a target session identifier is generated;
[0036] Send the target business data processing request to the business processing system.
[0037] This specification also provides a business data processing device, which is applied to a server in a business processing system, wherein the business processing system includes a server cluster and a shared cache database, and the device includes:
[0038] A receiving module, used for receiving a target service data processing request initiated by a target terminal;
[0039] A detection module, used to detect whether the target service data processing request carries a target session identifier; wherein the target session identifier is used to indicate the target session data in the last unfinished interaction process between the target terminal and the service processing system;
[0040] A query module, configured to query the local session data record according to the target session identifier when it is determined that the target business data processing request carries the target session identifier;
[0041] A synchronization module, for obtaining a synchronized local session data record by synchronizing the session data with the shared cache database according to a preset synchronization rule when it is determined that the target session identifier does not exist in the local session data record;
[0042] The processing module is used to perform corresponding business data processing according to the synchronized local session data records.
[0043] The present specification also provides a server, comprising a processor and a memory for storing processor executable instructions, wherein the processor implements relevant steps of the business data processing method when executing the instructions.
[0044] The present specification also provides a computer-readable storage medium on which computer instructions are stored. When the instructions are executed by a processor, the relevant steps of the business data processing method are implemented.
[0045] Based on the business data processing method, device and server provided in this specification, after receiving the target business data processing request initiated by the target user through the target terminal, the business processing system can distribute the target business data processing request to the server in the server cluster of the business processing system that currently meets the requirements for processing. After receiving the target business data processing request, the server can first detect whether the target business data processing request carries a target session identifier; wherein the target session identifier is used to indicate the target session data of the target terminal in the last unfinished interaction process with the business processing system; when it is determined that the target business data processing request carries the target session identifier, query the local session data record according to the target session identifier; when it is determined that the target session identifier does not exist in the local session data record, then according to the preset synchronization rules, synchronize the session data with the shared cache database to obtain the synchronized local session data record; and then perform corresponding business data processing according to the synchronized local session data record. As a result, the server newly connected to the target terminal in the business processing system can completely obtain and utilize the target session data already existing in the target terminal's last unfinished interaction process with the business processing system, and continue to process the corresponding business data based on the last unfinished interaction process. There is no need for the target user to repeat the interaction process that has been carried out in the last interaction process, which improves the overall processing efficiency, shortens the waiting time of the target user, and enables the target user to obtain a relatively good interaction experience. At the same time, since a shared cache database is introduced and used in the business processing system to cache the session data of each server, the local storage burden of the server can also be effectively reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the embodiments of this specification, the drawings required for use in the embodiments will be briefly introduced below. The drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0047] Figure 1 It is a flowchart of a business data processing method provided by an embodiment of this specification;
[0048] Figure 2 It is a schematic diagram of an embodiment of a business data processing method provided by an embodiment of this specification, in a scenario example;
[0049] Figure 3 It is a schematic diagram of an embodiment of a business data processing method provided by an embodiment of this specification, in a scenario example;
[0050] Figure 4It is a schematic diagram of an embodiment of a business data processing method provided by an embodiment of this specification, in a scenario example;
[0051] Figure 5 It is a flowchart of a business data processing method provided by an embodiment of this specification;
[0052] Figure 6 It is a schematic diagram of the structure of a server provided by an embodiment of this specification;
[0053] Figure 7 It is a schematic diagram of the structure of a business data processing device provided by an embodiment of this specification;
[0054] Figure 8 It is a schematic diagram of the structural composition of a business data processing device provided by an embodiment of this specification. DETAILED DESCRIPTION
[0055] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.
[0056] See also Figure 1 As shown, the embodiment of this specification provides a business data processing method, wherein the method is specifically applied to the server side of a business processing system, and the business processing system includes a server cluster and a shared cache database. When implemented specifically, the method may include the following contents:
[0057] S101: receiving a target service data processing request initiated by a target terminal;
[0058] S102: Detect whether the target service data processing request carries a target session identifier; wherein the target session identifier is used to indicate the target session data in the last unfinished interaction process between the target terminal and the service processing system;
[0059] S103: When it is determined that the target service data processing request carries a target session identifier, query the local session data record according to the target session identifier;
[0060] S104: When it is determined that the target session identifier does not exist in the local session data record, synchronize the session data with the shared cache database according to a preset synchronization rule to obtain a synchronized local session data record;
[0061] S105: Perform corresponding business data processing according to the synchronized local session data record.
[0062] Based on the above embodiments, the server newly connected to the target terminal in the business processing system can completely obtain and utilize the target session data that the target terminal already has in the last unfinished interaction process with the business processing system, and continue to process the corresponding business data based on the last unfinished interaction process. There is no need for the target user to repeat the interaction process that has been carried out in the last interaction process, which improves the overall processing efficiency, shortens the waiting time of the target user, and enables the target user to obtain a relatively good interaction experience; at the same time, because a shared cache database is introduced and used in the business processing system to cache the session data of each server, the local storage burden of the server is also effectively reduced.
[0063] In some embodiments, specifically, see Figure 2 As shown. The above-mentioned business processing system may at least include a server cluster and a shared cache database (or cache device). The server cluster may specifically include multiple servers (or distributed nodes), for example, a first server, a second server, a third server...the Nth server, etc. Each of the multiple servers may be connected to the shared cache database by wire or wireless means to jointly manage and maintain the shared cache database. The shared cache database may be used to cache session data generated by the user during the interaction with the business processing system. Each of the multiple servers is also locally configured with a local session data record (a server-local cache device, for example, local session data) with a relatively small storage capacity, which is used to cache the session data generated by the server during the interaction with the docked user.
[0064] For further information, see Figure 2 As shown, the above-mentioned business processing system also includes a routing module (or a gateway module). Specifically, when the target user initiates a target business data processing request to the business processing system through the target terminal held by the target user, the target business data processing request will first reach the routing module. The routing module will determine the server that currently meets the requirements (for example, the server whose current remaining available processing resources are greater than the preset security resource threshold) according to the operating status of each server in the current server cluster; and distribute the target business data processing request to the server (for example, the first server) for processing. Accordingly, the first server in the business processing system can subsequently be specifically connected to the target terminal. The first server interacts with the target terminal through relevant data, and after obtaining the required complete session data, it completes specific business data processing according to the session data.
[0065] Among them, the above-mentioned server may specifically include a background server applied to one side of the business processing system, which can realize functions such as data transmission and data processing. Specifically, the server may be, for example, an electronic device with data calculation, storage and network interaction functions. Alternatively, the server may also be a software program running in the electronic device to provide support for data processing, storage and network interaction. In this embodiment, the number of the servers is not specifically limited. The server may specifically be one server, or several servers, or a server cluster formed by several servers.
[0066] The target terminal may specifically include a front end applied to the target user side and capable of realizing functions such as data collection and data transmission. Specifically, the target terminal may be, for example, an electronic device such as a desktop computer, a tablet computer, a laptop computer, a smart phone, etc. Alternatively, the target terminal may also be a software application that can be run in the above electronic devices. For example, it may be an APP running on a smart phone.
[0067] During the process of data interaction between the first server and the target terminal, the interaction process may be suddenly interrupted before completion due to some reasons (e.g., poor network signal of the target terminal, IP drift, etc.). In this case, when the target terminal resends the target service data processing request and reconnects to the service processing system, the routing module will re-determine a new server (e.g., the second server) from the server cluster to connect with the target terminal.
[0068] Based on the existing method, after the interaction is interrupted, the server connected to the target terminal is changed to the second server, and the second server has not interacted with the target terminal before, and the session data obtained in the previous interaction process is not cached locally on the second server. In this case, the second server needs to interact with the target terminal from the beginning to obtain the required session data from the beginning, which will inevitably increase the waiting time of the target user and affect the target user's interaction experience.
[0069] Based on this method, when the target terminal reconnects to the business system, the target business data processing request resent can carry the target session identifier of the target session data in the previous unfinished interaction process. After the second server is connected to the target terminal, it can first detect the local session data record according to the target session identifier; when it is determined that the local session data record does not have the target session identifier and the relevant target session data is not cached, the session data can be synchronized with the shared cache data to obtain the synchronized local session data record; then, according to the synchronized local session data record, the target business data that existed in the previous interaction process between the target terminal and the first server can be obtained; further, the target business data can be used as the interaction starting point to continue the unfinished data interaction between the target terminal and the first server. In this way, there is no need for the target user to repeat the interaction process that has been carried out in the previous interaction process, which shortens the waiting time of the target user, so that the target user can obtain a relatively good interaction experience.
[0070] In some embodiments, corresponding to different application scenarios, the above-mentioned business data processing requests may include different types of business data processing requests. Accordingly, the data interaction processes involved may also include different types of interaction processes, the session data involved, and the final business data processing may include different types of session data, as well as different types of business data processing.
[0071] Specifically, for example, the above-mentioned target business data processing request may specifically include an account registration request. Accordingly, the data interaction process involved may include the interaction process of the user's identity information (for example, the interaction process of determining the user's name and account name), and the interaction process of the user's custom data (for example, the interaction process of determining the user's interests, hobbies, and personality tags). Accordingly, the required session data may include the user's identity information determined by the interaction process of the identity information, and the user's custom data determined by the interaction process of the definition data. Business data processing may specifically include the target user's account registration processing.
[0072] For another example, the above-mentioned target business data processing request may also include a transaction request. Accordingly, the data interaction process involved may include the user's payment order interaction process (for example, the interaction process of determining the commodity object purchased by the user, the purchase price of the commodity object, and the purchase quantity), and the user's payment verification interaction process (for example, the interaction process of receiving the user's confirmation payment instruction, receiving and verifying the user's payment voucher), etc. Accordingly, the required session data includes the payment order determined through the payment order interaction process, and the confirmation payment instruction and payment voucher obtained through the payment verification interaction process. Business data processing may specifically include settlement processing of payment orders.
[0073] It should be noted that the application scenarios, business data processing requests, data interaction processes, session data, and business data processing listed above are only schematic illustrations. In specific implementation, the business data processing method provided in this specification can be applied to other application scenarios. Accordingly, the above-mentioned business data processing requests, data interaction processes, session data, and business data processing can also include other types of business data processing requests, data interaction processes, session data, and business data processing. This specification does not limit this.
[0074] It should also be noted that the information data related to users involved in this manual are all information data obtained and used with the knowledge and consent of the users. In addition, the acquisition, storage, use and processing of the above information data are in compliance with the relevant provisions of national laws and regulations.
[0075] In some embodiments, for the target terminal, during specific implementation, it can be detected whether a trigger operation on business data processing initiated by the target user is received; when the above trigger operation is detected, the target terminal can detect whether the most recent last interaction process with the business processing system has ended. When it is determined that the last interaction process has ended and there is no interruption, a target business data processing request that does not carry a session identifier can be generated and sent. On the contrary, when it is determined that the last interaction process has not ended and there is an interruption, the target session identifier provided by the server connected during the last interaction process can be queried, and then a target business data processing request carrying at least the target session identifier can be generated and sent.
[0076] The target session identifier can be specifically understood as identification information for indicating the target session data in the last unfinished interaction process of the target terminal in the business processing. Specifically, the target session identifier can be a session fingerprint corresponding to the target session data. Of course, the target session identifier can also be identification information associated with the identification information of the target terminal (for example, the MAC address, IP address, etc. of the target terminal).
[0077] In some embodiments, the local session data record includes one or more session data; wherein the session data respectively corresponds to a session identifier.
[0078] Based on the above embodiments, the server can timely store the session data generated by the server during the interaction with the terminal by using the local session data record with relatively small storage burden.
[0079] In some embodiments, the session data further includes session time.
[0080] Specifically, when the server stores the session data in the local session data record, it may also add a corresponding timestamp to the stored session data according to the session time to indicate the session time of the session data.
[0081] Based on the above embodiment, the server may store the session data and the session time of the session data in a local session data record to facilitate subsequent data processing.
[0082] In some embodiments, the local session data record may be a storage structure set in a local cache module of the server. In order to reduce the storage burden on the server, the storage capacity of the local session data record may be set to be relatively small.
[0083] In some embodiments, when it is determined that the target session identifier does not exist in the local session data record, the above-mentioned method of synchronizing the session data with the shared cache database according to the preset synchronization rules to obtain the synchronized local session data record may include: obtaining the full session data currently stored in the shared cache database according to the preset synchronization rules; and then obtaining the synchronized local session data record by combining the full session data currently stored in the shared cache database and the existing session data in the local session data record.
[0084] In order to reduce the storage burden on the local server, the specific implementation may also include: according to a preset synchronization rule, obtaining the target session data currently stored in the shared cache database that matches the target session identifier; and then storing the target session data in the local session data record to obtain a synchronized local session data record.
[0085] In some embodiments, see Figure 3 As shown, the above-mentioned corresponding business data processing is performed according to the synchronized local session data record. When it is implemented specifically, it may include the following contents:
[0086] S1: According to the target session identifier, obtain the target session data from the synchronized local session data record;
[0087] S2: Process the request based on the target business data and check whether the target session data is complete;
[0088] S3-1: When it is determined that the target session data is complete, the target service data processing request can be directly responded to according to the target session data, and corresponding service data processing can be performed;
[0089] S3-2: When it is determined that the target session data is incomplete, the target session data may be used as an interaction starting point to perform supplementary interaction with the target terminal to obtain supplementary session data in the supplementary interaction process; and the supplementary session data may be stored in the local session data record according to the target session identifier;
[0090] S4: combining the target session data and the supplementary session data to obtain complete session data for the target business data processing request;
[0091] S5: According to the complete session data, respond to the target business data processing request and perform corresponding business data processing.
[0092] This makes it possible to respond to target business data processing requests more efficiently and complete corresponding business data processing.
[0093] In some embodiments, in the process of processing a target business data processing request according to the synchronized local session data record, the method may also include: storing relevant session data involved in the processing process into the local session data record according to the target session identifier.
[0094] Based on the above embodiment, the server can store the acquired session data in a local session data record in a timely manner during the interaction with the target terminal, so as to facilitate subsequent use.
[0095] In some embodiments, the method may further include the following when implemented:
[0096] S1: at every preset first time interval, according to the session time of the session data, detecting whether there is first invalid session data whose storage time exceeds the first valid time length in the current local session data record;
[0097] S2: When it is determined that the first invalid session data exists in the current local session data record, the first invalid session data is deleted from the current local session data record.
[0098] The preset first time interval may be 4 minutes. The first effective duration may be a relatively short duration threshold, for example, 5 minutes. The storage time may be the difference between the current time and the session time.
[0099] Based on the above embodiment, the server can timely clear the expired first invalid session data in the local session data record at every preset first time interval according to the first valid duration and the session time, thereby further reducing the local storage burden on the server.
[0100] In some embodiments, when the method is implemented, it may further include the following: uploading the current local session data record to the shared cache database at every preset second time interval to update the session data stored in the shared cache database.
[0101] The preset second time interval may be 4 minutes.
[0102] In specific implementation, after uploading the server's current local session data record to the shared cache database, the server can also update the session data stored in the shared cache database in the following manner: according to the session identifier, merge the session data with the same session identifier in the shared cache database to obtain merged session data; perform content analysis on the merged session data, and delete duplicate content data in the merged session data based on the content analysis results.
[0103] Based on the above embodiment, each server in the cluster can periodically upload the server's current local session data records to the shared cache database, and timely update the session data stored in the shared cache database, so that the shared cache database can better store the full amount of session data within the current time period of the business processing system.
[0104] In some embodiments, while uploading the current local session data record to the shared cache database, the method may also include the following when implemented:
[0105] S1: accessing the shared cache database, and detecting, based on the session time of the session data, whether there is second invalid session data in the current shared cache database whose storage time exceeds the second valid time length;
[0106] S2: When it is determined that the second invalidated session data exists in the current shared cache database, the second invalidated session data is deleted from the current shared cache database.
[0107] The second effective duration may be a relatively long duration threshold, for example, 15 minutes. The second effective duration is greater than or equal to the first effective duration.
[0108] Based on the above embodiment, while uploading the local session data record, the server can promptly clear the second invalid session data that has expired in the shared cache database according to the second valid duration and the session time to ensure that the shared cache database has appropriate storage space and can continue to store new session data; in addition, since the second valid duration for the shared cache database is set to be greater than the first valid duration for the local session data record of the server, the storage advantage of the shared cache database can also be effectively utilized to store relatively more and more complete session data to further reduce the local storage burden of the server.
[0109] In some embodiments, the server may be configured to automatically detect whether the local session data record is updated, and upload the local session data record to the shared cache database if the local session data record is updated. The server may also be configured to automatically detect whether there is first invalidated session data to be deleted in the local session data record; if it is determined that there is first invalidated session data, first upload the local session data record before deleting the first invalidated session data to the shared cache database.
[0110] In some embodiments, the session data may also carry a status tag for indicating whether the interaction process is finished. The status tag may be understood as a status tag of an interaction process related to the target session data.
[0111] Based on the above embodiment, a state tag of the interaction process corresponding to the session data may be added to the stored session data to characterize the actual state of the interaction process so that related data processing can be completed more accurately later.
[0112] In some embodiments, the method may also include the following when implemented: at every preset second time interval, uploading the session data with a status tag of "unfinished" in the current local session data record to the shared cache database to update the session data stored in the shared cache database.
[0113] Based on the above embodiment, each time the server uploads session data, it can distinguish session data of interaction processes in different states according to the status tag in the session data, and only upload session data with a status tag of unfinished to the shared cache database, thereby effectively reducing the data storage burden of the shared cache database.
[0114] Furthermore, the server may also detect the status tags of the session data stored in the current local session data record at every preset first time interval, and delete the session data with the status tag indicating that it has been ended in a timely manner.
[0115] In some embodiments, see Figure 4 As shown, after detecting whether the target service data processing request carries the target session identifier, the method may further include the following contents when implemented:
[0116] S1: when it is determined that the target service data processing request does not carry a target session identifier, generate a target session identifier; and provide the target session identifier to a target terminal;
[0117] S2: interact with the target terminal to obtain relevant session data; and store the session data in the local session data record according to the target session identifier;
[0118] S3: Perform corresponding business data processing based on the session data.
[0119] In specific implementation, the server may use a preset random number generator to generate a random number corresponding to the target service data processing request as a target session identifier according to the reception time or request number of the target service data processing request and / or the identification information of the target terminal.
[0120] In a specific implementation, before generating a target session identifier and starting to interact with the target terminal, the server may generate and send a session request to the target terminal; wherein the session request may carry the target session identifier. Accordingly, the target terminal may obtain the target session identifier. Specifically, the target terminal may store the target session identifier in local cookie data.
[0121] In specific implementation, during the interaction with the target terminal, the server may first add a record area with the target session identifier as the record identifier in the local session data record according to the target session identifier; and then record the real-time acquired or updated session data in the record area.
[0122] Based on the above embodiment, the server can automatically generate a corresponding target session identifier during the interaction with the target terminal, and timely record the session data generated in real time during the interaction in the local session data record according to the target session identifier.
[0123] In some embodiments, after querying the local session data record according to the target session identifier, the method may also include the following content when it is implemented: when it is determined that the target session identifier exists in the local session data record, performing corresponding business data processing according to the local session data record.
[0124] Based on the above embodiment, when the target session identifier exists in the local session data record, the target session data in the local session data record can be directly acquired and used to efficiently complete the corresponding business data processing.
[0125] In some embodiments, the above-mentioned corresponding business data processing according to the local session data record may include: obtaining the target session data according to the local session data record; detecting whether the target session data is complete according to the target business data processing request; if the target session data is determined to be complete, responding to the target business data processing request according to the target session data and performing corresponding business data processing. If the target session data is determined to be incomplete, using the target session data as the interaction starting point, supplementary interaction is performed with the target terminal to obtain supplementary session data; and storing the supplementary session data in the local session data record according to the target session identifier; combining the target session data and the supplementary session data to obtain complete session data for the target business data processing request; responding to the target business data processing request according to the complete session data and performing corresponding business data processing.
[0126] In some embodiments, the shared cache database may specifically include a distributed database based on blockchain. In this way, the shared cache database may be used to store session data in the interaction process more securely and reliably, thereby preventing the relevant session data from being tampered with, and effectively ensuring the security and reliability of the stored session data.
[0127] In some embodiments, after performing corresponding business data processing according to the local session data record, the method further includes: obtaining a target business data processing result; and sending the target business data processing result to a target terminal.
[0128] As can be seen from the above, in the business data processing method provided by the embodiment of this specification, after the business processing system receives the target business data processing request initiated by the target user through the target terminal, the target business data processing request can be distributed to the server that currently meets the requirements in the server cluster for processing. After receiving the target business data processing request, the server first detects whether the target business data processing request carries a target session identifier; wherein the target session identifier is used to indicate the target session data of the target terminal in the last unfinished interaction process with the business processing system; when it is determined that the target business data processing request carries the target session identifier, the local session data record is queried according to the target session identifier; when it is determined that the target session identifier does not exist in the local session data record, according to the preset synchronization rules, the session data is synchronized with the shared cache database to obtain the synchronized local session data record; according to the synchronized local session data record, the corresponding business data processing is performed. As a result, the server newly connected to the target terminal in the business processing system can completely obtain and utilize the target session data already existing in the target terminal's last unfinished interaction process with the business processing system, and continue to process the corresponding business data based on the last unfinished interaction process. There is no need for the target user to repeat the interaction process that has been carried out in the last interaction process, which improves the overall processing efficiency, shortens the waiting time of the target user, and enables the target user to obtain a relatively good interaction experience. At the same time, since a shared cache database is introduced and used in the business processing system to cache the session data of each server, the local storage burden of the server is also effectively reduced.
[0129] See also Figure 5 As shown, the embodiment of this specification also provides a service data processing method. Wherein, the method is applied to the target terminal side, and when implemented specifically, it may include the following contents:
[0130] S501: When a trigger operation initiated by a target user is detected, detecting whether the last interaction process with the business processing system is completed;
[0131] S502: When it is determined that the last interaction process with the business processing system has not ended, obtain a target session identifier indicating target session data in the last interaction process;
[0132] S503: In response to the trigger operation, a target service data processing request carrying a target session identifier is generated;
[0133] S504: Send the target business data processing request to the business processing system.
[0134] The trigger operation may be specifically understood as an operation initiated by the target user on the target terminal to instruct the target service data to be processed. For example, the target user clicks on a related service item icon displayed on the target terminal.
[0135] In specific implementation, when it is determined that the last interaction process with the service processing system has ended, the target terminal may generate a target service data processing request that does not carry a session identifier, and send the target service data processing request to the service processing system.
[0136] Based on the above embodiments, the target terminal can cooperate well with the server of the business processing system, so that the server newly connected to the target terminal in the business processing system can completely obtain and utilize the target session data that the target terminal already has in the last unfinished interaction process with the business processing system, and continue to process the corresponding business data based on the last unfinished interaction process. There is no need for the target user to repeat the interaction process that has been carried out in the last interaction process, which improves the overall processing efficiency, shortens the waiting time of the target user, and enables the target user to obtain a relatively good interaction experience; at the same time, because a shared cache database is introduced and used in the business processing system to cache the session data of each server, the local storage burden of the server is also effectively reduced.
[0137] The embodiment of the present specification also provides a server, including a processor and a memory for storing processor executable instructions, and the processor can perform the following steps according to the instructions when it is implemented: receiving a target business data processing request initiated by a target terminal; detecting whether the target business data processing request carries a target session identifier; wherein the target session identifier is used to indicate the target session data of the target terminal in the last unfinished interaction process with the business processing system; when it is determined that the target business data processing request carries the target session identifier, querying the local session data record according to the target session identifier; when it is determined that the target session identifier does not exist in the local session data record, according to a preset synchronization rule, synchronizing the session data with the shared cache database to obtain a synchronized local session data record; and performing corresponding business data processing according to the synchronized local session data record.
[0138] In order to complete the above instructions more accurately, refer to Figure 6 As shown, the embodiment of this specification also provides another specific server, wherein the server includes a network communication port 601, a processor 602 and a memory 603, and the above structures are connected through internal cables so that each structure can perform specific data interaction.
[0139] The network communication port 601 may be specifically used to receive a target service data processing request initiated by a target terminal.
[0140] The processor 602 can be specifically used to detect whether the target business data processing request carries a target session identifier; wherein the target session identifier is used to indicate the target session data of the target terminal in the last unfinished interaction process with the business processing system; when it is determined that the target business data processing request carries the target session identifier, query the local session data record according to the target session identifier; when it is determined that the target session identifier does not exist in the local session data record, according to the preset synchronization rule, synchronize the session data with the shared cache database to obtain the synchronized local session data record; and perform corresponding business data processing according to the synchronized local session data record.
[0141] The memory 603 may be specifically used to store corresponding instruction programs.
[0142] In this embodiment, the network communication port 601 can be a virtual port that is bound to different communication protocols so that different data can be sent or received. For example, the network communication port can be a port responsible for web data communication, a port responsible for FTP data communication, or a port responsible for email data communication. In addition, the network communication port can also be a physical communication interface or communication chip. For example, it can be a wireless mobile network communication chip, such as GSM, CDMA, etc.; it can also be a Wifi chip; it can also be a Bluetooth chip.
[0143] In this embodiment, the processor 602 may be implemented in any appropriate manner. For example, the processor may take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) executable by the (micro)processor, a logic gate, a switch, an application specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller, etc. This specification does not limit this.
[0144] In this embodiment, the memory 603 may include multiple levels. In a digital system, anything that can store binary data can be a memory; in an integrated circuit, a circuit with a storage function but no physical form is also called a memory, such as RAM, FIFO, etc.; in a system, a storage device with a physical form is also called a memory, such as a memory stick, TF card, etc.
[0145] The embodiment of the present specification also provides a target terminal, including a processor and a memory for storing processor executable instructions. When the processor is implemented, it can perform the following steps according to the instructions: when a trigger operation initiated by a target user is detected, detect whether the last interaction process with the business processing system is completed; when it is determined that the last interaction process with the business processing system is not completed, obtain a target session identifier indicating the target session data in the last interaction process; in response to the trigger operation, generate a target business data processing request carrying the target session identifier; and send the target business data processing request to the business processing system.
[0146] The embodiment of the present specification also provides a computer-readable storage medium based on the above-mentioned business data processing method, wherein the computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed, the following are achieved: receiving a target business data processing request initiated by a target terminal; detecting whether the target business data processing request carries a target session identifier; wherein the target session identifier is used to indicate the target session data of the target terminal in the last unfinished interaction process with the business processing system; when it is determined that the target business data processing request carries the target session identifier, querying the local session data record according to the target session identifier; when it is determined that the target session identifier does not exist in the local session data record, according to a preset synchronization rule, synchronizing the session data with the shared cache database to obtain a synchronized local session data record; and performing corresponding business data processing according to the synchronized local session data record.
[0147] The embodiments of this specification also provide another computer-readable storage medium based on the above-mentioned business data processing method, wherein the computer-readable storage medium stores computer program instructions, which, when executed, achieve: when a trigger operation initiated by a target user is detected, detect whether the last interaction process with the business processing system has ended; when it is determined that the last interaction process with the business processing system has not ended, obtain a target session identifier indicating the target session data in the last interaction process; in response to the trigger operation, generate a target business data processing request carrying the target session identifier; and send the target business data processing request to the business processing system.
[0148] In this embodiment, the storage medium includes, but is not limited to, a random access memory (RAM), a read-only memory (ROM), a cache, a hard disk (HDD), or a memory card. The memory may be used to store computer program instructions. The network communication unit may be an interface for network connection communication set in accordance with the standard specified by the communication protocol.
[0149] In this embodiment, the functions and effects specifically implemented by the program instructions stored in the computer-readable storage medium can be explained in comparison with other implementations and will not be described in detail here.
[0150] See also Figure 7 As shown, at the software level, the embodiment of this specification also provides a business data processing device, which may specifically include the following structural modules:
[0151] The receiving module 701 may be specifically configured to receive a target service data processing request initiated by a target terminal;
[0152] The detection module 702 may be specifically used to detect whether the target service data processing request carries a target session identifier; wherein the target session identifier is used to indicate the target session data in the last unfinished interaction process between the target terminal and the service processing system;
[0153] The query module 703 may be specifically configured to query the local session data record according to the target session identifier when it is determined that the target service data processing request carries the target session identifier;
[0154] The synchronization module 704 may be specifically configured to obtain a synchronized local session data record by synchronizing the session data with the shared cache database according to a preset synchronization rule when it is determined that the target session identifier does not exist in the local session data record;
[0155] The processing module 705 may be specifically configured to perform corresponding business data processing according to the synchronized local session data records.
[0156] In some embodiments, the local session data record may specifically include one or more session data; wherein the session data respectively corresponds to a session identifier.
[0157] In some embodiments, the session data may further specifically include session time.
[0158] In some embodiments, when the processing module 705 processes the target business data processing request according to the synchronized local session data record, it can also be used to store the relevant session data involved in the processing into the local session data record according to the target session identifier.
[0159] In some embodiments, when the device is implemented, it can also be used to detect whether there is first invalid session data with a storage time exceeding the first valid time length in the current local session data record at every preset first time interval, based on the session time of the session data; when it is determined that the first invalid session data exists in the current local session data record, the first invalid session data is deleted from the current local session data record.
[0160] In some embodiments, when the device is specifically implemented, it can also be used to upload the current local session data record to the shared cache database at every preset second time interval to update the session data stored in the shared cache database.
[0161] In some embodiments, while uploading the current local session data record to the shared cache database, the device can also be used to access the shared cache database and detect, based on the session time of the session data, whether there is second invalid session data in the current shared cache database whose storage time exceeds the second valid period; if it is determined that the second invalid session data exists in the current shared cache database, the second invalid session data is deleted from the current shared cache database.
[0162] In some embodiments, the session data may further specifically carry a status tag for indicating whether the interaction process is ended.
[0163] In some embodiments, when the device is implemented, it can also be used to upload the session data with a status tag of "unfinished" in the current local session data record to the shared cache database at every preset second time interval to update the session data stored in the shared cache database.
[0164] In some embodiments, after detecting whether the target business data processing request carries the target session identifier, the device can also be used, when implemented specifically, to generate a target session identifier when it is determined that the target business data processing request does not carry the target session identifier; and provide the target session identifier to the target terminal; interact with the target terminal to obtain relevant session data; and based on the target session identifier, store the session data in a local session data record; and perform corresponding business data processing based on the session data.
[0165] In some embodiments, after querying the local session data record according to the target session identifier, the device can also be used to perform corresponding business data processing according to the local session data record when it is determined that the target session identifier exists in the local session data record.
[0166] See also Figure 8 As shown, at the software level, the embodiment of this specification also provides another business data processing device, which may specifically include the following structural modules:
[0167] The detection module 801 may be specifically configured to detect whether the last interaction process with the business processing system is completed when a trigger operation initiated by a target user is detected;
[0168] The acquisition module 802 may be specifically configured to acquire a target session identifier indicating target session data in the last interaction process when it is determined that the last interaction process with the business processing system has not ended;
[0169] The generating module 803 may be specifically used to generate a target service data processing request carrying a target session identifier in response to a trigger operation;
[0170] The sending module 804 may be specifically configured to send the target business data processing request to the business processing system.
[0171] It should be noted that the units, devices or modules described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. For the convenience of description, the above devices are described separately by functions divided into various modules. Of course, when implementing this specification, the functions of each module can be implemented in the same or more software and / or hardware, or the modules that implement the same function can be implemented by a combination of multiple sub-modules or sub-units. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0172] As can be seen from the above, the business data processing device provided in the embodiment of this specification can enable the server newly connected to the target terminal in the business processing system to completely obtain and utilize the target session data that the target terminal already has in the last unfinished interaction process with the business processing system, and continue to perform corresponding business data processing based on the last unfinished interaction process. There is no need for the target user to repeat the interaction process that has been carried out in the last interaction process, thereby improving the overall processing efficiency, shortening the waiting time of the target user, and enabling the target user to obtain a relatively good interaction experience; at the same time, since a shared cache database is additionally introduced and used in the business processing system to cache the session data of each server, the local storage burden of the server is also effectively reduced.
[0173] Although the present specification provides method operation steps as described in the embodiments or flow charts, more or less operation steps may be included based on conventional or non-creative means. The order of steps listed in the embodiments is only one way of executing the order of many steps, and does not represent a unique execution order. When the device or client product in practice is executed, it can be executed in sequence or in parallel according to the method shown in the embodiments or the drawings (for example, a parallel processor or a multi-threaded processing environment, or even a distributed data processing environment). The term "include", "include" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, product or device including a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements inherent to such a process, method, product or device. In the absence of more restrictions, it is not excluded that there are other identical or equivalent elements in the process, method, product or device including the elements. The first, second, etc. words are used to represent the name, and do not represent any particular order.
[0174] Those skilled in the art also know that, in addition to implementing the controller in a purely computer-readable program code, the controller can be made to implement the same function in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, such a controller can be considered as a hardware component, and the devices for implementing various functions included therein can also be considered as structures within the hardware component. Or even, the devices for implementing various functions can be considered as both software modules for implementing the method and structures within the hardware component.
[0175] This specification 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, classes, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer-readable storage media including storage devices.
[0176] Through the description of the above embodiments, it can be known that those skilled in the art can clearly understand that the present specification can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present specification can essentially be embodied in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a mobile terminal, a server, or a network device, etc.) to execute the methods described in each embodiment of the present specification or some parts of the embodiments.
[0177] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. This specification can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld devices or portable devices, tablet devices, multi-processor systems, microprocessor-based systems, set-top boxes, programmable electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc.
[0178] Although the present specification is described through embodiments, those skilled in the art will appreciate that there are many modifications and changes to the present specification without departing from the spirit of the present specification, and it is intended that the appended claims include these modifications and changes without departing from the spirit of the present specification.
Claims
1. A business data processing method, characterized in that: Applied to a server in a business processing system, the business processing system includes a server cluster and a shared cache database, the method includes: Receiving a target service data processing request initiated by a target terminal; Detecting whether the target service data processing request carries a target session identifier; wherein the target session identifier is used to indicate the target session data of the target terminal in the last unfinished interaction process with the service processing system; the server generates a random number corresponding to the target service data processing request as the target session identifier by using a preset random number generator according to the reception time or request number of the target service data processing request and / or the identification information of the target terminal; When it is determined that the target service data processing request carries a target session identifier, querying the local session data record according to the target session identifier; wherein the local session data record is set in a local cache module of the server; When it is determined that the target session identifier does not exist in the local session data record, the synchronized local session data record is obtained by synchronizing the session data with the shared cache database according to a preset synchronization rule; wherein the shared cache database includes a distributed database based on blockchain; and the session data also carries a status tag for indicating whether the interaction process is ended; Perform corresponding business data processing based on the synchronized local session data records; The method further comprises: detecting the status tags of the session data stored in the current local session data record at every preset first time interval, and deleting the session data with the status tag being ended; Among them, according to the synchronized local session data record, corresponding business data processing is performed, including: according to the target session identifier, obtaining the target session data from the synchronized local session data record; according to the target business data processing request, detecting whether the target session data is complete; when it is determined that the target session data is incomplete, using the target session data as the interaction starting point, supplementing the interaction with the target terminal to obtain supplementary session data in the supplementary interaction process; and according to the target session identifier, storing the supplementary session data in the local session data record; combining the target session data and the supplementary session data to obtain complete session data for the target business data processing request; according to the complete session data, responding to the target business data processing request, and performing corresponding business data processing.
2. The method according to claim 1, characterized in that The local session data record includes one or more session data; wherein each of the session data corresponds to a session identifier.
3. The method according to claim 2, characterized in that The session data also includes session time.
4. The method according to claim 3, characterized in that In the process of processing the target service data processing request according to the synchronized local session data record, the method further includes: storing the relevant session data involved in the processing process into the local session data record according to the target session identifier.
5. The method according to claim 3, characterized in that: The method further comprises: At every preset first time interval, according to the session time of the session data, detecting whether there is first invalid session data whose storage time exceeds the first valid time length in the current local session data record; When it is determined that the first invalid session data exists in the current local session data record, the first invalid session data is deleted from the current local session data record.
6. The method according to claim 3, characterized in that: The method further comprises: At every preset second time interval, the current local session data record is uploaded to the shared cache database to update the session data stored in the shared cache database.
7. The method according to claim 6, characterized in that While uploading the current local session data record to the shared cache database, the method further includes: Accessing the shared cache database, and detecting, based on the session time of the session data, whether there is second invalid session data in the current shared cache database whose storage time exceeds the second valid time length; When it is determined that the second invalidated session data exists in the current shared cache database, the second invalidated session data is deleted from the current shared cache database.
8. The method according to claim 6, characterized in that The method further comprises: At every preset second time interval, the session data with a status tag of "unfinished" in the current local session data record is uploaded to the shared cache database to update the session data stored in the shared cache database.
9. The method according to claim 1, characterized in that: After detecting whether the target service data processing request carries the target session identifier, the method further includes: If it is determined that the target service data processing request does not carry a target session identifier, generating a target session identifier; and providing the target session identifier to the target terminal; Interact with the target terminal to obtain relevant session data; and store the session data in a local session data record according to the target session identifier; Perform corresponding business data processing based on session data.
10. The method according to claim 1, characterized in that After querying the local session data record according to the target session identifier, the method further includes: When it is determined that the target session identifier exists in the local session data record, corresponding business data processing is performed according to the local session data record.
11. A business data processing method, characterized in that: Applied to target terminals, including: When a trigger operation initiated by a target user is detected, detecting whether the last interaction process with the business processing system is completed; In the case where it is determined that the last interaction process with the business processing system has not ended, obtaining a target session identifier indicating the target session data in the last interaction process; wherein the target session identifier is a random number corresponding to the target business data processing request, generated by the server of the business processing system using a preset random number generator according to the reception time or request number of the target business data processing request and / or the identification information of the target terminal; In response to the trigger operation, a target business data processing request carrying a target session identifier is generated; Sending the target business data processing request to the business processing system; Wherein, the server of the business processing system processes the target business data according to the target business data processing request, and when it is determined that the target session identifier does not exist in the local session data record, according to the preset synchronization rule, synchronizes the session data with the shared cache database to obtain the synchronized local session data record; wherein the shared cache database includes a distributed database based on blockchain; the session data also carries a status tag for indicating whether the interaction process is ended; according to the synchronized local session data record, corresponding business data processing is performed; the server is also used to detect the status tag of the session data stored in the current local session data record at every preset first time interval, and delete the session data with the status tag being ended; the local session data record is set in the local cache module of the server; The server of the business processing system is specifically used to obtain target session data from the synchronized local session data record according to the target session identifier; detect whether the target session data is complete according to the target business data processing request; when it is determined that the target session data is incomplete, use the target session data as the interaction starting point to perform supplementary interaction with the target terminal to obtain supplementary session data in the supplementary interaction process; and store the supplementary session data in the local session data record according to the target session identifier; combine the target session data and the supplementary session data to obtain complete session data for the target business data processing request; respond to the target business data processing request according to the complete session data and perform corresponding business data processing.
12. A business data processing device, characterized in that: A server applied to a business processing system, wherein the business processing system includes a server cluster and a shared cache database, and the device includes: A receiving module, used for receiving a target service data processing request initiated by a target terminal; The detection module is used to detect whether the target service data processing request carries a target session identifier; wherein the target session identifier is used to indicate the target session data of the target terminal in the last unfinished interaction process with the service processing system; the server uses a preset random number generator to generate a random number corresponding to the target service data processing request as the target session identifier according to the reception time or request number of the target service data processing request and / or the identification information of the target terminal; A query module, used to query the local session data record according to the target session identifier when it is determined that the target business data processing request carries the target session identifier; wherein the local session data record is set in a local cache module of the server; A synchronization module, configured to obtain a synchronized local session data record by synchronizing the session data with a shared cache database according to a preset synchronization rule when it is determined that the target session identifier does not exist in the local session data record; wherein the shared cache database includes a distributed database based on blockchain; and the session data also carries a status tag for indicating whether the interaction process is ended; A processing module is used to perform corresponding business data processing according to the synchronized local session data records; The device is also specifically used to detect the status tag of the session data stored in the current local session data record at every preset first time interval, and delete the session data with the status tag as ended; The processing module is specifically used to obtain target session data from the synchronized local session data record according to the target session identifier; detect whether the target session data is complete according to the target business data processing request; when it is determined that the target session data is incomplete, use the target session data as the interaction starting point to perform supplementary interaction with the target terminal to obtain supplementary session data in the supplementary interaction process; and store the supplementary session data in the local session data record according to the target session identifier; combine the target session data and the supplementary session data to obtain complete session data for the target business data processing request; and respond to the target business data processing request according to the complete session data to perform corresponding business data processing.
13. A server, characterized in that: The invention comprises a processor and a memory for storing instructions executable by the processor, wherein the steps of the method according to any one of claims 1 to 10 are implemented when the processor executes the instructions.
14. A computer-readable storage medium, characterized in that: Computer instructions are stored thereon, and when the instructions are executed by a processor, the steps of the method described in any one of claims 1 to 10 or 11 are implemented.
Citation Information
Patent Citations
Dialogue interaction method and device, computer equipment and computer readable storage medium
CN112929499A
System and method for processing communication operation
CN1917673A