CN113849477A - Sign-in management method and device, electronic equipment and storage medium - Google Patents

Sign-in management method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113849477A
CN113849477A CN202111006084.6A CN202111006084A CN113849477A CN 113849477 A CN113849477 A CN 113849477A CN 202111006084 A CN202111006084 A CN 202111006084A CN 113849477 A CN113849477 A CN 113849477A
Authority
CN
China
Prior art keywords
check
date
bit
digit
sign
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111006084.6A
Other languages
Chinese (zh)
Inventor
梁晨光
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qingdao Haier Technology Co Ltd, Haier Smart Home Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202111006084.6A priority Critical patent/CN113849477A/en
Publication of CN113849477A publication Critical patent/CN113849477A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/217Database tuning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a check-in management method, a check-in management device, electronic equipment and a storage medium, wherein the method comprises the following steps: receiving a check-in request sent by a client, wherein the check-in request carries a check-in user identifier; acquiring a digit group corresponding to a check-in date, positioning a bit value corresponding to the check-in user identifier in the digit group corresponding to the check-in date, updating the bit value into a checked-in state value, wherein the digit group comprises bit values representing the check-in state corresponding to each user identifier. According to the method, the device, the electronic equipment and the storage medium, the sign-in state of the user is stored in a data structure mode of the bit array, the pressure of a database is effectively reduced, more data are stored in a smaller storage space, and the updating of the bit array is based on bit operation, so that the response speed of the data is improved.

Description

Sign-in management method and device, electronic equipment and storage medium
Technical Field
The invention relates to the technical field of computers, in particular to a check-in management method, a check-in management device, electronic equipment and a storage medium.
Background
The importance of APP (mobile phone application) in daily life is bigger and bigger now, consequently for the daily active user who improves APP and more access volumes, each APP has all developed the function of checking in and checking the card, can sign in automatically after the user gets into APP, and save the record of signing in, this function can effectively record the daily user number of APP on the same day, improve APP access volume, strengthen the brand influence, and sign in the function and be a function that realizes more easily and with very low costs, but if the APP user is too much, it is also very much to sign in the record, form massive data, massive data can not cause the database to occupy a large amount of storage space, still can cause database performance to reduce or even collapse, lead to the data response untimely, user experience is poor.
Disclosure of Invention
The invention provides a check-in management method, a check-in management device, electronic equipment and a storage medium, which are used for solving the defect of database pressure caused by mass data storage of a database in the prior art.
The invention provides a check-in management method, which comprises the following steps:
receiving a check-in request sent by a client, wherein the check-in request carries a check-in user identifier;
acquiring a digit group corresponding to a check-in date, positioning a bit value corresponding to the check-in user identifier in the digit group corresponding to the check-in date, updating the bit value into a checked-in state value, wherein the digit group comprises bit values representing the check-in state corresponding to each user identifier.
According to the check-in management method provided by the invention, the acquiring of the digit group corresponding to the check-in date comprises the following steps:
determining the check-in date based on the time information carried in the check-in request or based on the receiving time of the check-in request;
and extracting the digit array corresponding to the check-in date from the digit array corresponding to each date.
According to a check-in management method provided by the present invention, the updating the bit value to a checked-in state value comprises:
if the bit value is the non-signed state value, updating the bit value to the signed state value, and returning a successful sign-in message to the client;
otherwise, the bit value keeps the checked-in state value and returns a repeated check-in message to the client.
The check-in management method provided by the invention further comprises the following steps:
receiving a query request sent by the client, wherein the query request carries a query user identifier and a query date;
acquiring a digit array corresponding to the query date, and determining sign-in state information based on a digit value corresponding to the query user identifier in the digit array corresponding to the query date;
and returning the check-in state information to the client.
The check-in management method provided by the invention further comprises the following steps:
determining a statistical date;
and determining the number of check-in users on the counting date based on the number of the checked-in state values in the digit group corresponding to the counting date.
The check-in management method provided by the invention further comprises the following steps:
determining a date to be recorded;
and initializing the corresponding bit array based on the date to be recorded, wherein the bit value corresponding to each user identifier in the initialized bit array is an unregistered state value.
The check-in management method provided by the invention further comprises the following steps:
receiving a new user request, wherein the new user request carries a new user date and a new user identifier;
and adding a bit value corresponding to the new user identifier in the new user date and the bit number group corresponding to each date after the new user date.
The present invention also provides a check-in management device, comprising:
a receiving module: the system comprises a client, a server and a server, wherein the client is used for receiving a check-in request sent by the client, and the check-in request carries a check-in user identifier;
an update module: the system comprises a user identification module, a sign-in user identification module and a digit group, wherein the sign-in user identification module is used for acquiring the digit group corresponding to the sign-in date, positioning the bit value corresponding to the sign-in user identification in the digit group corresponding to the sign-in date, updating the bit value into a sign-in state value, and the digit group comprises bit values representing the sign-in state corresponding to each user identification.
The invention also provides an electronic device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the program to realize the steps of the check-in management method.
The invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the check-in management method as described in any of the above.
The invention also provides a computer program product comprising a computer program which, when executed by a processor, performs the steps of the check-in management method as described in any one of the above.
According to the sign-in management method, the sign-in management device, the electronic equipment and the storage medium, the digit array is obtained through the sign-in date in the received sign-in request information, the corresponding digit value in the digit array is changed into the signed-in state according to the sign of the sign-in user, the sign-in state of the user is stored in a data structure mode of the digit array, based on the characteristics of the digit array, the data can be recorded by each digit value in the digit array, the storage space of the recorded data is greatly reduced, the pressure of a database is effectively reduced, more data are stored in a smaller storage space, and the updating of the digit array is based on the digit operation, so that the response speed of the data is improved.
Drawings
In order to more clearly illustrate the technical solutions of the present invention or the prior art, the drawings needed for the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
FIG. 1 is a flowchart illustrating a check-in management method according to an embodiment of the present invention;
FIG. 2 is a flow chart illustrating the process of obtaining a bit array by check-in date according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating a process for querying check-in status according to an embodiment of the present invention;
FIG. 4 is a schematic flow chart diagram for statistical check-in according to an embodiment of the present invention;
FIG. 5 is a schematic flow chart of creating an array of date bits to be recorded according to an embodiment of the present invention;
FIG. 6 is a flowchart of a check-in management interaction provided by an embodiment of the invention;
fig. 7 is a schematic flowchart of creating a user sign-in identifier according to an embodiment of the present invention;
FIG. 8 is a block diagram of a check-in management apparatus according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of an electronic device provided by the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The existing mass data is well stored, but if the existing mass data is limited in a relational database, various adverse factors can be generated after the mass data is stored, for example, the data volume is too large, a large amount of time and resources can be consumed in data statistics and data searching, the response time is too long, poor experience is brought to a user, and even database crash can be caused when the response time is serious.
In order to improve query speed and data integrity, two schemes are mostly adopted for storing check-in data at present: in the first scheme, only records of a certain time are saved, and old data can be deleted after the certain time point is reached; in the second scheme, after the data volume reaches a certain degree, the data is sorted, and old data is filed and processed. Both schemes have certain disadvantages, and the first scheme can not trace the historical data because the data is incomplete due to the deletion of the old data for a certain time. The second scheme is used for archiving historical data, certain efficiency is lost in data statistics, response time is prolonged, and user experience is damaged.
Therefore, how to solve the problem that the database performance is reduced and even crashed due to mass data, and further the data response is slow, thereby impairing the user experience is an urgent problem to be solved in the field.
Fig. 1 is a schematic flowchart of a check-in management method according to an embodiment of the present invention, and as shown in fig. 1, a check-in management method according to an embodiment of the present invention includes:
step 110, receiving a check-in request sent by a client, wherein the check-in request carries a check-in user identifier;
specifically, the server receives a check-in request sent by the client, where the check-in request at least includes a user identifier, and considering that the APP has a function of supplementing check-in, the check-in request may also include a check-in date, which is not limited in this embodiment of the present invention.
And 120, acquiring a digit group corresponding to the check-in date, positioning a bit value corresponding to the check-in user identifier in the digit group corresponding to the check-in date, and updating the bit value into a checked-in state value, wherein the digit group comprises bit values representing the check-in states corresponding to the user identifiers.
Considering that in the prior art, the sign-in function of the APP mostly uses the user identifier as a primary key, and the sign-in identifier field records a database table structure of the sign-in state of the user every day, but when the number of users is large, such as: in order to reduce the data volume, the embodiment of the invention designs a database table structure to take a date as a main key, the sign-in identifier of the user is a field in the table, the field is used for recording the sign-in state of all users on the date of the main key, and in order to reduce the storage space of the database and facilitate the updating operation, the embodiment of the invention uses a data structure form of a bit array (namely a bitmap) in a sign-in identifier field of the user, and takes the user identifier as a subscript of the array, or takes a sequence number corresponding to the user ID as a subscript of the array. .
From the table structure of the database, the data volume of one year is only 365, and due to the use of the bit array, assuming that there are 1000 ten thousand users, the user check-in identification field uses the bit array record, and the space occupied by each record, namely the field every day, is 10000000/1024/1024/8 ≈ 1.19MB, so that the space occupied by one year is only 1.19MB × 365 ═ 434.35 MB.
Specifically, the check-in date is obtained, the table structure of the database designed according to the embodiment of the present invention searches the content, i.e., the bit array, of the user check-in identification field corresponding to the check-in date (primary key) in the database, then searches the corresponding bit value in the bit array through the user identification, and updates the bit value to the checked-in state value. It should be noted that the bit value represents the value of each bit (bit) in the bit array, i.e. 0 or 1.
Further, the check-in date obtained here may be a date carried in the check-in request, or may be a date when the check-in request is received, or a date when the check-in request is received is used when it is determined that no date information is carried in the check-in request, which is not limited in this embodiment of the present invention; searching for a corresponding bit value in the bit array through the user identifier, wherein when the setting is based on the bit array, the user identifier is used as a subscript of the bit array, namely an index of the array, and the bit value in the corresponding bit array can be directly searched for in an array index searching manner through the user identifier, wherein the user identifier can be a natural number directly or a natural number corresponding to the user ID one by one, and the embodiment of the invention is not limited to this; the bit value is updated to the checked-in state value, where the bit value is updated through bit operation, and the checked-in state value is 0 or 1, which is not limited in this embodiment of the present invention.
According to the sign-in management method provided by the embodiment of the invention, the sign-in date in the received sign-in request information is used for acquiring the corresponding bit array, and the corresponding bit value is changed into the signed-in state according to the user identification, so that the sign-in state of the user is stored by using a data structure mode of the bit array.
Based on the foregoing embodiment, fig. 2 is a schematic flowchart of a process for obtaining a bit array by checking in a date according to an embodiment of the present invention, and as shown in fig. 2, the process for obtaining a bit array by checking in a date according to an embodiment of the present invention includes:
step 210, determining a check-in date based on the time information carried in the check-in request or based on the receiving time of the check-in request;
step 220, extracting the digit array corresponding to the check-in date from the digit array corresponding to each date.
Specifically, considering that in an APP check-in scene, a situation of label replenishment may exist, and a check-in date during label replenishment is often carried in the check-in request in the form of time information, after receiving the check-in request, it may be determined whether the check-in request carries the time information, if the check-in request does not carry the time information, an acceptance time of the check-in request is obtained as the check-in date, and if the check-in request carries the time information, the time information is used as the check-in date.
In addition, because the judgment logic can increase the consumption of system resources, in order to improve the system performance and reduce the consumption of the system resources, the check-in date is determined according to the mode that the check-in request carries time information as the check-in time, or the check-in request does not carry the time information and directly takes the time of receiving the check-in request as the check-in date.
In addition, the two methods can be used in combination for distinguishing the case that the check-in request is specifically used for instant check-in or replenishment check-in, when the check-in request carries time information, the check-in date is determined based on the time information, and when the check-in request does not carry the time information, the check-in date is determined based on the receiving time
Based on the above embodiment, in step 120, updating the bit value to the checked-in state value includes:
if the bit value is the non-signed state value, updating the bit value into the signed state value, and returning a sign-in success message to the client;
otherwise, the bit value keeps the checked-in state value and returns a repeated check-in message to the client.
In view of improving user experience, a correct sign-in request result needs to be fed back to a user, in order to obtain the correct sign-in request result, a sign-in state value of a bit value corresponding to a user identifier in the sign-in request needs to be searched before a state is updated, whether the sign-in state value is updated or not is judged according to the sign-in state value, and then an execution result of the updating method logic is fed back to a client.
Specifically, a bit value corresponding to the user identifier is obtained from a bit array, if the bit value represents an unregistered state, the bit value is updated to a signed state value, and a successful sign-in message is sent to the client; if the bit value indicates a checked-in status, a message of repeated check-ins is sent to the client. It should be noted that the judgment of the state of the bit value and the update of the state of the bit value are both performed by bit operations.
Based on the foregoing embodiment, fig. 3 is a schematic flowchart of a process for querying a check-in status according to an embodiment of the present invention, and as shown in fig. 3, in the check-in management method according to an embodiment of the present invention, a method for querying a check-in status is further provided, which includes:
step 310, receiving a query request sent by a client, wherein the query request carries a query user identifier and a query date;
specifically, the query request carries one or more query user identifiers and a query date, where the query date may be a certain day or a certain time period, for example, a month or a year, and this is not limited in this embodiment of the present invention.
Step 320, acquiring a digit group corresponding to the query date, and determining sign-in state information based on a digit value corresponding to the query user identifier in the digit group corresponding to the query date;
step 330, return the check-in status information to the client.
Specifically, according to the user identifier and the query date for querying received in step 310, the digit group corresponding to the query date is determined by the query date, then the check-in state corresponding to the user identifier is queried by using the user identifier as a subscript index of the digit group, the query date and the check-in state of the user identifier are obtained, and the check-in state information is sent to the client. It should be noted that if the query date is a certain day, when the user identifier is a single one, the sign-in state is obtained according to the user identifier in the digit group corresponding to the query date, and when the user identifiers are multiple, the digit group corresponding to the query date is queried according to each identifier in the user identifiers, so as to obtain the sign-in states corresponding to all the user identifiers; if the query date is a certain period, querying a digit group corresponding to each date in the period, querying with the user identifier in each digit group to obtain a check-in state corresponding to the user identifier when the user identifier is a single digit group, and querying with each user identifier to obtain a corresponding check-in state in each digit group when the user identifiers are multiple; the query operation is based on a bit operation.
Based on the foregoing embodiment, fig. 4 is a schematic flowchart of a process for counting check-in according to an embodiment of the present invention, and as shown in fig. 4, in the check-in management method according to an embodiment of the present invention, a method for counting check-in is further provided, which includes:
step 410, determining a statistical date;
specifically, the statistical date mark indicates a date on which check-in statistics needs to be performed, which may be a certain day or a certain period of time, and this is not limited in the embodiment of the present invention.
Step 420, determining the number of check-in users on the statistical date based on the number of checked-in state values in the bit array corresponding to the statistical date.
Specifically, the corresponding digit array is queried according to the statistical date obtained in step 410, and the number of all the digit values which are the checked-in identification values is counted in the digit array. It should be noted that when the statistical date is a certain day, the digit group corresponding to the statistical date is queried, and the number of all the digit values which are signed in and identified in the digit group is counted; when the statistical date is a certain period of time, the digit group corresponding to each date in the period of time is queried, and the number of all bit values of the checked-in identifier in the digit groups is counted, where the number of all bit values of the checked-in identifier in the statistical digit group may be the number of all checked-in identifier bits in a digit group set composed of the bit groups corresponding to each date in the period of time, or may be the number of checked-in identifier bits of each digit group in the digit group set or a combination of the two previous statistical manners.
Based on the foregoing embodiment, fig. 5 is a schematic flowchart of a process for creating a to-be-recorded date bit array according to an embodiment of the present invention, and as shown in fig. 5, in the check-in management method according to an embodiment of the present invention, a method for creating a to-be-recorded date bit array is further provided, which includes:
step 510, determining a date to be recorded;
and step 520, initializing the corresponding digit array based on the date to be recorded, wherein the corresponding digit values of each user identifier in the initialized digit array are all non-sign-in state values.
Considering the table structure of the designed database, namely the check-in date is a main key, and the user check-in identification bit array is used as a field in the table, in order to enable the user to normally operate the check-in process, namely, the check-in system does not work abnormally due to the fact that the check-in date record does not exist in the database on the date to be recorded, the record of the database on the date to be recorded needs to be automatically created.
Specifically, a date to be recorded is determined, and then a corresponding digit array is initialized based on the date to be recorded, and bit values corresponding to all user identifications in the digit array are all non-check-in state values. It should be noted that determining the date to be recorded may be that the system acquires the current time at a certain characteristic time point every day, and calculates the date to be recorded, or may be that when the check-in date in the received check-in request does not exist in the database, the check-in date is taken as the date to be recorded, which is not limited in the embodiment of the present invention; initializing the digit array corresponding to the date to be recorded is to directly initialize the digit array by taking the non-sign-in state value as an initialization condition, wherein the size of the digit array is the number of users, the date to be recorded is taken as a main key, and the corresponding digit array is taken as the content of a field in a table and is inserted into a database.
Based on any of the above embodiments, fig. 6 is a check-in management interaction flow chart provided by an embodiment of the present invention, and as shown in fig. 6, a specific check-in management interaction flow provided by an embodiment of the present invention includes:
step 610: the server regularly creates a bit array of the day after 24 o' clock before the day, all bit values in the default bit array are 0, and the bit value 0 represents a non-checked-in state.
Step 620: the server receives a check-in request which is sent by the client and contains a user identifier L1, and executes the following steps:
step 621: obtaining the time of receiving the check-in request obtains the check-in time D1 and the user identification L1.
Step 622: its corresponding bit array B1 is obtained from the database according to the check-in time D1.
Step 623: according to the user identification L1, the bit value with the index L1 in the bit array B1 is changed to the checked-in state, namely the bit value is changed to 1, and the updated bit array B1 is updated to the database.
Step 624: and returning the sign-in success information to the client.
Step 630: the server receives a query request which is sent by the client and contains the user identifier L2 and the query date D2, and executes the following steps:
step 631: the user identification L2 and the query date D2 in the query request are obtained.
Step 632: and acquiring the corresponding digit group B2 from the database according to the query time D2, wherein if D2 is a date period, B2 is a set consisting of the digit groups corresponding to each date in the D2 date period.
Step 633: inquiring bit value Bv with subscript L2 in a bit array B2 according to user identification L2, and if B2 is a set of bit arrays, then Bv is a set formed by bit values with subscript L2 in each bit array in the set of B2 bit arrays, namely Bv is a set of check-in states of each day in a query date period D2.
Step 634: and sending the bit value Bv obtained in the step 633 to the client.
Step 640: the server receives a statistic request containing a statistic date D3 sent by the client, and executes the following steps:
step 641: the statistical date D3 in the statistical request is obtained.
Step 642: and acquiring the corresponding digit group B3 from the database according to the statistical time D3, wherein if D3 is a date period, B3 is a set consisting of the digit groups corresponding to each date in the D3 date period.
Step 643: counting the number C of all bit values which are checked-in identifications, namely bit values of 1 in the bit array B3, wherein if B3 is a set of bit arrays, C is the sum of the number of all bit values which are checked-in identifications in each set in the counting set.
Step 644: and sending the number C obtained in the step 633 to the client.
In the above steps, L1, L2, and L3 are natural numbers and all are smaller in size than the length of the bit array. D1, D2, and D3 are dates accurate to day. The client can be an APP end or a background management end. Step 610, step 620, step 630 and step 640 have no sequential relationship; step 621, step 622, step 623 and step 624 have a sequential relationship; step 631, step 632, step 633 and step 634 have a sequential relationship; step 641, step 642, step 643 and step 644 have a sequential relationship.
Based on the foregoing embodiment, fig. 7 is a schematic flowchart of a process for creating a new user check-in identifier according to an embodiment of the present invention, and as shown in fig. 7, in a check-in management method according to an embodiment of the present invention, a method for creating a new user check-in identifier is further provided, which includes:
step 710, receiving a new user request, wherein the new user request carries a new user date and a new user identifier;
and step 720, adding the bit value corresponding to the new user identifier in the new user date and the bit number group corresponding to each date after the new user date.
Considering that the number of users is not uniform, the size of the digit array needs to be dynamically changed according to the change of the number of users, and because the new user does not need to consider the sign-in state information before the new date of the user, the digit array only needs to contain the sign-in state of the new user from the date when the new date of the user is created.
Specifically, when a request of a new user sent by a client is received, the size of a bit array corresponding to the new user date is updated according to the new user date and a new user identifier in request information, and a check-in record created after the new user date contains a check-in state identifier of the new user. It should be noted that the request of the new user is a request sent to the home terminal again after the new creation of the user is completed and the client obtains the user identifier of the new user, that is, a request for updating the size of the user sign-in identifier digit group; specifically, the step of increasing the bit value corresponding to the newly-built user identifier is to newly build an array element, namely the bit value, of the subscript of the user identifier in an array according to the user identifier, and update or query the bit value in a later period.
The invention provides a check-in management method, which comprises the steps of acquiring a corresponding bit array through a query date in a received query request, and querying a bit value corresponding to a user identifier, namely a user check-in state according to the user identifier in the query request; acquiring a corresponding bit array through the statistical date in the received statistical request, and then counting the number of bit values in the signed state in the bit array; and acquiring a corresponding bit array according to the new user date in the received new user request, and updating the bit array according to the user identifier in the request. The method realizes the storage of the check-in state of the user by using the data structure mode of the bit array, namely, the data can be recorded by using each bit value in the bit array based on the characteristics of the bit array, so that the storage space of the recorded data is greatly reduced, the pressure of a database is effectively reduced, more data is stored in a smaller storage space, and the updating of the bit array is based on bit operation, so that the response speed of the data is improved.
The check-in management device provided by the invention is described below, and the check-in management device described below and the check-in management method described above can be referred to correspondingly.
Fig. 8 is a schematic structural diagram of a check-in management device, as shown in fig. 8, the device includes: a receiving module 810 and an updating module 820.
The receiving module 810 is configured to receive a check-in request sent by a client, where the check-in request carries a check-in user identifier;
the updating module 820 is configured to obtain a digit group corresponding to the check-in date, locate a bit value corresponding to the check-in user identifier in the digit group corresponding to the check-in date, and update the bit value to a checked-in state value, where the digit group includes a bit value indicating a check-in state corresponding to each user identifier.
In the embodiment of the invention, a check-in request with a check-in user identifier sent by a client is received by a receiving module 810, the updating module 820 is used for acquiring a digit group corresponding to a check-in date, positioning a bit value corresponding to the check-in user identifier in the digit group corresponding to the check-in date, and updating the bit value into a checked-in state value, wherein the digit group comprises a bit value representing the check-in state corresponding to each user identifier, so that the check-in date in the received check-in request information is acquired, the corresponding bit value is changed into the checked-in state according to the check-in user identifier, the check-in state of the user is stored by using a data structure mode of the digit group, based on the characteristics of the digit group, data can be recorded by using each bit value in the digit group, the space for storing the recorded data is greatly reduced, the pressure of a database is effectively reduced, and more data is stored by using a smaller storage space, and the updating of the bit array is based on bit operation, so that the response speed of the data is improved.
Based on any of the above embodiments, the obtaining of the bit array corresponding to the check-in date in the updating module 820 is determined based on the following modules:
the check-in date submodule: the system comprises a check-in request receiving module, a check-in module and a check-in module, wherein the check-in request receiving module is used for receiving a check-in request sent by a user;
inquiring a bitmap submodule: the method is used for extracting the digit array corresponding to the check-in date from the digit array corresponding to each date.
Based on any of the above embodiments, the updating the bit value to the checked-in state value in the updating module 820 includes:
if the bit value is the non-signed state value, updating the bit value into the signed state value, and returning a sign-in success message to the client;
otherwise, the bit value keeps the checked-in state value and returns a repeated check-in message to the client.
Based on any embodiment above, the apparatus further comprises:
query module 830, query module 830 includes:
the receiving query submodule is used for receiving a query request sent by a client, and the query request carries a query user identifier and a query date;
the inquiry submodule is used for acquiring a digit array corresponding to an inquiry date and determining sign-in state information based on a digit value corresponding to the inquiry user identifier in the digit array corresponding to the inquiry date;
and returning the check-in state information to the client.
Based on any embodiment above, the apparatus further comprises:
statistics module 840, statistics module 840 includes:
a determination submodule for determining a statistical date;
and the counting submodule is used for determining the number of check-in users on the counting date based on the number of checked-in state values in the bit array corresponding to the counting date.
Based on any embodiment above, the apparatus further comprises:
the new user check-in module 850, and the new user check-in module 850 includes:
a new user request receiving submodule for receiving a new user request, wherein the new user request carries a new user date and a new user identifier;
and the new sign-in sub-module is used for increasing the bit value corresponding to the new user identifier in the new user date and the bit number group corresponding to each date after the new user date.
Fig. 9 illustrates a physical structure diagram of an electronic device, and as shown in fig. 9, the electronic device may include: a processor (processor)910, a communication Interface (Communications Interface)920, a memory (memory)930, and a communication bus 940, wherein the processor 910, the communication Interface 920, and the memory 930 communicate with each other via the communication bus 940. Processor 910 may invoke logic instructions in memory 930 to perform a check-in management method comprising: receiving a check-in request sent by a client, wherein the check-in request carries a check-in user identifier; acquiring a digit group corresponding to the check-in date, positioning a bit value corresponding to the check-in user identifier in the digit group corresponding to the check-in date, and updating the bit value into a checked-in state value, wherein the digit group comprises bit values representing the check-in state corresponding to each user identifier.
Furthermore, the logic instructions in the memory 930 may be implemented in software functional units and stored in a computer readable storage medium when the logic instructions are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform the check-in method provided by the above methods, the method comprising: receiving a check-in request sent by a client, wherein the check-in request carries a check-in user identifier; acquiring a digit group corresponding to the check-in date, positioning a bit value corresponding to the check-in user identifier in the digit group corresponding to the check-in date, and updating the bit value into a checked-in state value, wherein the digit group comprises bit values representing the check-in state corresponding to each user identifier.
In yet another aspect, the present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program that, when executed by a processor, is implemented to perform the check-in management method provided above, the method comprising: receiving a check-in request sent by a client, wherein the check-in request carries a check-in user identifier; acquiring a digit group corresponding to the check-in date, positioning a bit value corresponding to the check-in user identifier in the digit group corresponding to the check-in date, and updating the bit value into a checked-in state value, wherein the digit group comprises bit values representing the check-in state corresponding to each user identifier.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (11)

1. A check-in management method, comprising:
receiving a check-in request sent by a client, wherein the check-in request carries a check-in user identifier;
acquiring a digit group corresponding to a check-in date, positioning a bit value corresponding to the check-in user identifier in the digit group corresponding to the check-in date, updating the bit value into a checked-in state value, wherein the digit group comprises bit values representing the check-in state corresponding to each user identifier.
2. The check-in management method according to claim 1, wherein the obtaining of the digit group corresponding to the check-in date comprises:
determining the check-in date based on the time information carried in the check-in request or based on the receiving time of the check-in request;
and extracting the digit array corresponding to the check-in date from the digit array corresponding to each date.
3. The check-in management method according to claim 1, wherein the updating the bit value to the checked-in state value comprises:
if the bit value is the non-signed state value, updating the bit value to the signed state value, and returning a successful sign-in message to the client;
otherwise, the bit value keeps the checked-in state value and returns a repeated check-in message to the client.
4. The check-in management method according to any one of claims 1 to 3, further comprising:
receiving a query request sent by the client, wherein the query request carries a query user identifier and a query date;
acquiring a digit array corresponding to the query date, and determining sign-in state information based on a digit value corresponding to the query user identifier in the digit array corresponding to the query date;
and returning the check-in state information to the client.
5. The check-in management method according to any one of claims 1 to 3, further comprising:
determining a statistical date;
and determining the number of check-in users on the counting date based on the number of the checked-in state values in the digit group corresponding to the counting date.
6. The check-in management method according to any one of claims 1 to 3, further comprising:
determining a date to be recorded;
and initializing the corresponding bit array based on the date to be recorded, wherein the bit value corresponding to each user identifier in the initialized bit array is an unregistered state value.
7. The check-in management method according to any one of claims 1 to 3, further comprising:
receiving a new user request, wherein the new user request carries a new user date and a new user identifier;
and adding a bit value corresponding to the new user identifier in the new user date and the bit number group corresponding to each date after the new user date.
8. A check-in management apparatus, comprising:
a receiving module: the system comprises a client, a server and a server, wherein the client is used for receiving a check-in request sent by the client, and the check-in request carries a check-in user identifier;
an update module: the system comprises a user identification module, a sign-in user identification module and a digit group, wherein the sign-in user identification module is used for acquiring the digit group corresponding to the sign-in date, positioning the bit value corresponding to the sign-in user identification in the digit group corresponding to the sign-in date, updating the bit value into a sign-in state value, and the digit group comprises bit values representing the sign-in state corresponding to each user identification.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the steps of the check-in management method according to any one of claims 1 to 7 are implemented when the processor executes the program.
10. A non-transitory computer readable storage medium, having stored thereon a computer program, wherein the computer program, when executed by a processor, implements the steps of the check-in management method according to any one of claims 1 to 7.
11. A computer program product comprising a computer program, wherein the computer program when executed by a processor implements the steps of the check-in management method according to any one of claims 1 to 7.
CN202111006084.6A 2021-08-30 2021-08-30 Sign-in management method and device, electronic equipment and storage medium Pending CN113849477A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111006084.6A CN113849477A (en) 2021-08-30 2021-08-30 Sign-in management method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111006084.6A CN113849477A (en) 2021-08-30 2021-08-30 Sign-in management method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113849477A true CN113849477A (en) 2021-12-28

Family

ID=78976587

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111006084.6A Pending CN113849477A (en) 2021-08-30 2021-08-30 Sign-in management method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113849477A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114694272A (en) * 2022-03-25 2022-07-01 广州方硅信息技术有限公司 Activity batch sign-in method and device, computer equipment and storage medium
CN114694272B (en) * 2022-03-25 2024-09-24 广州方硅信息技术有限公司 Activity batch sign-in method and device, computer equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114694272A (en) * 2022-03-25 2022-07-01 广州方硅信息技术有限公司 Activity batch sign-in method and device, computer equipment and storage medium
CN114694272B (en) * 2022-03-25 2024-09-24 广州方硅信息技术有限公司 Activity batch sign-in method and device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN108460115B (en) Message pushing method and device, computer equipment and storage medium
CN104462141B (en) Method, system and the storage engines device of a kind of data storage and inquiry
CN106997431B (en) Data processing method and device
CN106933836A (en) A kind of date storage method and system based on point table
CN109842621B (en) Method and terminal for reducing token storage quantity
CN111314238A (en) Token management method and device, storage medium and electronic device
CN111414424B (en) Method, system, medium and equipment for automatically synchronizing redis of configuration data
CN111414362A (en) Data reading method, device, equipment and storage medium
CN108762979B (en) Terminal information backup method and backup device based on matching tree
CN107094085B (en) Signaling transmission method and device
CN111008183A (en) Storage method and system for business wind control log data
CN110362540B (en) Data storage and visitor number acquisition method and device
CN113849477A (en) Sign-in management method and device, electronic equipment and storage medium
CN114788294A (en) Content pushing method, device, server and storage medium
CN111367916A (en) Data storage method and device
CN107977381B (en) Data configuration method, index management method, related device and computing equipment
CN110727895A (en) Sensitive word sending method and device, electronic equipment and storage medium
CN113419687B (en) Object storage method, system, equipment and storage medium
CN114048206B (en) Configuration consistency verification method, system and device for large-scale cluster
CN113486025B (en) Data storage method, data query method and device
CN112948485B (en) Question-answer data synchronization method, device, system, server and storage medium
CN114372052A (en) Data change record storage method and device, computer equipment and storage medium
CN115080504A (en) File management method, terminal and storage medium
CN109587353B (en) Method, device and storage medium for identifying short message number attribution information
CN113132241A (en) ACL template dynamic configuration method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination