Check-in data processing method and device, electronic equipment and storage medium
By storing the daily check-in data of the target account as a single record in the database, the problem of having to traverse all data when querying check-in records in existing technologies is solved, thus achieving a more efficient check-in status query.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-23
- Publication Date
- 2026-03-17
AI Technical Summary
In existing technologies, querying sign-in records requires traversing all sign-in data, resulting in high time complexity.
The daily check-in data of the target account is stored as a single record in the database. By retrieving this record, the check-in status can be determined, avoiding the process of traversing multiple records.
It reduces query time complexity and improves query efficiency.
Smart Images

Figure CN114661733B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing, and more particularly to a method and apparatus for processing check-in data, an electronic device, and a storage medium. Background Technology
[0002] In some online activities, there's a scenario where users check in daily through an app. After 30 consecutive days of check-ins, they receive a "full attendance gift." If they forget to check in, they have to start accumulating check-in days again. For missed check-ins, users can earn "make-up check-in cards" by completing other tasks (such as browsing a webpage for 30 seconds or downloading an app). These cards can be used to make up for missed check-ins from the most recent day.
[0003] In existing technologies, middleware is typically used to query sign-in data. For example, a Redis database is used to record the date of each sign-in. For instance, if user ID: userpin001 signs in on July 17, 2020, a record named usersign:userpin001:20200717 is written to Redis. If the user signs in again tomorrow, the new sign-in record will be usersign:userpin001:20200718. Therefore, when it's necessary to query all sign-in records for the current user, the command "keys usersign:userpin001:*" can be used to retrieve all records for user ID "userpin001". The resulting set can then be used to determine the make-up sign-in date. When a make-up sign-in is needed, the specified date key-value pair can be directly inserted into the Redis database to complete the make-up sign-in logic.
[0004] As can be seen from the above, the existing technology's supplementary signature logic is as follows: since a record needs to be stored in the database every time a signature record appears, when querying a supplementary signature record, it is necessary to traverse all the signature data stored in the Redis database to obtain the supplementary signature date, resulting in high overall time complexity. Summary of the Invention
[0005] This application provides a check-in data processing method and apparatus, electronic device and storage medium to at least solve the problem of high time complexity in related technologies, which requires traversing all check-in data for each query of check-in records.
[0006] According to one aspect of the embodiments of this application, a check-in data processing method is provided, the method comprising:
[0007] Obtain a query instruction, wherein the query instruction is used to query the check-in status of the target account;
[0008] The first sign-in record of the target account is obtained from the database, wherein the first sign-in record includes the sign-in data of the target account for each sign-in period, and all sign-in data of the same account are stored in the same record of the database.
[0009] The check-in status of the target account is determined based on the first check-in record.
[0010] Optionally, determining the check-in status of the target account based on the first check-in record includes at least one of the following:
[0011] The first sign-in count of the target account is determined based on the first sign-in record, wherein the first sign-in count is the number of consecutive sign-ins before the sign-in period ended;
[0012] The missing sign-in information of the target account is determined based on the first sign-in record;
[0013] The second sign-in count of the target account is determined based on the first sign-in record, wherein the second sign-in count is the number of consecutive sign-ins after a break in sign-in.
[0014] Optionally, before obtaining the query instruction, the method further includes at least one of the following:
[0015] Upon detecting a check-in operation, update the first check-in count stored in the first field of the first check-in record;
[0016] If no check-in operation is detected within a check-in period, update the number of missed check-ins stored in the second field of the first check-in record, wherein the missed check-in information includes the number of missed check-ins;
[0017] If a sign-in operation following a missed sign-in is detected, update the second sign-in count stored in the third field of the first sign-in record.
[0018] Optionally, updating the number of missed check-ins stored in the second field of the first check-in record includes:
[0019] In the case that this is the first time that a sign-in has been interrupted after consecutive sign-ins, the second field is inserted into the first sign-in record, and the number of sign-ins interrupted is recorded in the second field. There is a separator between any two fields in the first sign-in record.
[0020] If this is a case of consecutive missed signatures, update the number of missed signatures in the second field.
[0021] Optionally, updating the first check-in count stored in the first field of the first check-in record when a check-in operation is detected includes:
[0022] If the first sign-in count is not zero and no missing sign-in data is detected, the first sign-in count is increased by a first target value, and the first field is updated using the first sign-in count after increasing the first target value.
[0023] Optionally, updating the first check-in count stored in the first field of the first check-in record when a check-in operation is detected further includes:
[0024] If the first sign-in count before the update is zero, insert the first field into the first sign-in record, increase the first sign-in count by a second target value, and write the first sign-in count after increasing the second target value into the first field.
[0025] Optionally, the method further includes:
[0026] Based on the first check-in count and the second check-in count, the total number of consecutive check-ins for the target account is determined, wherein the total number of check-ins is the sum of the first check-in count and all the second check-in counts.
[0027] According to another aspect of the embodiments of this application, a check-in data processing apparatus is also provided, the apparatus comprising:
[0028] The first acquisition module is used to acquire a query instruction, wherein the query instruction is used to query the check-in status of the target account;
[0029] The second acquisition module is used to acquire the first sign-in record of the target account from the database, wherein the first sign-in record includes the sign-in data of the target account for each sign-in period, and all sign-in data of the same account are stored in the same record in the database;
[0030] The first determining module is used to determine the check-in status of the target account based on the first check-in record.
[0031] Optionally, the first determining module includes at least one of the following:
[0032] The first determining submodule is used to determine the first sign-in count of the target account based on the first sign-in record, wherein the first sign-in count is the number of consecutive sign-ins before the sign-in interruption;
[0033] The second determining submodule is used to determine the missing sign-in information of the target account based on the first sign-in record;
[0034] The third determining submodule is used to determine the second sign-in count of the target account based on the first sign-in record, wherein the second sign-in count is the number of consecutive sign-ins after a break in sign-in.
[0035] Optionally, prior to the first acquisition module, the device further includes at least one of the following:
[0036] The first update module is used to update the first sign-in count stored in the first field of the first sign-in record when a sign-in operation is detected.
[0037] The second update module is used to update the number of missed check-ins stored in the second field of the first check-in record when no check-in operation is detected within a check-in period, wherein the missed check-in information includes the number of missed check-ins;
[0038] The third update module is used to update the second check-in count stored in the third field of the first check-in record when a check-in operation after a check-in interruption is detected.
[0039] Optionally, the second update module includes:
[0040] The recording unit is used to insert the second field into the first sign-in record when the current sign-in interruption is the first sign-in interruption after continuous sign-in, and to record the number of sign-in interruptions in the second field, wherein there is a separator between any two fields in the first sign-in record;
[0041] The update unit is used to update the number of missed signatures in the second field when the current missed signature is consecutive.
[0042] Optionally, the first update module includes:
[0043] The first update subunit is used to increase the first sign-in count by a first target value when the first sign-in count is not zero and no missing sign-in data is detected, and to update the first field using the first sign-in count after increasing the first target value.
[0044] Optionally, the first update module also includes:
[0045] The second update subunit is used to insert the first field into the first sign-in record when the first sign-in count before the update is zero, and to increase the first sign-in count by a second target value, and to write the first sign-in count after increasing the second target value into the first field.
[0046] Optionally, the device further includes:
[0047] The second determining module is used to determine the total number of consecutive check-ins for the target account based on the first check-in count and the second check-in count, wherein the total number of consecutive check-ins is the sum of the first check-in count and all the second check-in counts.
[0048] According to another aspect of the embodiments of this application, an electronic device is also provided, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; wherein the memory is used to store a computer program; and the processor is used to execute the check-in data processing method steps in any of the above embodiments by running the computer program stored in the memory.
[0049] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, wherein a computer program is stored therein, wherein the computer program is configured to execute the check-in data processing method steps of any of the above embodiments when running.
[0050] According to another aspect of the embodiments of this application, a computer program product or computer program is also provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, causing the computer device to perform the check-in data processing method steps in any of the above embodiments.
[0051] In this embodiment of the application, by storing the daily check-in data of the target account as a single record in the database, when searching for the check-in status of the target account, only the check-in record corresponding to the target account needs to be found, instead of searching multiple records. This solves the problem in the prior art that all check-in data needs to be traversed for each query of supplementary check-in records, saving query time and reducing time complexity. Attached Figure Description
[0052] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0053] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0054] Figure 1 This is a schematic diagram of the hardware environment for an optional check-in data processing method according to an embodiment of the present invention;
[0055] Figure 2 This is a flowchart illustrating an optional check-in data processing method according to an embodiment of this application;
[0056] Figure 3This is a schematic diagram of an optional check-in method according to an embodiment of this application;
[0057] Figure 4 This is a schematic diagram of an optional re-signing method according to an embodiment of this application;
[0058] Figure 5 This is a structural block diagram of an optional sign-in data processing device according to an embodiment of this application;
[0059] Figure 6 This is a structural block diagram of an optional electronic device according to an embodiment of this application. Detailed Implementation
[0060] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0061] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application 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 application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0062] This application provides a check-in data processing method, which is applied to business scenarios that involve the statistics and display of user check-in status, such as the number of consecutive check-ins, the number of renewals, and the number of make-up check-ins.
[0063] Optionally, in the embodiments of this application, the above-described check-in data processing method can be applied to, for example... Figure 1 In the hardware environment shown. For example... Figure 1As shown, terminal 102 may include memory 104, processor 106, and display 108 (optional component). Terminal 102 can communicate with server 112 via network 110. Server 112 can provide services (such as game services, application services, etc.) to the terminal or clients installed on the terminal. Database 114 can be set up on or independently of server 112 to provide data storage services to server 112. In addition, server 112 may run a processing engine 116, which can be used to execute the steps performed by server 112.
[0064] Optionally, terminal 102 may be, but is not limited to, a terminal capable of computing data, such as a mobile terminal (e.g., mobile phone, tablet computer), laptop computer, PC (Personal Computer), etc. The aforementioned network may include, but is not limited to, a wireless network or a wired network. The wireless network includes Bluetooth, Wi-Fi (Wireless Fidelity), and other networks that enable wireless communication. The aforementioned wired network may include, but is not limited to, a wide area network (WAN), a metropolitan area network (MAN), and a local area network (LAN). The aforementioned server 112 may include, but is not limited to, any hardware device capable of computing.
[0065] Furthermore, in this embodiment, the above-described check-in data processing method can also be applied to, but is not limited to, a powerful independent processing device without requiring data interaction. For example, the processing device can be, but is not limited to, a powerful terminal device; that is, the various operations in the above-described check-in data processing method can be integrated into a single independent processing device. The above is merely an example, and this embodiment does not impose any limitations on it.
[0066] Optionally, in this embodiment, the above-mentioned check-in data processing method can be executed by server 112, by terminal 102, or by both server 112 and terminal 102. The check-in data processing method of this embodiment can also be executed by a client installed on terminal 102.
[0067] Taking running on a server as an example, Figure 2 This is a flowchart illustrating an optional check-in data processing method according to an embodiment of this application, as shown below. Figure 2 As shown, the process of this method may include the following steps:
[0068] Step S201: Obtain a query instruction, wherein the query instruction is used to query the check-in status of the target account.
[0069] Optionally, in this embodiment of the application, when a user needs to query which days they have checked in, they will send a query instruction to the server through the terminal device. The query instruction is used to query the check-in status of the target account, which is the current user's check-in account.
[0070] Step S202: Retrieve the first sign-in record of the target account from the database. The first sign-in record includes the sign-in data of the target account for each sign-in period. All sign-in data of the same account are stored in the same record in the database.
[0071] Optionally, in this embodiment of the application, the check-in status of the target account is stored in the database as a record (i.e., the first check-in record). When the server receives a query for the check-in status of the target account, the server directly retrieves the first check-in record of the target account from the database. The first check-in record includes the daily check-in data of the target account. All check-in data of the same account is stored in the same record. There is a one-to-one correspondence between user accounts and check-in records. When saving check-in data, if it is a new user, a new record is created for him / her. If it is an existing user, the check-in data is directly updated to the user's record.
[0072] Step S203: Determine the check-in status of the target account based on the first check-in record.
[0073] Optionally, after obtaining the first check-in record, the check-in status of the target account can be obtained based on the check-in data in the first check-in record. Here, the check-in status can include the number of consecutive check-ins of the target account, the check-in time corresponding to the number of consecutive check-ins, the check-in interruption information (including the number of check-in interruption rounds, the number of check-in interruptions in each round, where the number of check-in interruption rounds can be multiple rounds, and each round of check-in interruption includes at least one check-in interruption), the number of consecutive check-ins after each round of check-in interruption, and the time, etc.
[0074] In this embodiment of the application, by storing the daily check-in data of the target account as a single record in the database, when searching for the check-in status of the target account, it is only necessary to find the check-in record corresponding to the target account. This solves the problem in the prior art that all check-in data needs to be traversed for each query of supplementary check-in records, saving query time and reducing time complexity.
[0075] As an optional embodiment, determining the check-in status of the target account based on the first check-in record includes at least one of the following:
[0076] The first sign-in count of the target account is determined based on the first sign-in record, where the first sign-in count is the number of consecutive sign-ins before the sign-in period ended;
[0077] The number of missed check-ins for the target account is determined based on the first check-in record, where the missed check-in information includes the number of missed check-ins;
[0078] The second sign-in count for the target account is determined based on the first sign-in record, where the second sign-in count is the number of consecutive sign-ins after a break in sign-in.
[0079] Optionally, the check-in status of the target account includes the first check-in count, the number of missed check-ins, and the second check-in count. The first check-in count is the number of consecutive check-ins before the missed check-in, the number of missed check-ins is the number of cards to be replaced for the target account, and the number of consecutive check-ins is the number of consecutive check-ins for the target account after the missed check-in.
[0080] As an optional embodiment, the method further includes at least one of the following before obtaining the query instruction:
[0081] Upon detecting a check-in operation, update the first check-in count stored in the first field of the first check-in record;
[0082] If no sign-in operation is detected within a sign-in period, update the number of missed sign-ins stored in the second field of the first sign-in record.
[0083] If a sign-in operation following a missed sign-in is detected, update the second sign-in count stored in the third field of the first sign-in record.
[0084] Optionally, in this embodiment of the application, the first sign-in record stores a first field (such as field A), a second field (such as field B) and a third field (such as field C), wherein the first field is used to store the value of the first sign-in count, the second field is used to store the value of the number of missed sign-ins, and the third field is used to store the value of the second sign-in count.
[0085] If the server detects a check-in operation, the first field in the first check-in record is updated. This update usually refers to increasing the value stored in the first field. If no check-in operation is detected within a check-in period (such as a day, a period of time, etc.), it indicates that the current user has missed a check-in, so the value in the second field of the first check-in record is updated according to the number of missed check-ins.
[0086] In this embodiment of the application, a data structure is set to store the sign-in data of the target account. According to the data structure, the first sign-in count, the number of missed sign-ins, and the second sign-in count of the target account are stored in a regular manner, so that users can clearly view the sign-in data after obtaining their own sign-in records.
[0087] As an optional implementation, updating the number of missed check-ins stored in the second field of the first check-in record includes:
[0088] In the case that this is the first time that a sign-in has been interrupted after consecutive sign-ins, a second field is inserted into the first sign-in record, and the number of sign-ins interrupted is recorded in the second field. There is a separator between any two fields in the first sign-in record.
[0089] If this is a case of consecutive missed signatures, update the number of missed signatures in the second field.
[0090] Optionally, if the current missed sign-in is the first missed sign-in after a series of consecutive sign-ins, a second field is inserted into the first sign-in record. This second field is used to record the number of missed sign-ins.
[0091] Additionally, it should be noted that there is a separator between any two fields in the first check-in record. This separator can be any symbol, as long as it can distinguish any two fields. For example, if the separator is set to "_", the first check-in count is 4, the number of missed check-ins is 3, and the second check-in count is 4, then the check-in data format in the first record would be: First Field_Second Field_Third Field, such as: 4_3_4. Of course, to better distinguish between the number of missed check-ins and the number of second check-ins, any character can be added to the second field, such as adding any character before the 3, such as "0", then the check-in data format in the first record would be: 4_03_4.
[0092] If the current sign-in interruption is a consecutive one, update the number of consecutive sign-ins in the second field. For example: if there were 4 consecutive sign-ins before this sign-in interruption, and then another 3 days of absence, the first sign-in record becomes: 4_03; if there was another 1 day of absence, the first sign-in record becomes: 4_04.
[0093] In this embodiment of the application, by setting the data format for recording check-in in the first record, the number of consecutive check-ins, the number of missed check-ins, the number of renewals, etc., can be clearly recorded, which is convenient for users to query and count.
[0094] As an optional embodiment, updating the first sign-in count stored in the first field of the first sign-in record when a sign-in operation is detected includes:
[0095] like Figure 3 If the first sign-in count is not zero and no sign-out is detected, the first sign-in count is increased by the first target value, and the first field is updated using the first sign-in count after increasing the first target value.
[0096] Optionally, if the first sign-in count is not zero and no missing sign-in data is detected, it means that the user corresponding to the target account is not signing in for the first time and the target account is in a continuous sign-in state. Therefore, the first target value can be added to the first sign-in count value corresponding to the first field of the target account, such as adding 1.
[0097] The criterion for defining a target account as having no missed check-ins is: checking whether the target account's check-in time includes the day before the current date (i.e., yesterday's date). For example, if the first check-in count is 4, write "first check-in count 4" into the first field, and obtain the check-in times corresponding to the first check-in count 4 on the target account as: 20200101, 20200102, 20200103, 20200104. If the user's check-in date is 202200105, then the day before that date is 20200104. Therefore, if the target account's check-in time includes 20200104, it means the user also checked in yesterday, and the check-in was not interrupted. At this time, update the value in the first field. For example, if the first check-in record is 4, and the check-in is continuous, then the first check-in record becomes 5.
[0098] It should be noted that if the first check-in time does not include 20200104, it means that the user did not check in yesterday or even earlier. In this case, the number of missed check-ins can be determined based on the time 20200104 and the target account's check-in time. For example, if the target account's check-in time includes the dates 20200101 and 20200102, and the day before today's date is 20200104, then the user's number of missed check-ins is 2, and the number of missed check-ins is written as 2 in the second field. At the same time, if a check-in was performed this time, the number of second check-ins is written as 1 in the third field. In this case, the first check-in record becomes: 4_02_1.
[0099] As an optional embodiment, updating the first sign-in count stored in the first field of the first sign-in record when a sign-in operation is detected further includes:
[0100] like Figure 3 If the first sign-in count before the update is zero, insert the first field into the first sign-in record, and increase the first sign-in count by the second target value. Then, write the first sign-in count after increasing the second target value into the first field.
[0101] Optionally, if the first sign-in count is zero, indicating that the user corresponding to the target account is signing in for the first time, then the first sign-in count is directly increased by the second target value, for example, by one, and then the increased first sign-in count is written into the first field. For example, the first sign-in record is: 1.
[0102] As an optional embodiment, the method further includes:
[0103] Based on the first and second check-in counts, determine the total number of consecutive check-ins for the target account, where the total number of check-ins is the sum of the first check-in count and all second check-in counts.
[0104] Optionally, such as Figure 4When a user needs to make up for a missed sign-in, check the value of the second field in the first sign-in record, and then subtract one until the data in the second field becomes zero. This indicates that the missed sign-in has been made up. After the sign-in is made up, delete the second field from the first sign-in record.
[0105] To obtain the total number of consecutive check-ins for the target account, simply add the first check-in count written in the first field to the second check-in count written in the third field.
[0106] For example, if the first sign-in record is 4_02_2, and a one-day overdue sign-in is made up, then the first sign-in record becomes 4_01_2.
[0107] Based on the first sign-in record 4_01_2, one day of supplementary sign-in was added, so the first sign-in record becomes: 6.
[0108] This application embodiment uses the first sign-in record to make up for the number of times the target account missed a sign-in, which can quickly achieve the effect of making up for the missed sign-in. At the same time, after the sign-in is made up, the first sign-in count and the second sign-in count are added together, which can more intuitively show the total number of consecutive sign-ins of the target account before and after the sign-in missed.
[0109] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0110] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM (Read-Only Memory) / RAM (Random Access Memory), magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.
[0111] According to another aspect of the embodiments of this application, a check-in data processing apparatus for implementing the above-described check-in data processing method is also provided. Figure 5This is a schematic diagram of an optional check-in data processing device according to an embodiment of this application, such as... Figure 5 As shown, the device may include:
[0112] The first acquisition module 501 is used to acquire a query instruction, wherein the query instruction is used to query the sign-in status of the target account;
[0113] The second acquisition module 502 is used to acquire the first sign-in record of the target account from the database. The first sign-in record includes the sign-in data of the target account for each sign-in period. All sign-in data of the same account are stored in the same record in the database.
[0114] The first determination module 503 is used to determine the check-in status of the target account based on the first check-in record.
[0115] It should be noted that the first acquisition module 501 in this embodiment can be used to execute the above step S201, the second acquisition module 502 in this embodiment can be used to execute the above step S202, and the first determination module 503 in this embodiment can be used to execute the above step S203.
[0116] By storing the daily check-in data of the target account as a single record in the database through the above module, when searching for the check-in status of the target account, it is only necessary to find the check-in record corresponding to the target account. This solves the problem in the existing technology that all check-in data needs to be traversed for each query of supplementary check-in records, saving query time and reducing time complexity.
[0117] As an optional embodiment, the first determining module includes at least one of the following:
[0118] The first determination submodule is used to determine the first sign-in count of the target account based on the first sign-in record, wherein the first sign-in count is the number of consecutive sign-ins before the sign-in interruption;
[0119] The second determination submodule is used to determine the number of missed signatures for the target account based on the first sign-in record;
[0120] The third determination submodule is used to determine the second sign-in count of the target account based on the first sign-in record, wherein the second sign-in count is the number of consecutive sign-ins after a break in sign-in.
[0121] Optionally, prior to the first acquisition module, the device further includes at least one of the following:
[0122] The first update module is used to update the first sign-in count stored in the first field of the first sign-in record when a sign-in operation is detected.
[0123] The second update module is used to update the number of missed check-ins stored in the second field of the first check-in record when no check-in operation is detected within a check-in period. The missed check-in information includes the number of missed check-ins.
[0124] The third update module is used to update the second check-in count stored in the third field of the first check-in record when a check-in operation after a missed check-in is detected.
[0125] As an optional embodiment, the second update module includes:
[0126] The recording unit is used to insert a second field into the first sign-in record when the current sign-in interruption is the first sign-in interruption after continuous sign-in. The second field records the number of sign-ins interruptions. There is a separator between any two fields in the first sign-in record.
[0127] The update unit is used to update the number of missed signatures in the second field when the current missed signatures are consecutive.
[0128] As an optional embodiment, the first update module includes:
[0129] The first update subunit is used to increase the first sign-in count by a first target value when the first sign-in count is not zero and no missing sign-in data is detected, and then update the first field with the first sign-in count after increasing the first target value.
[0130] As an optional embodiment, the first update module further includes:
[0131] The second update subunit is used to insert the first field into the first sign-in record when the first sign-in count before the update is zero, and to increase the first sign-in count by a second target value, and then write the first sign-in count after increasing the second target value into the first field.
[0132] As an optional embodiment, the device further includes:
[0133] The second determining module is used to determine the total number of consecutive check-ins for the target account based on the first check-in count and the second check-in count, wherein the total number of check-ins is the sum of the first check-in count and all second check-in counts.
[0134] It should be noted that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the content disclosed in the above embodiments. It should also be noted that the above modules, as part of a device, can operate in environments such as... Figure 1 The hardware environment shown can be implemented through software or hardware, and the hardware environment includes the network environment.
[0135] According to another aspect of the embodiments of this application, an electronic device for implementing the above-described check-in data processing method is also provided. The electronic device may be a server, a terminal, or a combination thereof.
[0136] Figure 6 This is a structural block diagram of an optional electronic device according to an embodiment of this application, such as... Figure 6 As shown, it includes a processor 601, a communication interface 602, a memory 603, and a communication bus 604. The processor 601, communication interface 602, and memory 603 communicate with each other via the communication bus 604.
[0137] Memory 603 is used to store computer programs;
[0138] When processor 601 executes a computer program stored in memory 603, it performs the following steps:
[0139] S1, obtain the query command, whereby the query command is used to query the sign-in status of the target account;
[0140] S2, retrieve the first sign-in record of the target account from the database. The first sign-in record includes the sign-in data of the target account for each sign-in period. All sign-in data of the same account are stored in the same record in the database.
[0141] S3, determine the check-in status of the target account based on the first check-in record.
[0142] Optionally, in this embodiment, the communication bus can be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0143] The communication interface is used for communication between the aforementioned electronic devices and other devices.
[0144] The memory may include RAM, or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0145] As an example, such as Figure 6As shown, the memory 602 may include, but is not limited to, the first acquisition module 501, the second acquisition module 502, and the first determination module 503 in the above-mentioned check-in data processing device. Furthermore, it may include, but is not limited to, other module units in the above-mentioned check-in data processing device, which will not be elaborated upon in this example.
[0146] The processors mentioned above can be general-purpose processors, including but not limited to: CPU (Central Processing Unit), NP (Network Processor), etc.; they can also be DSP (Digital Signal Processor), ASIC (Application Specific Integrated Circuit), FPGA (Field-Programmable Gate Array), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0147] In addition, the aforementioned electronic device also includes a display for showing the results of the check-in data processing.
[0148] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments, and will not be repeated here.
[0149] Those skilled in the art will understand that Figure 6 The structure shown is for illustrative purposes only. The device that implements the above check-in data processing method can be a terminal device, such as a smartphone (e.g., Android phone, iOS phone), tablet computer, PDA, mobile Internet Devices (MID), PAD, etc. Figure 6 This does not limit the structure of the aforementioned electronic devices. For example, the terminal device may also include components that are more advanced than those described above. Figure 6 The more or fewer components shown (such as network interfaces, display devices, etc.), or having the same Figure 6 The different configurations shown.
[0150] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, ROM, RAM, disk or optical disk, etc.
[0151] According to another aspect of the embodiments of this application, a storage medium is also provided. Optionally, in this embodiment, the storage medium can be used to execute program code for a check-in data processing method.
[0152] Optionally, in this embodiment, the storage medium may be located on at least one of the network devices in the network shown in the above embodiment.
[0153] Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps:
[0154] S1, obtain the query command, whereby the query command is used to query the sign-in status of the target account;
[0155] S2, retrieve the first sign-in record of the target account from the database. The first sign-in record includes the sign-in data of the target account for each sign-in period. All sign-in data of the same account are stored in the same record in the database.
[0156] S3, determine the check-in status of the target account based on the first check-in record.
[0157] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments, and will not be repeated in this embodiment.
[0158] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, ROMs, RAMs, portable hard drives, magnetic disks, or optical disks.
[0159] According to another aspect of the embodiments of this application, a computer program product or computer program is also provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, causing the computer device to perform the check-in data processing method steps in any of the above embodiments.
[0160] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0161] If the integrated units in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in the aforementioned computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the check-in data processing method of the various embodiments of this application.
[0162] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0163] In the several embodiments provided in this application, it should be understood that the disclosed client can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, or the indirect coupling or communication connection of units or modules may be electrical or other forms.
[0164] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the solution provided in this embodiment, depending on actual needs.
[0165] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0166] The above are merely preferred embodiments of this application. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A check-in data processing method, characterized by, The method comprises: obtaining a query instruction, wherein the query instruction is used to query a check-in state of a target account; obtaining a first check-in record of the target account from a database, wherein the first check-in record comprises check-in data of each check-in period of the target account, and all check-in data of the same account is saved in the same record in the database; determining the check-in state of the target account according to the first check-in record, wherein the first check-in record comprises a first field, a second field and a third field, the first field is used to store a value of a first check-in number, the second field is used to store a value of a break check-in number, and the third field is used to store a value of a second check-in number, in a case where the server detects a check-in operation, the value stored in the first field in the first check-in record is increased, and in a case where no check-in operation is detected in a check-in period, the value in the second field in the first check-in record is updated according to the break check-in number.
2. The method of claim 1, wherein, The determination of the check-in state of the target account according to the first check-in record comprises at least one of the following: determining a first check-in number of the target account according to the first check-in record, wherein the first check-in number is a continuous check-in number before break check-in; determining break check-in information of the target account according to the first check-in record; determining a second check-in number of the target account according to the first check-in record, wherein the second check-in number is a continuous check-in number after break check-in.
3. The method of claim 2, wherein, Before the obtaining of the query instruction, the method further comprises at least one of the following: in a case where a check-in operation is detected, updating the first check-in number saved in the first field of the first check-in record; in a case where no check-in operation is detected in a check-in period, updating the break check-in number saved in the second field of the first check-in record, wherein the break check-in information comprises the break check-in number; in a case where a check-in operation after break check-in is detected, updating the second check-in number saved in the third field of the first check-in record.
4. The method of claim 3, wherein, The updating of the break check-in number saved in the second field of the first check-in record comprises: in a case where this break check-in is the first break check-in after continuous check-in, inserting the second field in the first check-in record, and recording the break check-in number in the second field, wherein there is a separator between any two fields in the first check-in record; in a case where this break check-in is continuous break check-in, updating the break check-in number in the second field.
5. The method of claim 3, wherein, The updating of the first check-in number saved in the first field of the first check-in record in a case where a check-in operation is detected comprises: in a case where the first check-in number is not zero and no break check-in is detected, increasing the first check-in number by a first target value, and updating the first field by using the first check-in number after the increase of the first target value.
6. The method of claim 3, wherein, The updating of the first check-in number saved in the first field of the first check-in record in a case where a check-in operation is detected further comprises: In a case that the first check-in number before the update is zero, the first field is inserted in the first check-in record, and the first check-in number is increased by a second target value, and the first check-in number after the increase is written in the first field.
7. The method according to any one of claims 2 to 6, characterized in that, The method further comprises: determining a total number of continuous check-ins of the target account according to the first check-in number and the second check-in number, wherein the total number is the sum of the first check-in number and all the second check-in numbers.
8. A check-in data processing apparatus, characterized by comprising: The device comprises: a first obtaining module configured to obtain a query instruction, wherein the query instruction is used to query a check-in state of a target account; a second obtaining module configured to obtain a first check-in record of the target account from a database, wherein the first check-in record comprises check-in data of each check-in period of the target account, and all check-in data of the same account is saved in the same record in the database; a first determining module configured to determine the check-in state of the target account according to the first check-in record, wherein the first check-in record comprises a first field, a second field and a third field, the first field is used to store a value of a first check-in number, the second field is used to store a value of a break check-in number, and the third field is used to store a value of a second check-in number, in a case that the server detects a check-in operation, the value stored in the first field in the first check-in record is increased, and in a case that no check-in operation is detected in a check-in period, the value in the second field in the first check-in record is updated according to the break check-in number.
9. The apparatus of claim 8, wherein, The first determining module comprises at least one of: a first determining sub-module configured to determine the first check-in number of the target account according to the first check-in record, wherein the first check-in number is a continuous check-in number before the break check-in; a second determining sub-module configured to determine break check-in information of the target account according to the first check-in record; a third determining sub-module configured to determine the second check-in number of the target account according to the first check-in record, wherein the second check-in number is a continuous check-in number after the break check-in.
10. The apparatus of claim 9, wherein, The device further comprises at least one of: a first updating module configured to update the first check-in number saved in the first field of the first check-in record in a case that a check-in operation is detected; a second updating module configured to update the break check-in number saved in the second field of the first check-in record in a case that no check-in operation is detected in a check-in period, wherein the break check-in information comprises the break check-in number; a third updating module configured to update the second check-in number saved in the third field of the first check-in record in a case that a check-in operation after the break check-in is detected.
11. The apparatus of claim 10, wherein, The second updating module comprises: a recording unit configured to insert the second field in the first check-in record and record the break check-in number in the second field in a case that the current break check-in is the first break check-in after the continuous check-in, wherein there is a separator between any two fields in the first check-in record. The updating unit is configured to update the number of times of break in the second field in the case that the current break is continuous break.
12. The apparatus of claim 10, wherein, The first updating module comprises: The first updating sub-unit is configured to increase the first number of times of check-in by a first target value in the case that the first number of times of check-in is not zero and no break data is detected, and update the first field by using the first number of times of check-in after the first target value is added.
13. The apparatus of claim 10, wherein, The first updating module further comprises: The second updating sub-unit is configured to insert the first field in the first check-in record in the case that the first number of times of check-in before updating is zero, increase the first number of times of check-in by a second target value, and write the first field by using the first number of times of check-in after the second target value is added.
14. An electronic device comprising a processor, a communication interface, a memory and a communication bus, wherein, The processor, the communication interface and the memory complete communication with each other through the communication bus, and the processor is configured to execute the check-in data processing method steps in any one of claims 1 to 7 by running the computer program stored in the memory. The memory is configured to store a computer program. The processor is configured to execute the check-in data processing method steps in any one of claims 1 to 7 by running the computer program stored in the memory.
15. A computer readable storage medium, characterized in that, The storage medium stores a computer program, and the computer program is configured to execute the check-in data processing method steps in any one of claims 1 to 7 when running.
Citation Information
Patent Citations
Vertical and horizontal two-dimensional Golay coding-based binary operation sign-in method and apparatus
CN108460110A