Check-in processing method, apparatus, device, and storage medium
By adding a caching mechanism to the database and updating the check-in data for user accounts, the problem of high database read/write pressure was solved, and the performance and query efficiency of the check-in system were improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
- Filing Date
- 2022-04-12
- Publication Date
- 2026-06-12
AI Technical Summary
In existing technologies, user account check-in behavior is recorded directly in the database, resulting in high database read/write pressure and poor performance of the check-in system.
When a user account check-in is detected, a check-in record is added to the database, and the check-in data in the cache is updated. When a query request is received, the query result is returned based on the cached data. The caching mechanism ensures data consistency and reduces the number of database reads.
The caching mechanism reduces the read and write pressure on the database, improves the overall performance of the check-in system, and ensures the speed and accuracy of check-in record queries.
Smart Images

Figure CN116955435B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer application technology, and in particular to a check-in processing method, apparatus, device, and storage medium. Background Technology
[0002] With the rapid development of computer and terminal technologies, various applications have emerged. These applications can be installed on terminals to provide users with corresponding functions. To help users record login activities, many applications set up check-in mechanisms to record user account check-in behavior and provide users with certain rewards based on the check-in records.
[0003] Currently, most systems directly record user account check-in activity in the database, and when check-in records need to be retrieved, the relevant information is also read from the database. This puts a heavy load on the database's read and write operations, resulting in poor overall performance of the check-in system. Summary of the Invention
[0004] The purpose of this disclosure is to provide a check-in processing method, apparatus, device, and storage medium to reduce the read and write pressure on the database and improve the overall performance of the check-in system.
[0005] To solve the above-mentioned technical problems, this disclosure provides the following technical solution:
[0006] On the one hand, a check-in processing method is provided and applied to the server side. The check-in processing method includes:
[0007] If the first user account is detected to have made a check-in through the client, add the check-in record of the first user account for the current time unit to the database;
[0008] Update the check-in data of the first user account in the cache corresponding to the database. The check-in data of the first user account in the cache is the check-in data corresponding to a check-in period, and each check-in period includes multiple time units.
[0009] Upon receiving a check-in record query request from the client, the system returns the check-in record query result to the client based on the check-in data of the first user account in the cache.
[0010] In one specific embodiment of this disclosure, updating the check-in data of the first user account in the cache corresponding to the database includes:
[0011] Obtain the total sign-in records for the first user account in the current sign-in period from the database, wherein the total sign-in records include the sign-in records for the current time unit;
[0012] Based on the total number of check-in records for the current check-in period, determine the number of check-in records and the time of the most recent check-in for the first user account in the current check-in period;
[0013] Update the check-in record value included in the check-in data of the first user account in the cache corresponding to the database to the check-in record value of the current check-in period;
[0014] The check-in data of the first user account in the cache is updated to include the most recent check-in time, which is the most recent check-in time of the current check-in period.
[0015] In one specific embodiment of this disclosure, updating the check-in data of the first user account in the cache corresponding to the database includes:
[0016] Determine whether the current check-in time of the current time unit check-in record and the most recent check-in time included in the check-in data of the first user account in the corresponding cache of the database are within a check-in period;
[0017] If within a check-in period, the binary sequence corresponding to the check-in record value included in the check-in data of the first user account in the cache is shifted N bits to the higher bits, and after the lowest bit is set to 1, it is updated to the new check-in record value. The most recent check-in time included in the check-in data of the first user account in the cache is updated to the current check-in time, where N is the difference between the time unit where the most recent check-in time included in the check-in data of the first user account in the cache is located and the current time unit.
[0018] If the check-in period is not within a certain period, the check-in record value of the first user account in the cache will be updated to 1, and the most recent check-in time of the first user account in the cache will be updated to the current check-in time.
[0019] In one specific embodiment of this disclosure, after updating the check-in data of the first user account in the cache corresponding to the database, the method further includes:
[0020] If updating the check-in data of the first user account in the cache fails, a first update message is generated;
[0021] The first update message is added to the update message queue so that the check-in data in the cache can be updated asynchronously based on the update message queue.
[0022] In one specific embodiment of this disclosure, the asynchronous update of the check-in data in the cache based on the update message queue includes:
[0023] Read the second update message from the update message queue;
[0024] Query the database for the sign-in record of the second user account corresponding to the second update message;
[0025] Update the check-in data of the second user account in the cache according to the check-in record of the second user account corresponding to the second update message.
[0026] In one specific embodiment of this disclosure, reading the second update message from the update message queue includes:
[0027] If an update message is detected in the update message queue and the message processing speed has not reached the processing speed limit, the second update message in the update message queue is read.
[0028] In one specific embodiment of this disclosure, it further includes:
[0029] If the system detects that the number of check-in records included in the check-in data of the first user account in the cache has reached the set maximum value, a first adjustment message is generated.
[0030] The first adjustment message is added to the adjustment message queue so that the check-in data in the cache can be adjusted asynchronously based on the adjustment message queue.
[0031] In one specific embodiment of this disclosure, it further includes:
[0032] If the set repair time point is reached, retrieve the previous time unit check-in record of the first user account in the database;
[0033] Based on the previous time unit check-in records of the first user account in the database, determine whether the previous time unit check-in records of the first user account are missing in the cache;
[0034] If missing, the check-in data of the first user account in the cache will be repaired.
[0035] On the other hand, a check-in processing device is provided for use on a server side, the check-in processing device comprising:
[0036] The database update module is configured to add a check-in record for the first user account in the database for the current time unit when a check-in action is detected by the first user account through the client.
[0037] The cache update module is configured to update the check-in data of the first user account in the cache corresponding to the database. The check-in data of the first user account in the cache is the check-in data corresponding to a check-in period, and each check-in period includes multiple time units.
[0038] The sign-in record query module is configured to, upon receiving a sign-in record query request from the client, return the sign-in record query result to the client based on the sign-in data of the first user account in the cache.
[0039] In one specific embodiment of this disclosure, the cache update module is configured to perform:
[0040] Obtain the total sign-in records for the first user account in the current sign-in period from the database, wherein the total sign-in records include the sign-in records for the current time unit;
[0041] Based on the total number of check-in records for the current check-in period, determine the number of check-in records and the time of the most recent check-in for the first user account in the current check-in period;
[0042] Update the check-in record value included in the check-in data of the first user account in the cache corresponding to the database to the check-in record value of the current check-in period;
[0043] The check-in data of the first user account in the cache is updated to include the most recent check-in time, which is the most recent check-in time of the current check-in period.
[0044] In one specific embodiment of this disclosure, the cache update module is configured to perform:
[0045] Determine whether the current check-in time of the current time unit check-in record and the most recent check-in time included in the check-in data of the first user account in the corresponding cache of the database are within a check-in period;
[0046] If within a check-in period, the binary sequence corresponding to the check-in record value included in the check-in data of the first user account in the cache is shifted N bits to the higher bits, and after the lowest bit is set to 1, it is updated to the new check-in record value. The most recent check-in time included in the check-in data of the first user account in the cache is updated to the current check-in time, where N is the difference between the time unit where the most recent check-in time included in the check-in data of the first user account in the cache is located and the current time unit.
[0047] If the check-in period is not within a certain period, the check-in record value of the first user account in the cache will be updated to 1, and the most recent check-in time of the first user account in the cache will be updated to the current check-in time.
[0048] In one specific embodiment of this disclosure, an asynchronous update module is also included, configured to perform:
[0049] After updating the check-in data of the first user account in the cache corresponding to the database, if updating the check-in data of the first user account in the cache fails, a first update message is generated.
[0050] The first update message is added to the update message queue so that the check-in data in the cache can be updated asynchronously based on the update message queue.
[0051] In one specific embodiment of this disclosure, the asynchronous update module is configured to perform:
[0052] Read the second update message from the update message queue;
[0053] Query the database for the sign-in record of the second user account corresponding to the second update message;
[0054] Update the check-in data of the second user account in the cache according to the check-in record of the second user account corresponding to the second update message.
[0055] In one specific embodiment of this disclosure, the asynchronous update module is configured to perform:
[0056] If an update message is detected in the update message queue and the message processing speed has not reached the processing speed limit, the second update message in the update message queue is read.
[0057] In one specific embodiment of this disclosure, an asynchronous adjustment module is also included, configured to perform:
[0058] If the system detects that the number of check-in records included in the check-in data of the first user account in the cache has reached the set maximum value, a first adjustment message is generated.
[0059] The first adjustment message is added to the adjustment message queue so that the check-in data in the cache can be adjusted asynchronously based on the adjustment message queue.
[0060] In one specific embodiment of this disclosure, a timed repair module is also included, configured to perform:
[0061] If the set repair time point is reached, retrieve the previous time unit check-in record of the first user account in the database;
[0062] Based on the previous time unit check-in records of the first user account in the database, determine whether the previous time unit check-in records of the first user account are missing in the cache;
[0063] If missing, the check-in data of the first user account in the cache will be repaired.
[0064] On the other hand, a check-in processing device is provided, including:
[0065] processor;
[0066] Memory used to store the processor's executable instructions;
[0067] The processor is configured to execute the instructions to implement the above-described check-in processing method.
[0068] In another aspect, a computer-readable storage medium is provided, wherein when the instructions in the computer-readable storage medium are executed by the processor of the check-in processing device, the check-in processing device is enabled to perform the above-described check-in processing method.
[0069] In another aspect, a computer program product is provided, the computer program product including computer instructions stored in a computer-readable storage medium and adapted to be read and executed by a processor so as to cause a computer device having the processor to perform the above-described check-in processing method.
[0070] By applying the technical solution provided in this disclosure, when the server detects that a user account has performed a check-in activity through the client, it adds a check-in record for the current time unit of the user account to the database and updates the corresponding check-in data of the user account in the database cache. Upon receiving a check-in record query request sent by the client, the server returns the check-in record query result to the client based on the check-in data of the user account in the cache. By adding a caching mechanism to the database and updating the check-in data of the user account in the cache while adding a check-in record to the database, the consistency between the check-in data in the cache and the corresponding data in the database can be guaranteed. Thus, when performing a check-in record query, based on the check-in data in the cache, the query result can be returned quickly and accurately, reducing the number of database reads, reducing the database read / write pressure, and improving the overall performance of the check-in system.
[0071] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0072] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0073] Figure 1 This is a flowchart illustrating the implementation of a sign-in processing method in an embodiment of this disclosure;
[0074] Figure 2 This is a schematic diagram of a sign-in display interface in an embodiment of this disclosure;
[0075] Figure 3 This is another schematic diagram of the sign-in display interface in an embodiment of this disclosure;
[0076] Figure 4 This is a schematic diagram of the sign-in logic in an embodiment of this disclosure;
[0077] Figure 5 This is a schematic diagram of message processing logic in an embodiment of this disclosure;
[0078] Figure 6 This is a schematic diagram of the check-in data repair logic in an embodiment of this disclosure;
[0079] Figure 7 This is a schematic diagram of the structure of a sign-in processing device according to an embodiment of the present disclosure;
[0080] Figure 8 This is a schematic diagram of the structure of a sign-in processing device according to an embodiment of this disclosure. Detailed Implementation
[0081] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings.
[0082] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0083] The core of this disclosure is to provide a check-in processing method. This method can be applied to the server side, which can communicate and connect with multiple clients. The server and clients together constitute the check-in system. Clients can be installed on terminals to provide corresponding services to users. Each user has a corresponding user account when using the client. User accounts can generate check-in behavior through the client. When the server detects a user account's check-in behavior, it can add a check-in record for the current time unit of the user account to the database and update the corresponding user account's check-in data in the database cache. Upon receiving a check-in record query request from a client, the server returns the check-in record query result to the client based on the user account's check-in data in the cache. A caching mechanism is added to the database. While adding a check-in record to the database, the server updates the user account's check-in data in the cache based on the total number of check-in records for the current check-in period in the database. This ensures the consistency between the check-in data in the cache and the corresponding data in the database. Therefore, when performing a check-in record query, based on the check-in data in the cache, the query result can be returned quickly and accurately, reducing the number of database reads, reducing the database read / write pressure, and improving the overall performance of the check-in system.
[0084] The server accurately records user account check-in behavior, and then accurately determines the rewards that should be given to user accounts, such as points or coupons, based on the check-in records and the pre-set check-in reward mechanism, thus forming a good interaction with users.
[0085] It should be noted that the user information involved in this disclosure, including but not limited to user device information and user personal information, is all information authorized by the user or fully authorized by all parties.
[0086] See Figure 1 The diagram shown is an implementation flowchart of a check-in processing method provided in this disclosure. The method may include the following steps:
[0087] S110: If the first user account is detected to have made a check-in through the client, add the check-in record of the first user account for the current time unit to the database.
[0088] In this embodiment, user account behaviors can be defined as check-in behaviors based on actual circumstances. For example, posting videos, commenting on others' work, or clicking the check-in control through the client-provided check-in entry can be defined as check-in behaviors. User accounts can generate various check-in behaviors through the client. When the server detects that a first user account has generated a check-in behavior through the client, it can add a check-in record for the first user account in the database for the current time unit. The first user account can be any user account using the client, and the first user account's current time unit check-in record can include information such as the first user account's check-in behavior and check-in time.
[0089] The time unit can be set and adjusted according to the actual situation, such as setting it to one day or one week.
[0090] When a user account is detected to have checked in, the user account's check-in record for the current time period is added to the database, which ensures the accuracy and real-time nature of the check-in records stored in the database.
[0091] S120: Update the check-in data of the first user account in the corresponding cache of the database.
[0092] The check-in data for the first user account in the cache is the check-in data corresponding to one check-in period, and each check-in period includes multiple time units.
[0093] In this embodiment, the start time and duration of the check-in activity can be preset. The start and end times of each check-in period can be accurately determined based on the start time and duration. For example, the duration of the check-in activity can be set as follows: Figure 2 The 12-day period shown includes a check-in cycle from the 21st of one month to the 2nd of the next, and the following cycle from the 3rd to the 14th of the next month. Each check-in cycle consists of 12 time units, each of which is one day. For example, the length of the check-in activity cycle can be set as follows: Figure 3 The 7-day period shown includes one sign-in cycle that is Monday to Sunday of a certain week, and the next sign-in cycle that is Monday to Sunday of the following week. Each sign-in cycle consists of 7 time units, and each time unit is one day. Of course, other sign-in activity cycle lengths can be set according to actual conditions, and this embodiment does not limit this.
[0094] The check-in data for each user account for one check-in period can be stored in the corresponding cache of the database. By parsing the check-in data, the check-in status of each time unit included in the current check-in period of the corresponding user account can be obtained.
[0095] Upon detecting that the first user account has performed a sign-in action, after adding the sign-in record for the current time unit of the first user account to the database, the sign-in data of the first user account in the cache can be updated so that the sign-in status represented by the sign-in data of the first user account in the cache is consistent with the sign-in status represented by the total sign-in records of the first user account in the current sign-in period in the database.
[0096] S130: Upon receiving a check-in record query request from the client, return the check-in record query result to the client based on the check-in data of the first user account in the cache.
[0097] Upon detecting that the first user account has performed a sign-in action, a sign-in record for the current time unit of the first user account is added to the database, and the sign-in data of the first user account in the cache is updated to ensure that the sign-in status represented by the sign-in data of the first user account in the cache is consistent with the sign-in status represented by the total sign-in records of the first user account in the current sign-in period in the database.
[0098] Users can query their check-in records through the client according to their actual needs. For example, when a user opens the check-in activity page through the client, it can be assumed that the user account currently has a need to query check-in records. In this case, the client can send a check-in record query request to the server. Upon receiving the check-in record query request sent by the first user account through the client, the server can return the check-in record query results to the client based on the check-in data of the first user account in the cache.
[0099] After receiving the check-in record query results, the client can display the corresponding check-in information on the check-in activity page. Since the check-in data for each user account in the cache corresponds to one check-in period, the check-in record query results received by the client are also for one check-in period, displaying the check-in status for one check-in period. When entering a new check-in period, the check-in status of the previous check-in period will no longer be displayed.
[0100] Specifically, when the server receives a check-in record query request from the client, it can first check whether the check-in data of the first user account exists in the cache.
[0101] If the check-in data for the first user account exists in the cache, the check-in data for the first user account in the cache can be directly returned to the client as the check-in record query result. The client then parses the check-in data and outputs and displays it.
[0102] Due to cache expiration, abnormal events, etc., the check-in data of the first user account may not be available in the cache. In this case, the most recent check-in time of the first user account can be obtained by querying the database, and it can be determined whether the most recent check-in time is within the current check-in period.
[0103] If the most recent check-in time is within the current check-in period, it can be assumed that the first user account has completed check-in within the current check-in period. The total check-in records of the first user account in the current check-in period can be queried in the database, written back to the cache, and returned to the client as the check-in record query result.
[0104] If the most recent check-in time is not within the current check-in period, a placeholder can be set in the cache to indicate that there is no check-in record in the current check-in period. This way, when a check-in record query request is received from the client again, the placeholder in the cache can be read, and the query result indicating that there is currently no check-in record can be directly returned to the client. This effectively prevents duplicate origin server requests and frequent database reads.
[0105] Applying the method provided in this disclosure, when the server detects that a user account has performed a check-in activity through the client, it adds a check-in record for the current time unit of the user account to the database and updates the corresponding check-in data of the user account in the database cache. Upon receiving a check-in record query request sent by the client, the server returns the check-in record query result to the client based on the check-in data of the user account in the cache. By adding a caching mechanism to the database, and updating the check-in data of the user account in the cache based on the total check-in records of the user account in the current check-in period in the database, the consistency between the check-in data in the cache and the corresponding data in the database can be guaranteed. Thus, when performing a check-in record query, based on the check-in data in the cache, the query result can be returned quickly and accurately, reducing the number of database reads, reducing the database read / write pressure, and improving the overall performance of the check-in system.
[0106] In one embodiment of this disclosure, before adding the current time unit check-in record of the first user account to the database after detecting that the first user account has generated a check-in behavior through the client, the method may further include the following steps:
[0107] Step 1: Determine whether the number of check-ins for the first user account in the current time unit has reached the set threshold.
[0108] Step 2: If the number of check-ins for the first user account in the current time unit has not reached the threshold, then execute the step of adding the check-in record for the first user account in the current time unit to the database.
[0109] For ease of description, the two steps above will be explained together.
[0110] In this embodiment of the disclosure, a threshold for the number of times to sign in for each time unit of a sign-in period can be preset according to the actual situation. For example, it can be set that each time unit can only sign in once. If the same user account generates multiple or more sign-in behaviors in the same time unit, it will only be considered that the user account has signed in once.
[0111] Upon detecting a check-in activity by the first user account via the client, it can be first determined whether the check-in count for the first user account in the current time unit has reached the set threshold. If it has, it can be assumed that the first user account has completed check-in for the current time unit, and no action can be taken, or a check-in notification message can be returned to the client. If it has not reached the threshold, it can be assumed that the first user account has not completed check-in for the current time unit, and the following steps can be performed to add the first user account's current time unit check-in record to the database.
[0112] By comparing the number of check-ins in the current time unit of a user account with a threshold, it can be determined whether the user account has completed check-in in the current time unit, thus ensuring the accuracy of the check-in records.
[0113] In one embodiment of this disclosure, updating the check-in data of the first user account in the cache corresponding to the database may include the following steps:
[0114] The first step: Retrieve the total sign-in records for the first user account in the database for the current sign-in period. The total sign-in records include the sign-in records for the current time unit.
[0115] The second step: Based on the total number of check-ins in the current check-in period, determine the number of check-ins for the first user account in the current check-in period and the time of the most recent check-in;
[0116] The third step: Update the check-in record values in the cache of the first user account in the database to the check-in record values for the current check-in period;
[0117] The fourth step: Update the check-in data of the first user account in the cache, including the most recent check-in time, to the most recent check-in time of the current check-in period.
[0118] For ease of description, the above four steps will be explained together.
[0119] In this embodiment of the disclosure, the check-in data in the cache may include two items: one is the check-in record value, which may be in string form, and the other is the time of the most recent check-in.
[0120] for example,
[0121] key: prefix_userId / /
[0122] value:
[0123] {
[0124] "signValue": 21, / / Value of sign-in record
[0125] "time":1637681904000 / / Last check-in time
[0126] }
[0127] When the server detects that the first user account has checked in through the client, it adds the first user account's check-in record for the current time unit to the database. Then, it can retrieve the total number of check-in records for the first user account in the database for the current check-in period. The current check-in period includes multiple time units, including the current time unit. For example, if the check-in period is Monday to Sunday, and the current time unit is Tuesday of the second week of April, then the current check-in period is Monday to Sunday of the second week of April. The total number of check-in records for the current check-in period includes the check-in records for the current time unit.
[0128] Based on the total sign-in records of the first user account for the current sign-in period, the sign-in data of the first user account in the cache can be updated so that the sign-in status represented by the sign-in data of the first user account in the cache is consistent with the sign-in status represented by the total sign-in records of the first user account for the current sign-in period in the database.
[0129] Specifically, when a check-in activity is detected by the first user account, the check-in record for the current time unit of the first user account is added to the database. After obtaining the total check-in records for the current check-in period of the first user account in the database, the check-in record value and the most recent check-in time of the first user account in the current check-in period can be determined based on the total check-in records.
[0130] In other words, by using the total check-in records of the first user account for the current check-in period, we can obtain the check-in status of the first user account in each time unit within the current check-in period, such as whether check-in was completed and the check-in time. For each time unit of the current check-in period, if check-in was completed in that time unit, the check-in record for that time unit can be set to 1; if check-in was not completed in that time unit, the check-in record for that time unit can be set to 0. This yields a binary sequence of the total check-in records for the current check-in period. Converting this binary sequence to decimal gives the check-in record value for the current check-in period. The check-in time of the most recent check-in record set to 1 is the most recent check-in time. For example, if the current check-in period is Monday to Sunday of a certain week, with each time unit being one day, the check-in records for each time unit are: 0, 0, 1, 0, 1, 0, 0, forming a binary sequence. Converting this to decimal gives a check-in record value of 20, and the most recent check-in time is the check-in time corresponding to Friday.
[0131] After determining the check-in record value and the most recent check-in time for the first user account in the current check-in period, the check-in record value included in the check-in data of the first user account in the cache can be updated to the check-in record value for the current check-in period, and the most recent check-in time included in the check-in data of the first user account in the cache can be updated to the most recent check-in time for the current check-in period.
[0132] Based on the total sign-in records of the first user account in the current sign-in period, the sign-in record value and the most recent sign-in time of the first user account in the current sign-in period are determined. Then, the sign-in data of the first user account in the cache is updated. This can improve the accuracy of the update and ensure that the sign-in status represented by the sign-in data of the first user account in the cache is consistent with the sign-in status represented by the total sign-in records of the first user account in the current sign-in period in the database.
[0133] In one embodiment of this disclosure, updating the check-in data of the first user account in the cache corresponding to the database may include the following steps:
[0134] Step 1: Determine whether the current check-in time of the current time unit check-in record and the most recent check-in time included in the check-in data of the first user account in the corresponding database cache are within a check-in period;
[0135] Step 2: If it is within a check-in period, shift the binary sequence corresponding to the check-in record value included in the check-in data of the first user account in the cache by N bits to the high bits, and update it with the new check-in record value after setting the lowest bit to 1. Update the most recent check-in time included in the check-in data of the first user account in the cache to the current check-in time, where N is the difference between the time unit of the most recent check-in time included in the check-in data of the first user account in the cache and the current time unit;
[0136] Step 3: If not within a check-in period, update the check-in record value of the first user account in the cache to 1, and update the most recent check-in time of the first user account in the cache to the current check-in time.
[0137] For ease of description, the three steps above will be explained together.
[0138] In this embodiment, the check-in data for each user account in the cache is the check-in data corresponding to a check-in period, including the check-in record value and the most recent check-in time. By parsing the check-in record value, the check-in status of each time unit included in the corresponding check-in period can be obtained. For example, if a check-in period is Monday to Sunday of a certain week, with a time unit of one day, and the check-in period includes 7 time units, and the check-in record value is 20, then parsing it will yield a binary sequence: 0010100, which corresponds to the check-in status of Monday to Sunday of the check-in period, that is, check-in was completed on Wednesday and Friday, and check-in was not completed on other times, with the most recent check-in time being the check-in time corresponding to Friday.
[0139] Upon detecting that the first user account has performed a sign-in action through the client, after adding the sign-in record of the first user account for the current time unit to the database, the sign-in data of the first user account in the corresponding cache of the database can be updated by incremental writing based on the sign-in record of the current time unit.
[0140] Specifically, we can first determine whether the current check-in time of the current time unit check-in record and the most recent check-in time included in the check-in data of the first user account in the corresponding database cache are within a check-in period.
[0141] If the current check-in time of the current check-in record in the current time unit and the most recent check-in time included in the check-in data of the first user account in the cache are within the same check-in period, then the check-in data of the first user account in the cache can be considered as the check-in data corresponding to the current check-in period. The binary sequence corresponding to the check-in record value included in the check-in data of the first user account in the cache can be shifted N bits to the higher bits, and after setting the lowest bit to 1, it can be updated to the new check-in record value. For example, if the check-in data for the first user account in the cache contains a check-in record value of 1, corresponding to a binary sequence of 0000001, and a check-in record for the current time unit of the first user account is added to the database, and the current check-in time of the current time unit check-in record is determined to be within one check-in period of the most recent check-in time included in the check-in data of the first user account in the cache, then the binary sequence corresponding to the check-in record value included in the check-in data of the first user account in the cache can be shifted 1 bit to the higher bits (the difference between the time unit of the most recent check-in time included in the check-in data of the first user account in the cache and the current time unit), and the lowest bit is set to 1, resulting in the binary sequence 0000011, with a new check-in record value of 3. The check-in record value included in the check-in data of the first user account in the cache is then updated to this new check-in record value. Simultaneously, the most recent check-in time included in the check-in data of the first user account in the cache can be updated to the current check-in time.
[0142] If the current check-in time of the current check-in record in the current time unit and the most recent check-in time included in the check-in data of the first user account in the cache are not within the same check-in period, then the check-in data of the first user account in the cache can be considered as not being the check-in data corresponding to the current check-in period. It can be expired and cleared, and then the check-in record value included in the check-in data of the first user account in the cache can be updated to 1, and the most recent check-in time included in the check-in data of the first user account in the cache can be updated to the current check-in time.
[0143] Updates to user account check-in data in the cache are performed using incremental writes, which effectively controls cache capacity and saves costs.
[0144] In one embodiment of this disclosure, after updating the check-in data of the first user account in the cache corresponding to the database, the method may further include the following steps:
[0145] Step 1: If updating the check-in data for the first user account in the cache fails, generate the first update message;
[0146] Step 2: Add the first update message to the update message queue, so as to asynchronously update the check-in data in the cache based on the update message queue.
[0147] For ease of description, the two steps above will be explained together.
[0148] In this embodiment of the disclosure, when the server detects that the first user account has performed a sign-in action, it adds the sign-in record of the first user account for the current time unit to the database and updates the sign-in data of the first user account in the cache. Then, it can further determine whether the update was successful. This can be done by checking whether the cache returns confirmation information. If the cache does not return confirmation information, the update is considered to have failed. Alternatively, if multiple attempts to update fail to receive confirmation information from the cache, the update is considered to have failed. If the cache returns confirmation information, the update is considered to have succeeded.
[0149] If the update is successful, no further action is required.
[0150] If updating the check-in data of the first user account in the cache fails, a first update message can be generated. The first update message may include information such as the user ID, check-in time, and check-in behavior of the first user account.
[0151] Adding the first update message to the update message queue allows for asynchronous updates to the cached check-in data based on this queue. This avoids impacting the server's processing of check-in activities for other user accounts.
[0152] The message queue update can be deployed on the server or on a separate machine.
[0153] In one embodiment of this disclosure, asynchronously updating the check-in data in the cache based on the update message queue may include the following steps:
[0154] The first step: Read the second update message from the update message queue;
[0155] The second step: Query the database for the sign-in record of the second user account corresponding to the second update message;
[0156] The third step: Update the check-in data of the second user account in the cache according to the check-in record of the second user account corresponding to the second update message.
[0157] For ease of description, the three steps above will be explained together.
[0158] In this embodiment, when the server detects a check-in activity generated by a user account, it adds a check-in record for the current time unit of that user account to the database and updates the check-in data of that user account in the cache. If updating the check-in data of that user account in the cache fails, an update message is generated and added to the update message queue. The update message queue can contain multiple update messages.
[0159] The server can asynchronously update the check-in data in the cache. During asynchronous updates, it can read the second update message from the update message queue. The second update message is the update message at the head of the update message queue.
[0160] After reading the second update message, the check-in record of the second user account corresponding to the second update message can be queried in the database. Specifically, the second update message may include information such as user identifier, check-in time, and check-in behavior. Based on the user identifier in the second update message, the second user account can be identified, and the check-in record corresponding to the second user account can be found in the database. The check-in record may include check-in time and check-in behavior.
[0161] Based on the check-in records of the second user account corresponding to the second update message, the check-in data of the second user account in the cache can be updated. For details, please refer to the description of the scheme for updating the check-in data of the first user account in the cache based on the total check-in records of the first user account in the current check-in period, which will not be repeated here.
[0162] In one specific embodiment of this disclosure, a second update message can be read from the update message queue if an update message is detected in the queue and the message processing speed has not reached its upper limit. The message processing speed refers to the speed at which update messages in the update message queue are processed. If the message processing speed is too fast, it will lead to excessive machine load and excessive pressure on downstream services. An upper limit for the message processing speed can be preset. If the message processing speed reaches the upper limit, the update can be paused; if the message processing speed has not reached the upper limit, the second update message in the update message queue can be read and processed. By limiting the message processing speed, update failures caused by excessively fast message processing can be avoided, thereby improving the update success rate.
[0163] In one embodiment of this disclosure, the method may further include the following steps:
[0164] Step 1: If the number of check-in records in the first user account's check-in data in the cache reaches the set maximum value, generate the first adjustment message;
[0165] Step 2: Add the first adjustment message to the adjustment message queue, and then adjust the check-in data in the cache asynchronously based on the adjustment message queue.
[0166] For ease of description, the two steps above will be explained together.
[0167] In this embodiment of the disclosure, the maximum value of the check-in record can be preset, such as setting it to the value corresponding to the check-in completed in each time unit within a check-in cycle. For example, if the time unit is one day and the check-in cycle is 7 days, the maximum value of the check-in record can be 0x7F.
[0168] The server can monitor the check-in record values in the cached check-in data. If the server detects that the check-in record values for the first user account in the cache have reached a set maximum value, it can generate a first adjustment message and add it to the adjustment message queue. This allows for asynchronous adjustments to the cached check-in data based on the adjustment message queue, thus clearing the cached data. Asynchronous adjustments to the cached check-in data ensure that the server can continue processing check-ins for other user accounts, preventing disruptions to the check-in process.
[0169] For ease of understanding, Figure 4 The following is an example of the check-in logic diagram to illustrate the embodiments of this disclosure.
[0170] User accounts generate check-in actions through the client, and the client can send check-in requests to the server;
[0171] The server can use the frequency control service to control the frequency and determine whether the number of check-ins in the current time unit of a user account has reached the set threshold. The frequency control service can be deployed on the server or on other machines.
[0172] If the number of attempts reaches the threshold, it means that the current time unit has been checked in, and the server can return the check-in information to the client.
[0173] If the number of times does not reach the threshold, the server can add a check-in record for the user account in the database for the current time unit.
[0174] The server updates the user account check-in data in the cache;
[0175] If updating the check-in data of the user account in the cache fails, the server generates an update message and adds the update message to the update message queue of the message queue service. Based on the update message queue, the check-in data in the cache is updated asynchronously. The message queue service can be deployed on the server or on other machines.
[0176] When the server detects that the number of check-in records in the user account check-in data in the cache has reached the set maximum value, it can generate an adjustment message and add the adjustment message to the adjustment message queue of the message queue service, so as to asynchronously adjust the check-in data in the cache based on the adjustment message queue.
[0177] After the server completes the check-in, it can return a success message to the client.
[0178] The check-in logic of this disclosure can effectively ensure the consistency between the check-in records represented in the cache and the corresponding check-in records represented in the database, so as to facilitate subsequent querying of check-in records based on the check-in data in the cache.
[0179] Updating and adjusting message queues can be done for different message queues or the same message queue, with messages arranged in the order they were generated.
[0180] Further with Figure 5 The present invention will be described using the message processing logic diagram shown as an example.
[0181] When the server detects a message in the message queue, it can use the speed limiting service to check whether the message processing speed has reached the processing speed limit. The speed limiting service can be deployed on the server or on other machines.
[0182] If the message processing speed reaches the processing speed limit, the server will block the message and wait for a certain period of time.
[0183] If the message is an update message and the message processing speed has not reached the processing speed limit, the server will query the database for the check-in record of the user account corresponding to the update message;
[0184] The server updates the check-in data of the user account in the cache based on the check-in record of the user account corresponding to the update message;
[0185] If the message is an adjustment message and the message processing speed has not reached the processing speed limit, the server will adjust the value of the check-in records included in the cached check-in data.
[0186] Asynchronous updates and adjustments to the check-in data in the cache can effectively avoid affecting the server's normal check-in processing.
[0187] In one embodiment of this disclosure, the method may further include the following steps:
[0188] The first step: Upon reaching the set repair time point, retrieve the previous time unit check-in record of the first user account in the database;
[0189] The second step: Based on the previous time unit check-in records of the first user account in the database, determine whether the previous time unit check-in records of the first user account are missing in the cache. If they are missing, proceed to the third step.
[0190] The third step: Repair the check-in data of the first user account in the cache.
[0191] For ease of description, the three steps above will be explained together.
[0192] In this embodiment of the disclosure, a repair time point can be preset, such as the end time point of each time unit. For example, if the time unit is one day, the preset repair time point could be midnight of each day. Upon reaching the preset repair time point, the check-in records of the first user account in the database for the previous time unit can be retrieved. The check-in records may include whether check-in was performed, the check-in time, etc.
[0193] Simultaneously, the system can read the check-in data of the first user account in the cache and compare it with the check-in records of the first user account in the database for previous time units. This allows the system to determine if any check-in records for the first user account in the cache are missing. If no records are missing, no action is required. If records are missing, the check-in data of the first user account in the cache can be repaired.
[0194] The following is based on Figure 6 The present invention will be illustrated using the check-in data repair logic shown as an example.
[0195] Repair tasks can be published through the repair task service; the repair task service can be deployed on the server or deployed separately on other machines.
[0196] The server can use the read speed limiting service to determine whether the scanning speed of the database has reached the scanning speed limit, which can be determined by whether the set repair time point has been reached; the read speed limiting service can be deployed on the server or on other machines separately;
[0197] If the database scan speed reaches the scan speed limit, the server will block the repair task and wait for a certain period of time.
[0198] If the database scan speed does not reach the scan speed limit, the server retrieves the previous time unit check-in records of the user account from the database.
[0199] Meanwhile, the server can read the check-in data of the user account from the cache;
[0200] The server determines whether the previous time unit check-in records of the user account are missing in the cache based on the user account's previous time unit check-in records in the database and the check-in data of the user account read from the cache.
[0201] If missing, the server will repair the check-in data of the user account in the cache.
[0202] By performing scheduled repairs, the consistency of check-in records in the cache and database can be further guaranteed.
[0203] In one specific embodiment of this disclosure, the current check-in period can be determined based on check-in configuration information, which may include the start time of the check-in activity and the length of the check-in activity period. The start time and length of the check-in activity can be set through the check-in configuration information, thus accurately determining the start and end times of each check-in period. Based on the current time, the start and end times of the current check-in period can be determined.
[0204] The check-in configuration information can also include a cache expiration time. When the cache expiration time is reached, the check-in data in the cache can be cleared.
[0205] The check-in configuration information can be updated according to the actual situation, and the check-in activities can be flexibly deployed.
[0206] Corresponding to the above method embodiments, this disclosure also provides a check-in processing device applied to the server. The check-in processing device described below can be referred to in correspondence with the check-in processing method described above.
[0207] See Figure 7 As shown, the device may include the following modules:
[0208] The database update module 710 is configured to add a check-in record for the current time unit of the first user account to the database when the first user account is detected to have made a check-in through the client.
[0209] The cache update module 720 is configured to update the check-in data of the first user account in the cache corresponding to the database. The check-in data of the first user account in the cache is the check-in data corresponding to a check-in period, and each check-in period includes multiple time units.
[0210] The sign-in record query module 730 is configured to, upon receiving a sign-in record query request from the client, return the sign-in record query result to the client based on the sign-in data of the first user account in the cache.
[0211] Using the apparatus provided in this embodiment, when the server detects that a user account has performed a check-in activity through the client, it adds a check-in record for the current time unit of the user account to the database and updates the corresponding check-in data of the user account in the database cache. Upon receiving a check-in record query request sent by the client, the server returns the check-in record query result to the client based on the check-in data of the user account in the cache. By adding a caching mechanism to the database and updating the check-in data of the user account in the cache while adding a check-in record to the database, the consistency between the check-in data in the cache and the corresponding data in the database can be guaranteed. Thus, when performing a check-in record query, based on the check-in data in the cache, the query result can be returned quickly and accurately, reducing the number of database reads, reducing the database read / write pressure, and improving the overall performance of the check-in system.
[0212] In one specific embodiment of this disclosure, the cache update module 720 is configured to perform:
[0213] Retrieve the total sign-in records for the first user account in the database for the current sign-in period. The total sign-in records include the sign-in records for the current time unit.
[0214] Based on the total check-in records for the current check-in period, determine the check-in record value and the most recent check-in time for the first user account in the current check-in period;
[0215] Update the check-in record values in the cache of the first user account in the database to the check-in record values for the current check-in period;
[0216] Update the check-in data of the first user account in the cache, including the most recent check-in time, to the most recent check-in time of the current check-in period.
[0217] In one specific embodiment of this disclosure, the cache update module 720 is configured to perform:
[0218] Determine whether the current check-in time of the check-in record in the current time unit and the most recent check-in time included in the check-in data of the first user account in the corresponding database cache are within a check-in period;
[0219] If within a check-in period, the binary sequence corresponding to the check-in record value included in the check-in data of the first user account in the cache is shifted N bits to the high bits, and after the lowest bit is set to 1, it is updated to the new check-in record value. The most recent check-in time included in the check-in data of the first user account in the cache is updated to the current check-in time, where N is the difference between the time unit where the most recent check-in time included in the check-in data of the first user account in the cache is located and the current time unit.
[0220] If the check-in period is not within a certain period, the check-in record value of the first user account in the cache will be updated to 1, and the most recent check-in time of the first user account in the cache will be updated to the current check-in time.
[0221] In one specific embodiment of this disclosure, an asynchronous update module is also included, configured to perform:
[0222] After updating the check-in data of the first user account in the corresponding cache of the database, if updating the check-in data of the first user account in the cache fails, a first update message is generated.
[0223] The first update message is added to the update message queue so that the check-in data in the cache can be updated asynchronously based on the update message queue.
[0224] In one specific embodiment of this disclosure, the asynchronous update module is configured to perform:
[0225] Read the second update message from the update message queue;
[0226] Query the database for the sign-in record of the second user account corresponding to the second update message;
[0227] Update the check-in data of the second user account in the cache according to the check-in record of the second user account corresponding to the second update message.
[0228] In one specific embodiment of this disclosure, the asynchronous update module is configured to perform:
[0229] If an update message is detected in the update message queue and the message processing speed has not reached the processing speed limit, read the second update message in the update message queue.
[0230] In one specific embodiment of this disclosure, an asynchronous adjustment module is also included, configured to perform:
[0231] If the system detects that the number of check-in records in the cache for the first user account has reached the set maximum value, a first adjustment message is generated.
[0232] The first adjustment message is added to the adjustment message queue so that the check-in data in the cache can be adjusted asynchronously based on the adjustment message queue.
[0233] In one specific embodiment of this disclosure, a timed repair module is also included, configured to perform:
[0234] If the set repair time point is reached, retrieve the previous time unit check-in record of the first user account in the database;
[0235] Based on the previous time unit check-in records of the first user account in the database, determine whether the previous time unit check-in records of the first user account are missing in the cache;
[0236] If missing, the check-in data for the first user account in the cache will be repaired.
[0237] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0238] Corresponding to the above method embodiments, this disclosure also provides a check-in processing device, including:
[0239] processor;
[0240] Memory used to store processor-executable instructions;
[0241] The processor is configured to execute instructions to implement the above-mentioned check-in process.
[0242] like Figure 8 The diagram shows the structural composition of a check-in processing device, which may include a processor 10, a memory 11, a communication interface 12, and a communication bus 13. The processor 10, memory 11, and communication interface 12 all communicate with each other through the communication bus 13.
[0243] In this embodiment of the disclosure, the processor 10 may be a central processing unit (CPU), an application-specific integrated circuit, a digital signal processor, a field-programmable gate array, or other programmable logic devices.
[0244] The processor 10 can call the program stored in the memory 11. Specifically, the processor 10 can execute the operations in the embodiment of the check-in processing method.
[0245] The memory 11 is used to store one or more programs. The programs may include program code, which includes computer operation instructions. In this embodiment of the disclosure, the memory 11 stores at least a program for implementing the following functions:
[0246] If the first user account is detected to have made a check-in through the client, add the check-in record of the first user account for the current time unit to the database;
[0247] Update the check-in data of the first user account in the corresponding cache of the database. The check-in data of the first user account in the cache is the check-in data corresponding to one check-in period, and each check-in period includes multiple time units.
[0248] Upon receiving a check-in record query request from the client, the system returns the check-in record query results to the client based on the check-in data of the first user account in the cache.
[0249] In one possible implementation, the memory 11 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function (such as database read / write function, cache update function, etc.). The data storage area may store data created during use, such as check-in record data, query result data, etc.
[0250] In addition, memory 11 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device or other volatile solid-state storage device.
[0251] Communication interface 12 can be an interface for the communication module, used to connect with other devices or systems.
[0252] Of course, it should be noted that, Figure 8 The structure shown does not constitute a limitation on the check-in processing device in the embodiments of this disclosure. In practical applications, the check-in processing device may include devices such as... Figure 8 More or fewer components as shown, or combinations of certain components.
[0253] Corresponding to the above method embodiments, this disclosure also provides a computer-readable storage medium, which, when the instructions in the computer-readable storage medium are executed by the processor of the check-in processing device, enables the check-in processing device to perform the above-described check-in processing method.
[0254] Furthermore, it should be noted that this disclosure also provides a computer program product or computer program, which may include computer instructions stored in a computer-readable storage medium. The processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the check-in processing method described in the preceding embodiments; therefore, this will not be repeated here. Additionally, the beneficial effects of using the same method will not be repeated here either. For technical details not disclosed in the embodiments of the computer program product or computer program involved in this disclosure, please refer to the description of the method embodiments of this disclosure.
[0255] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.
[0256] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A sign-in processing method, characterized in that, Applied to the server side, the check-in processing method includes: If the first user account is detected to have made a check-in through the client, add the check-in record of the first user account for the current time unit to the database; Update the check-in data of the first user account in the cache corresponding to the database. The check-in data of the first user account in the cache is the check-in data corresponding to a check-in period, and each check-in period includes multiple time units. Upon receiving a check-in record query request from the client, the system returns the check-in record query result to the client based on the check-in data of the first user account in the cache. The step of updating the check-in data of the first user account in the cache corresponding to the database includes: determining whether the current check-in time of the check-in record in the current time unit and the most recent check-in time included in the check-in data of the first user account in the cache corresponding to the database are within a check-in period; if they are within a check-in period, the binary sequence corresponding to the check-in record value included in the check-in data of the first user account in the cache is shifted N bits to the high-order bits, and after the lowest bit is set to 1, it is updated to a new check-in record value, and the most recent check-in time included in the check-in data of the first user account in the cache is updated to the current check-in time, where N is the difference between the time unit in which the most recent check-in time included in the check-in data of the first user account in the cache is located and the current time unit; if they are not within a check-in period, the check-in record value included in the check-in data of the first user account in the cache is updated to 1, and the most recent check-in time included in the check-in data of the first user account in the cache is updated to the current check-in time.
2. The check-in processing method according to claim 1, characterized in that, After updating the check-in data of the first user account in the cache corresponding to the database, the process also includes: If updating the check-in data of the first user account in the cache fails, a first update message is generated; The first update message is added to the update message queue so that the check-in data in the cache can be updated asynchronously based on the update message queue.
3. The check-in processing method according to claim 2, characterized in that, The asynchronous update of the check-in data in the cache based on the update message queue includes: Read the second update message from the update message queue; Query the database for the sign-in record of the second user account corresponding to the second update message; Update the check-in data of the second user account in the cache according to the check-in record of the second user account corresponding to the second update message.
4. The check-in processing method according to claim 3, characterized in that, Reading the second update message from the update message queue includes: If an update message is detected in the update message queue and the message processing speed has not reached the processing speed limit, the second update message in the update message queue is read.
5. The check-in processing method according to claim 1, characterized in that, Also includes: If the system detects that the number of check-in records included in the check-in data of the first user account in the cache has reached the set maximum value, a first adjustment message is generated. The first adjustment message is added to the adjustment message queue so that the check-in data in the cache can be adjusted asynchronously based on the adjustment message queue.
6. The check-in processing method according to any one of claims 1 to 5, characterized in that, Also includes: If the set repair time point is reached, retrieve the previous time unit check-in record of the first user account in the database; Based on the previous time unit check-in records of the first user account in the database, determine whether the previous time unit check-in records of the first user account are missing in the cache; If missing, the check-in data of the first user account in the cache will be repaired.
7. A sign-in processing device, characterized in that, Applied to the server side, the check-in processing device includes: The database update module is configured to add a check-in record for the first user account in the database for the current time unit when a check-in action is detected by the first user account through the client. The cache update module is configured to update the check-in data of the first user account in the cache corresponding to the database. The check-in data of the first user account in the cache is the check-in data corresponding to a check-in period, and each check-in period includes multiple time units. The module determines whether the current check-in time of the check-in record in the current time unit and the most recent check-in time included in the check-in data of the first user account in the cache of the database are within the same check-in period. If they are within the same check-in period, the module then moves the binary sequence corresponding to the check-in record value included in the check-in data of the first user account in the cache up to the next higher position. The check-in record value is updated after shifting the bit by N positions and setting the lowest bit to 1. The most recent check-in time included in the check-in data of the first user account in the cache is updated to the current check-in time, where N is the difference between the time unit of the most recent check-in time included in the check-in data of the first user account in the cache and the current time unit. If it is not within a check-in period, the check-in record value included in the check-in data of the first user account in the cache is updated to 1, and the most recent check-in time included in the check-in data of the first user account in the cache is updated to the current check-in time. The sign-in record query module is configured to, upon receiving a sign-in record query request from the client, return the sign-in record query result to the client based on the sign-in data of the first user account in the cache.
8. The check-in processing device according to claim 7, characterized in that, It also includes an asynchronous update module, configured to execute: After updating the check-in data of the first user account in the cache corresponding to the database, if updating the check-in data of the first user account in the cache fails, a first update message is generated. The first update message is added to the update message queue so that the check-in data in the cache can be updated asynchronously based on the update message queue.
9. The check-in processing device according to claim 8, characterized in that, The asynchronous update module is configured to execute: Read the second update message from the update message queue; Query the database for the sign-in record of the second user account corresponding to the second update message; Update the check-in data of the second user account in the cache according to the check-in record of the second user account corresponding to the second update message.
10. The check-in processing device according to claim 9, characterized in that, The asynchronous update module is configured to execute: If an update message is detected in the update message queue and the message processing speed has not reached the processing speed limit, the second update message in the update message queue is read.
11. The check-in processing device according to claim 7, characterized in that, It also includes an asynchronous adjustment module, configured to execute: If the system detects that the number of check-in records included in the check-in data of the first user account in the cache has reached the set maximum value, a first adjustment message is generated. The first adjustment message is added to the adjustment message queue so that the check-in data in the cache can be adjusted asynchronously based on the adjustment message queue.
12. The check-in processing device according to any one of claims 7 to 11, characterized in that, It also includes a scheduled repair module, which is configured to perform: If the set repair time point is reached, retrieve the previous time unit check-in record of the first user account in the database; Based on the previous time unit check-in records of the first user account in the database, determine whether the previous time unit check-in records of the first user account are missing in the cache; If missing, the check-in data of the first user account in the cache will be repaired.
13. A check-in processing device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the check-in processing method as described in any one of claims 1 to 6.
14. A computer-readable storage medium, characterized in that, When the instructions in the computer-readable storage medium are executed by the processor of the check-in processing device, the check-in processing device is enabled to perform the check-in processing method as described in any one of claims 1 to 6.
15. A computer program product, characterized in that, The computer program product includes computer instructions stored in a computer-readable storage medium and adapted to be read and executed by a processor to cause a computer device having the processor to perform the check-in processing method as described in any one of claims 1 to 6.