User retention state analysis method, system and device
By configuring the user's transaction situation as a binary number and storing it in decimal, the problem of user retention rate calculation code bloated and inefficient in the prior art is solved, and efficient user retention rate calculation and code maintenance are achieved.
Patent Information
- Application Number
- CN202411618516.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-13
- Publication Date
- 2025-04-11
AI Technical Summary
When calculating user retention rates, the code for obtaining and calculating the corresponding data of the user retention status is relatively bloated, resulting in poor code maintenance and large amount of data, user data will be brushed every time the calculation is calculated, which has low refresh efficiency.
By configuring the user's transaction situation as a binary number and storing the binary number in the decimal state into the database, the storage space is reduced and the difficulty of data acquisition is reduced. When it is necessary to calculate the user retention rate, the number of users determined by the transaction status value obtained from the binary number by the preset period of the retention rate calculation to complete the retention rate calculation.
Without obtaining complete user data, the calculation efficiency of user retention is improved, the terminal occupation is reduced, the code structure is simplified, and the code maintenance is improved.
Smart Images

Figure CN119809705A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing, and in particular to a method, system and apparatus for analyzing user retention status. Background Technology
[0002] User retention rate is an important metric for measuring the stability of a product or service's user base, and it is typically used to assess user satisfaction. Retention refers to the behavior of users continuing to access the product's features within a specific timeframe after a given point in time. The retention rate is the proportion of these retained users out of the initial user base. A higher retention rate indicates that the product is more attractive to users.
[0003] When calculating retention rate, we usually use the formula: Day N retention rate = (users visiting on day T) & (users visiting on day T+N) / (users visiting on day T). This calculation method can improve code maintainability and readability. However, because the data structure of user data stored in the database contains all activity records generated by users in the product, the code for obtaining and calculating the corresponding data of user retention status is relatively bloated, which leads to poor code maintainability. Moreover, when the data volume is large, the user data is refreshed every time, resulting in low refresh efficiency. Summary of the Invention
[0004] To address the aforementioned technical problems, this application provides a method, system, and apparatus for analyzing user retention status, which improves the computational efficiency of user retention status data.
[0005] The technical solution provided in this application is described below:
[0006] The first aspect of this application provides a method for analyzing user retention status, including:
[0007] Configure binary numbers according to the daily transaction status of each user within a preset period, where the transaction status includes both completed and uncompleted transactions;
[0008] Each of the binary numbers is converted into its corresponding decimal number and stored.
[0009] After receiving the user retention rate calculation request for day T+N relative to day T in the preset period, each of the decimal numbers is converted back to each of the binary numbers, and the binary number corresponding to each day from day T to day T+N is obtained from each of the binary numbers. The binary number is then converted into a transaction status value, where T and N are positive integers, and the transaction status value is a decimal value.
[0010] Determine a first reference value and a second reference value. The first reference value is a first value with base 2 and N as the exponent. The second reference value is a second value obtained by adding 1 to the first value.
[0011] Each of the transaction status values is ANDed with the first reference value, and the first quantity of the result is determined from all the results.
[0012] From the various transaction status values, determine the transaction status value that satisfies the condition that the calculation result is the first reference value;
[0013] Perform an AND operation between the determined transaction status value and the second reference value, and determine the second quantity of the result as the second reference value from all the results obtained;
[0014] Divide the second quantity by the first quantity to obtain the user retention rate on day T+N relative to day T in the preset period.
[0015] Optionally, the step of performing a bitwise AND operation between each of the transaction status values and the first reference value, and determining the first number of results that are the first reference value from all the obtained operation results, includes:
[0016] The transaction status value and the first reference value are ANDed to obtain a first calculation result, which is used to represent the user's transaction status on the start date.
[0017] When the first calculation result indicates that there is a transaction, the user corresponding to the transaction status value is recorded until all transaction status values have been calculated. Based on the recorded results, a first user group is obtained. The users corresponding to the first user group have a transaction status on day T. The number of users corresponding to the first user group is the first quantity.
[0018] Optionally, the step of performing a bitwise AND operation between the determined transaction status value and the second reference value, and determining a second number of results from all the obtained results that correspond to the second reference value, includes:
[0019] Perform a bitwise AND operation between the transaction status value and the second reference value to obtain the second calculation result;
[0020] When the second calculation result indicates that there is a transaction, the user corresponding to the transaction status value is recorded. This process continues until all transaction status values have been calculated. Based on the recorded results, a second user group is generated. The users corresponding to the second user group have transactions on day T and day T+N.
[0021] Optionally, the step of converting each of the decimal numbers back to each of the binary numbers, obtaining the binary number corresponding to each day from day T to day T+N from each of the binary numbers, and converting the binary number into a transaction status value includes:
[0022] Get the first date of day T and the second date of day T+N;
[0023] The transaction details between the first date and the second date are obtained from the binary number to obtain the intermediate binary number;
[0024] The intermediate binary number is converted into a decimal number to obtain the transaction status value.
[0025] Optionally, the method further includes:
[0026] When a periodic retention status confirmation request is received, the calculation period of the periodic retention status confirmation request is parsed.
[0027] Extract the corresponding date's binary number from the binary number according to the calculation period to obtain the periodic transaction status value;
[0028] Perform a bitwise AND operation between the periodic transaction status value and the periodic transaction status maximum value, and record the number of times the result of the AND operation is 1 to obtain the periodic retention days. The periodic retention days are the number of days in the calculation period in which the user's transaction status has been completed. The periodic transaction status maximum value is the binary number of the status of having completed transactions on every day in the calculation period.
[0029] Optionally, configuring binary numbers based on the daily transaction data of each user within a preset period includes:
[0030] Obtain a preset period and generate the base number of bits for a binary number based on the preset period;
[0031] The daily transaction details of each user are obtained sequentially according to the date order of the preset period;
[0032] The transaction details are recorded in the last bit of the base number. When obtaining the transaction details for the next date, the current data of the binary number is shifted left so that the transaction status for the next date is recorded in the last bit of the binary number. This process continues until the configuration of the binary numbers for all users in the preset period is completed.
[0033] Optionally, after configuring binary numbers based on the daily transaction data of each user within a preset period, the method further includes:
[0034] The base number of bits of the binary number is determined according to the preset period;
[0035] The upper limit of the base number of bits is controlled by a preset period.
[0036] A second aspect of this application provides a user retention status analysis system, comprising:
[0037] The configuration unit is used to configure binary numbers according to the daily transaction status of each user within a preset period, wherein the transaction status includes transactions and no transactions.
[0038] A storage unit is used to convert each of the binary numbers into their corresponding decimal numbers and store them;
[0039] The data acquisition unit is configured to, upon receiving a user retention rate calculation request for day T+N relative to day T within the preset period, convert each decimal number back to each binary number, obtain the binary number corresponding to each day from day T to day T+N from each binary number, and convert the binary number into a transaction status value, wherein T and N are positive integers, and the transaction status value is a decimal value.
[0040] The first determining unit is used to determine a first reference value and a second reference value, wherein the first reference value is a first value with base 2 and N as the exponent, and the second reference value is a second value obtained by adding 1 to the first value.
[0041] The first calculation unit is used to perform a bitwise AND operation between each of the transaction status values and the first reference value, and determine a first quantity of the calculation result as the first reference value from all the obtained calculation results;
[0042] The second determining unit is used to determine, from each of the transaction status values, a transaction status value that satisfies the condition that the calculation result is the first reference value;
[0043] The second calculation unit is used to perform a bitwise AND operation between the determined transaction status value and the second reference value, and to determine a second quantity from all the obtained calculation results that is the second reference value.
[0044] The calculation unit is used to divide the second quantity by the first quantity to obtain the user retention rate on day T+N relative to day T in the preset period.
[0045] Optionally, the first arithmetic unit is specifically used for:
[0046] The transaction status value and the first reference value are ANDed to obtain a first calculation result, which is used to represent the user's transaction status on the start date.
[0047] When the first calculation result indicates that there is a transaction, the user corresponding to the transaction status value is recorded until all transaction status values have been calculated. Based on the recorded results, a first user group is obtained. The users corresponding to the first user group have a transaction status on day T. The number of users corresponding to the first user group is the first quantity.
[0048] Optionally, the second arithmetic unit is specifically used for:
[0049] Perform a bitwise AND operation between the transaction status value and the second reference value to obtain the second calculation result;
[0050] When the second calculation result indicates that there is a transaction, the user corresponding to the transaction status value is recorded. This process continues until all transaction status values have been calculated. Based on the recorded results, a second user group is generated. The users corresponding to the second user group have transactions on day T and day T+N.
[0051] Optionally, the data acquisition unit is specifically used for:
[0052] Get the first date of day T and the second date of day T+N;
[0053] The transaction details between the first date and the second date are obtained from the binary number to obtain the intermediate binary number;
[0054] The intermediate binary number is converted into a decimal number to obtain the transaction status value.
[0055] Optionally, the system further includes:
[0056] The parsing unit is used to parse the calculation period of the periodic retention status confirmation request when a periodic retention status confirmation request is received.
[0057] The extraction unit is used to extract the binary number of the corresponding date from the binary number according to the calculation period to obtain the periodic transaction status value;
[0058] The third calculation unit is used to perform a bitwise AND operation on the periodic transaction status value and the periodic transaction status maximum value, and record the number of times the result of the AND operation is 1, to obtain the periodic retention days. The periodic retention days are the number of days in the calculation period in which the user's transaction status has been completed. The periodic transaction status maximum value is the binary number of the status of having completed transactions on each day in the calculation period.
[0059] Optionally, the configuration unit is specifically used for:
[0060] Obtain a preset period and generate the base number of bits for a binary number based on the preset period;
[0061] The daily transaction details of each user are obtained sequentially according to the date order of the preset period;
[0062] The transaction details are recorded in the last bit of the base number. When obtaining the transaction details for the next date, the current data of the binary number is shifted left so that the transaction status for the next date is recorded in the last bit of the binary number. This process continues until the configuration of the binary numbers for all users in the preset period is completed.
[0063] Optionally, the system further includes:
[0064] The third determining unit is used to determine the base number of bits of the binary number according to the preset period;
[0065] The upper limit control unit is used to control the upper limit of the base number of bits through a preset period.
[0066] A third aspect of this application provides a user retention status analysis device, the device comprising:
[0067] Processor, memory, input / output units, and bus;
[0068] The processor is connected to the memory, the input / output unit, and the bus;
[0069] The memory stores a program, which the processor invokes to execute the first aspect and any one of the optional methods in the first aspect.
[0070] A fourth aspect of this application provides a computer-readable storage medium on which a program is stored, which, when executed on a computer, performs the methods of the first aspect and any one of the first aspects.
[0071] As can be seen from the above technical solutions, this application has the following advantages:
[0072] This application configures user transaction information as binary numbers and stores these binary numbers in a decimal format in the database. This allows each user's transaction data to be stored as a decimal number, reducing storage space and simplifying data retrieval. When user retention rate needs to be calculated, the number of users is determined based on the transaction status values obtained from the binary numbers within a preset retention rate calculation period. This enables user retention rate calculation without obtaining complete user data, reducing the terminal usage for user retention rate calculation and improving the efficiency of user retention rate calculation. Attached Figure Description
[0073] To more clearly illustrate the technical solutions in this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0074] Figure 1 This is a schematic flowchart of an embodiment of the user retention status analysis method in this application;
[0075] Figure 2 This is a schematic flowchart of an embodiment of the method for obtaining the first and second quantities in the user retention status analysis method of this application;
[0076] Figure 3 This is a schematic flowchart of an embodiment of the method for obtaining transaction status values using the user retention status analysis method in this application;
[0077] Figure 4 This is a flowchart illustrating another embodiment of the user retention status analysis method in this application;
[0078] Figure 5 This is a flowchart illustrating an embodiment of the specific process of configuring user binary data in the user retention status analysis method of this application;
[0079] Figure 6 This is a schematic diagram of an embodiment of the user retention status analysis system in this application;
[0080] Figure 7 This is a schematic diagram of another embodiment of the user retention status analysis system in this application;
[0081] Figure 8 This is a schematic diagram of an embodiment of the user retention status analysis device in this application. Detailed Implementation
[0082] It should be noted that the user retention status analysis method provided in this application can be applied to terminals, systems, and servers. For example, a terminal can be a smartphone, computer, tablet, smart TV, smartwatch, portable computer, or a desktop computer, etc. For ease of explanation, this application uses a terminal as the execution subject for illustration.
[0083] The technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0084] Please see Figure 1 This application first provides an embodiment of a method for analyzing user retention status, which includes:
[0085] S101. Configure binary numbers according to the daily transaction status of each user within a preset period, including whether there are transactions or not.
[0086] The user's daily transaction details are stored in a database used to store user data. Transaction data is a category of user data. Transaction data is associated with users based on their personal identifiers, so that the terminal can index the user's transaction details based on the user's personal identifiers and complete the acquisition of the user's daily transaction details within a preset period.
[0087] After the terminal retrieves the transaction information for a preset period from the user data, it can record the transaction information using a bitmap. A bitmap is a data structure that uses bits to represent the presence or absence of elements in a dataset, typically used to handle data with binary states (yes or no). In a bitmap, each element is represented by one bit, where 1 indicates the element exists and 0 indicates the element does not exist. Therefore, the terminal can be configured to record user transaction information as binary numbers using a bitmap, where 1 represents a transaction and 0 represents no transaction.
[0088] The transaction information stored in the database is generated based on user behavior. It can be obtained by directly recording user behavior or through user behavior logs. The specific method of obtaining user behavior is not limited here.
[0089] In this embodiment, transaction status is a category of user data stored in the database. The user data stored in the database includes log records of all actions generated by users when using applications or devices. Through user data, all interactive behavior records of relevant users on devices or applications can be retrieved. Therefore, the user data in the database is a large data set. In this case, if the terminal directly calculates the user retention rate from the user transaction data in the user data, the terminal will need to read the complete user data and find the data used to determine the user retention status (i.e., transaction status), resulting in a large computing burden on the terminal.
[0090] To improve the efficiency of the terminal in calculating user retention rate and reduce the terminal's computing power requirements, the terminal will convert the data type of the transaction data used by the user to calculate the retention rate and record the user's transaction data in binary form within a preset time period. Generally, this preset time period is one month, with a maximum value of 31 days.
[0091] Specifically, the terminal stores the user's transaction data for the past 31 days in binary format, i.e., in a bitmap table. The bitmap table consists of bitmaps of all users' transaction records. The bitmap table contains data including: user identifier, transaction data generation date, and transaction details. The user identifier is used to index the user, allowing the terminal to associate the corresponding bitmap with the user's Bitmap. The transaction data generation date identifies the transaction time corresponding to each bit in the bitmap, and the transaction details indicate whether the user made any transactions on the transaction data generation date.
[0092] If a transaction has been completed, the transaction status is represented as 1, meaning 1 in the bitmap indicates a transaction status. Conversely, if no transaction has been completed, the transaction status is represented as 0.
[0093] S102. Convert each binary number into its corresponding decimal number and store them;
[0094] In practice, binary data and decimal values are mapped one-to-one through user identifiers. Storing data in decimal allows bitmap data, along with the bitmap table constructed from the bitmap, to be recorded in decimal form.
[0095] Because the bitmap table contains data for more than one user, and the actual transaction record generation period is the same, that is, the bitmap table contains the transaction information generated by each user on each day within a preset period, when the terminal needs to obtain the user's transaction information, it can find the transaction information for the corresponding date through the user identifier and date index, so that the terminal can read the user's transaction information within a time period based on a decimal number.
[0096] S103. After receiving the user retention rate calculation request for day T+N relative to day T in the preset period, convert each decimal number back to each binary number, obtain the binary number corresponding to each day from day T to day T+N from each binary number, and convert the binary number into a transaction status value, where T and N are positive integers, and the transaction status value is a decimal value.
[0097] When calculating user retention rate, the terminal needs to determine the calculation period for retention rate. Specifically, the terminal needs to obtain the corresponding data from the bitmap corresponding to the transaction status value through the date range or calculation instructions input by the operator. The date range includes the initial date T and the termination date T+N.
[0098] For example, when calculating the 7-day retention rate, if the transaction status between the start date T, October 1, 2023 and the end date T+N, October 8, 2023 is represented as 11010011 in the user's bitmap, the corresponding transaction status value is 211, where N is 7, and thus the 7-day retention rate is calculated.
[0099] When the operator provides the instruction to calculate the 7-day retention rate, the terminal will determine 8 transaction scenarios within a preset period based on the user's bitmap and convert the data of these transactions into decimal values. When the transaction status is represented in binary, the transaction status value is counted from right to left. The 8th bit represents the user's transaction status on the start day of the preset period, and the last bit represents the user's transaction status on the end day of the preset period. (In actual code operation, bit data records are added by left shifting, so the data further to the right is the most recent data; therefore, the 8th bit from right to left corresponds to the data on the start day of the preset period, and the last bit corresponds to the data on the end day of the preset period). This value represents the user's transaction status value. During the retention rate calculation, the terminal will retrieve the transaction status values of all users in the bitmap table and perform subsequent calculations on all transaction status values.
[0100] S104. Determine the first reference value and the second reference value. The first reference value is the first value with 2 as the base and N as the exponent. The second reference value is the second value obtained by adding 1 to the first value.
[0101] As described in step S103, the time interval N between the start date and the end date is equal to the number of valid bits in the binary state of the transaction status value - 1.
[0102] Therefore, by using the time interval N, the decimal value representing the transaction status in the bitmap at the start date can be calculated. With a time interval of N, based on the binary to decimal conversion logic, the specific calculation method for the first reference value is: First reference value = 2. N The second reference value is calculated as follows: Second reference value = 2 N +1. For example, when calculating the 7-day retention rate, N=7, the first reference value is 2. 7 =128, the second reference value is 2 7 +1 = 129.
[0103] S105. Perform a bitwise AND operation between each transaction status value and the first reference value, and determine the first quantity of the first reference value from all the results obtained.
[0104] In this embodiment, the first reference value is used to determine the user whose transaction status occurs on day T. When the first reference value is X... T When the user's transaction status value is M, M&X T =1 indicates that the user corresponding to the currently calculated transaction status value has a transaction status on day T, M&X T =0 indicates that the user corresponding to the currently calculated transaction status value has no transaction status on day T.
[0105] The calculation is performed using the conditions for calculating the 7-day retention rate. Based on the result of step S104, the first reference value X is... T The value is 128. Based on the result of step S103, the user's transaction status value M is 211, M&X T =211&128=128, meaning the result of the AND operation is equal to the first reference value. By performing an AND operation between the transaction status values of all users in the bitmap table and the first reference value, and counting the number of users whose output is the first reference value, the total number of users obtained is the first quantity.
[0106] S106. Determine the transaction status value that satisfies the condition that the calculation result is the first reference value from all transaction status values;
[0107] After the terminal performs a bitwise AND operation on the transaction status values of all users in the bitmap table with the first reference value, it can determine the user group corresponding to all results and transaction status values with an output of 1 from the bitmap table, so that the terminal can perform subsequent calculations based on the transaction status values of this user group.
[0108] S107. Perform a bitwise AND operation between the determined transaction status value and the second reference value, and determine the second quantity of the result as the second reference value from all the results obtained.
[0109] The formula for calculating retention rate is: Day N retention rate = (Number of users who transacted on day T) & (Number of users who transacted on day T+N) / (Number of users who transacted on day T); where T is the start date, N is the preset period, and T+N is the end date.
[0110] Based on the calculation results of the aforementioned steps, the users obtained by filtering through the first reference value are the users who transacted on day T. After determining the users who transacted on day T, the terminal also needs to determine the users who transacted on day T+N, and then calculate the user retention rate.
[0111] Specifically, in the 7-day retention rate calculation environment, N=7, and according to step S104, the second reference value is determined to be 129, which is represented in binary as 1000 0001, corresponding to the status of having a transaction on day T and day T+N.
[0112] In practice, to reduce the computing power requirements of the terminal, during the confirmation of the first number of users, the terminal will filter the user transaction status value through the first reference value to obtain the user group based on the first number. This way, when confirming the second number of users, the terminal only needs to filter the user group that meets the second reference value from the user group corresponding to the first reference value to obtain the transaction users for day T+N.
[0113] S108. Divide the second quantity by the first quantity to obtain the user retention rate on day T+N relative to day T in the preset period.
[0114] After determining the first and second quantities, substitute them into the retention rate formula for day N: (Transactions on day T) & (Transactions on day T+N) / (Transactions on day T) to obtain the following formula:
[0115] First quantity & Second quantity / First quantity = Preset period retention rate.
[0116] In this embodiment, by configuring user transaction information as binary data through a bitmap table and storing the bitmap table in decimal form in the database, the transaction data of each user in the database can be stored as a decimal number, reducing storage space and simplifying data retrieval. When it is necessary to calculate the user retention rate, the number of users is determined by the transaction status values obtained from the bitmap table at a preset retention rate calculation period to complete the retention rate calculation. This allows the user retention rate to be calculated without obtaining complete user data, reducing the terminal usage for user retention rate calculation and improving the efficiency of user retention rate calculation.
[0117] For the specific methods of obtaining the first and second quantities in the aforementioned steps S105 and S106, please refer to [link / reference needed]. Figure 2 This application provides another embodiment of a method for analyzing user retention status, which includes:
[0118] S201. Perform a bitwise AND operation between the transaction status value and the first reference value to obtain the first calculation result. The first calculation result is used to represent the user's transaction status on day T.
[0119] In practice, the terminal performs a bitwise AND operation on the user's transaction status value and the first reference value to determine the transaction status of all users on day T in the bitmap table. When performing the bitwise AND operation, if the obtained data is in decimal, the terminal will also convert the data according to the conversion relationship between decimal and binary before performing the calculation. Therefore, by determining the result of the bitwise operation on the two decimal numbers, the transaction status value and the first reference value, the transaction status of the user on day T in the bitmap table can be determined, which is the first calculation result.
[0120] A transaction count of 1 indicates that the user has made a transaction, while a transaction count of 0 indicates that the user has not made a transaction. The specific calculation method is as follows:
[0121] When N=7, i.e., when calculating the 7-day retention rate, if the user's transaction status value is 211, corresponding to the binary number 1101 0011, the transaction status calculation method for that user is M&X. T =211&128=128, the corresponding binary calculation process is 1101 0011&1000 0000=10000000, that is, the binary number of 128 is 1000 0000. Therefore, the user's first calculation result is that there is a transaction, that is, the user has a transaction on day T.
[0122] If the transaction status is "there is a transaction", proceed to step S202. If the transaction status is "no transaction", then no transaction occurred on day T, and the corresponding user is not included in the calculation range of the retention rate for the preset period.
[0123] S202. When the first calculation result is that there is a transaction, record the user corresponding to the transaction status value until all transaction status values have been calculated. Based on the recorded results, obtain the first user group. The transaction status of the users corresponding to the first user group on day T is that there is a transaction. The number of users corresponding to the first user group is the first quantity.
[0124] If the terminal determines that the first calculation result is a transaction, it means that the user's transaction status on day T is a transaction. The terminal will mark the user's transaction status value and the corresponding user. The marked user is identified by the terminal as a user of the first user group, so that the terminal can perform subsequent calculations based on the first user group.
[0125] Specifically, the bitmap table contains data for multiple users. The terminal performs a bitwise AND operation between the transaction status value of each user and the first reference value, marks all users whose corresponding bit is 1 on day T, and counts the number of marks to obtain the first count.
[0126] S203. Determine the transaction status value that satisfies the condition that the calculation result is the first reference value from all transaction status values;
[0127] Specifically, when the terminal performs a bitwise AND operation between the user in the bitmap table and the first reference value, it marks the user whose result is the first reference value. This allows the terminal to determine the transaction status value that satisfies the condition that the result is the first reference value by marking the user.
[0128] S204. Perform a bitwise AND operation on the transaction status value and the second reference value to obtain a second calculation result. The second calculation result is used to represent the user's transaction status on day T+N.
[0129] After marking users in the bitmap table according to the aforementioned steps, the terminal will determine the transaction status of the marked users on day T+N. The determination method is to perform a bitwise AND operation between the transaction status value of the marked user and the second reference value, and the output result is the second calculation result. If the marked user has a transaction on day T+N, step S205 is executed; otherwise, it means that the user has no transaction on day T+N and is determined to be a non-retained user.
[0130] S205. When the second calculation result is that there is a transaction, record the user corresponding to the transaction status value. Until all transaction status values have been calculated, generate a second user group based on the recorded results. The users corresponding to the second user group have a transaction status on day T and day T+N. The number of users corresponding to the second user group is the second quantity.
[0131] Similar to step S202, in the retention rate calculation, the actual data that needs to be obtained is the number of users who made a transaction on day T+N. Therefore, it is necessary to select users who made a transaction on day T+N from the first user group. The terminal integrates these users into the second user group so that the terminal can obtain the number of users in the second user group.
[0132] In this embodiment, leveraging the characteristics of the AND operation, day T and day T+N are used as the objects for the AND operation on the transaction status value. This determines the transaction status of the user corresponding to the transaction status value on day T and day T+N. The first reference value used to calculate the transaction status on day T is the value obtained by converting the highest bit of the transaction status value in binary representation to decimal. The second reference value for the transaction status on day T+N is the value obtained by adding 1 to the first reference value. After determining the first and second reference values, the terminal performs AND operations on the transaction status value corresponding to the user in the bitmap table with the first and second reference values respectively, thereby filtering out the first user group and the second user group. Users in the first user group are those who have transactions on day T, and users in the second user group are those who have transactions on both day T and day T+N. The first and second quantities are determined by obtaining the number of users in the first and second user groups. This allows the terminal to determine the user's transaction status within a preset period based on the user's transaction status value without obtaining all user data, reducing the data acquisition overhead during retention rate calculation.
[0133] For the specific process of obtaining the transaction status value in step S103, please refer to [link / reference needed]. Figure 3 This application provides another embodiment of a method for analyzing user retention status, which includes:
[0134] S301, Get the first date of day T and the second date of day T+N;
[0135] The transaction status value is a fragment of data obtained from the bitmap table. The fragment is extracted based on a preset period, which is an interval consisting of the first date and the second date, where the first date is day T and the second date is day T+N.
[0136] S302. Obtain the transaction details between the first and second dates from the binary number to get the intermediate binary number;
[0137] When the terminal needs to retrieve the correct transaction status value from the bitmap table, it needs to determine the positions of the first and second dates on the bitmap table and extract all data between the first and second dates.
[0138] Specifically, the terminal can directly index the specific location in the bitmap table using the first and second dates. Similarly, by recording the transaction status value in decimal, the terminal can index the corresponding bit in the binary state of the transaction status value based on the first and second dates, and obtain all the transaction statuses between the corresponding bits. Therefore, the terminal essentially obtains the bits corresponding to the time interval between the first and second dates and all the data between them through the bitmap table corresponding to the transaction status value. These data are intermediate binary numbers.
[0139] S303. Convert the intermediate binary number to a decimal number to obtain the transaction status value.
[0140] In this embodiment, the value used for storing the transaction status is a decimal value. When the terminal acquires data within a preset period, it actively converts the decimal value into a binary value for data extraction, but the actual output result is a decimal value. For the decimal value used for storage, the bit data corresponding to the date needs to be represented through binary status. Therefore, during the transaction status value extraction process, the terminal's acquisition logic involves a base conversion process, but the actual output result is a decimal value.
[0141] In this embodiment, the transaction status value stored in the database is a decimal value. This decimal value can be directly indexed into a binary representation bitmap table. Since the bitmap table is generated according to a fixed date, the time of data generation in the bitmap table can be determined by comparing the binary data obtained from the decimal value with the date corresponding to each bit of the binary data stored in the decimal data. Therefore, knowing the first and second dates used to calculate the retention rate, the terminal can perform bitwise operations on the transaction status value based on the first and second dates to obtain the transaction status for the corresponding date. The transaction status value is the decimal representation of all transaction data obtained by the user from the first to the second date. This allows the terminal to obtain the user's transaction status value simply by calculating the stored decimal value, avoiding the need for the terminal to retrieve user transaction data one by one from the user data, and reducing the computing power required for calculating the retention rate.
[0142] Please see Figure 4 This application provides another embodiment of a method for analyzing user retention status, which includes:
[0143] S401. When a periodic retention status confirmation request is received, the calculation period of the periodic retention status confirmation request is parsed.
[0144] The retention period status refers to the number of days a user actually made a transaction within a certain period. Specifically, when the terminal receives a retention period status confirmation request, it will receive a calculation period used to calculate the retention status. The terminal needs to calculate the number of days with transactions within that calculation period.
[0145] S402. Extract the binary number of the corresponding date from the binary number according to the calculation period to obtain the periodic transaction status value;
[0146] The calculation period is the time period during which the terminal statistically analyzes the user retention status. Generally, the data obtained for calculating the retention status is the user's recent transaction data that meets the calculation period. The terminal determines the periodic transaction status value from the binary data stored in the bitmap table based on the calculation period. For example, when calculating the user's retention status within 7 days, the terminal obtains the bitmap corresponding to the user from the bitmap table based on the user identifier, and determines the binary data of the transaction data for the most recent 7 days from the bitmap. This binary data is the periodic transaction status value.
[0147] S403. Perform a bitwise AND operation between the periodic transaction status value and the periodic transaction status maximum value, and record the number of times the result of the AND operation is 1 to obtain the periodic retention days. The periodic retention days are the number of days in the calculation period when the user's transaction status has been completed. The periodic transaction status maximum value is the binary number of the status of having completed transactions on every day in the calculation period.
[0148] The maximum value of the periodic transaction status is the binary value corresponding to the user's status of completing a transaction every day within the calculation period. For example, when calculating the user's retention status within 7 days, the maximum value of the periodic transaction status is 01111111. If the user's corresponding periodic transaction status value is 101 1101, the terminal will calculate 1011101&0111 1111. The terminal will count once for each 1 output by the AND operation. After the terminal completes the AND operation bit by bit, the data output by the terminal is the number of 1s output by the AND operation, that is, the number of days that the user corresponding to the periodic transaction status value actually completed a transaction within the calculation period.
[0149] In this embodiment, the terminal uses the user's transaction information stored in the bitmap to confirm the number of transaction days for the user. This avoids the need for the terminal to retrieve the user's transaction information from the user data when confirming the actual number of transaction days for the user within the calculation period. Instead, the terminal directly determines the bitmap corresponding to the user from the bitmap table and obtains the user's transaction information within the calculation period from the bitmap, reducing the terminal's workload when calculating the user's transaction information.
[0150] For the specific process of configuring user binary data in step S101 mentioned above, please refer to [link to relevant documentation]. Figure 5This application provides another embodiment of a method for analyzing user retention status, which includes:
[0151] S501. Obtain the preset period and generate the base number of bits of the binary number according to the preset period;
[0152] The effective number of bits in the bitmap corresponding to a user has an upper limit on the number of bits based on the data type compatible with the computer. Therefore, in practice, when the terminal constructs the bitmap table by configuring the user's binary number according to a preset period, it will determine the appropriate data type according to the preset period, so that the terminal determines the basic number of bits of the user's binary number according to the preset period.
[0153] For example, when the terminal configures a user's data for the most recent month through a bitmap, the terminal will configure a data type that can store 31 bits according to a preset period, which is used to store a user's transaction data within a 31-day time period.
[0154] S502. Control the upper limit of the base number of bits through a preset period;
[0155] In practice, for computers, a data type that meets this condition must be at least 32 bits. Overflowing bits are invalid. To avoid data overflow, an upper limit is placed on the base number of bits in the binary number. Specifically, when the preset period is one month, the maximum valid data size is 31 bits, but the data type can store 32 bits. The terminal determines the maximum base number of bits based on the time period, i.e., pow(2, 31) = 2147483648. This value corresponds to the 32nd bit from right to left being 1, and the remaining bits being 0. However, in reality, the 32 bits of the bitmap table have no practical meaning, thus leading to data overflow. The upper limit is achieved by setting the maximum value of the data transaction value and the decimal value of the bitmap table to pow(2, 31) - 1. The resulting binary data has a 0 at the highest bit and 1s for the remaining bits, effectively controlling the upper limit of the user's bitmap data so that all of the user's transactions for 31 days are in a completed state.
[0156] The terminal writes transaction data to the user's bitmap using a left shift function. When the terminal writes data to the bitmap table using a left shift loop function, the data type corresponding to the decimal data transaction value determines the limit value of the data transaction value. In order to avoid data overflow when the data content of the bitmap table is converted into data transaction value during data writing, an upper limit is controlled on the basic number of bits of the bitmap table.
[0157] S503: Obtain the daily transaction status of each user one by one according to the date order of the preset period;
[0158] Specifically, the storage of user data in the database mainly involves storing user information and user behavior data. Behavioral data is stored indexed by the timestamp when the behavior is executed. Therefore, the time when a user's transaction status is generated can be directly determined based on the timestamp generated when the behavior is recorded. When the terminal obtains transaction status, it reads all the user's behavior data within a preset period, extracts the transaction data from it, sorts it according to the timestamp, and enables the terminal to obtain all the transaction statuses of a user in the bitmap.
[0159] The user's bitmap is generated by obtaining the user's transaction information starting from the date furthest from the current date in the preset period. That is, 1 is the number of transactions and 0 is the number of transactions. After the terminal completes the recording of the user's transaction information for the corresponding date, the terminal will shift the numbers in the current bitmap table to the left so that the transaction status data in the bitmap table is sorted by date to avoid data errors.
[0160] S504. Record the transaction details in the last bit of the base number, and when obtaining the transaction details for the next date, shift the current data of the binary number to the left so that the transaction status for the next date is recorded in the last bit of the binary number, until the configuration of the binary numbers for all users in the preset period is completed.
[0161] After the terminal determines all the transaction statuses of a user within a preset period, the terminal will use a left shift function to record the user's transaction information on the user's bitmap day by day, starting from the earliest date of the preset period. When the terminal has recorded the transaction statuses of all users, it will obtain a bitmap table, which includes all the transaction information of all data in the database within the preset period.
[0162] In practice, the data type determines the maximum value of the stored data. After the terminal determines the preset period, it determines the specific number of bits that the bitmap table needs to be generated in actual storage. However, directly generating the bitmap table based on this specific number of bits will cause data overflow during data processing due to changes in the amount of data. To avoid this situation, after determining the bitmap table, the terminal will control the upper limit of the basic number of bits of the bitmap table by adding a header bit to store invalid data or setting a numerical upper limit, thereby achieving the purpose of avoiding bitmap table data overflow.
[0163] In this embodiment, the user's transaction information is recorded by utilizing the characteristic that binary numbers only have two states, 0 and 1, thereby unifying the data format for storing transaction information. Furthermore, by converting binary numbers into decimal values, the user's transaction information within a preset period occupies only one data parameter in the database. This improves the terminal's feedback efficiency in analyzing user retention rates based on user transaction information recorded through bitmaps. Moreover, because the calculation result of bitwise operations only has two states, the terminal's workload is lower when performing calculations or counting on bitwise operation results, thereby reducing the computing power required by the terminal when calculating user retention rates and retention status.
[0164] The above describes in detail the method for analyzing user retention status in the embodiments of this application. The following will describe in detail the system and apparatus for analyzing user retention status.
[0165] Please see Figure 6 This application provides an embodiment of a user retention status analysis system, which includes:
[0166] Configuration unit 601 is used to configure binary numbers according to the daily transaction status of each user within a preset period, including whether there are transactions or not.
[0167] Storage unit 602 is used to convert each binary number into its corresponding decimal number and store it;
[0168] The data acquisition unit 603 is used to convert each decimal number back to each binary number after receiving a user retention rate calculation request for day T+N relative to day T in a preset period, and to obtain the binary number corresponding to each day from day T to day T+N from each binary number, and to convert the binary number into a transaction status value, where T and N are positive integers and the transaction status value is a decimal value.
[0169] The first determining unit 604 is used to determine a first reference value and a second reference value. The first reference value is a first value with base 2 and exponent N, and the second reference value is the second value obtained by adding 1 to the first value.
[0170] The first calculation unit 605 is used to perform a bitwise operation between each transaction status value and a first reference value, and determine the first quantity of the calculation result as the first reference value from all the calculation results obtained.
[0171] The second determining unit 606 is used to determine, from each transaction status value, the transaction status value that satisfies the condition that the calculation result is the first reference value;
[0172] The second calculation unit 607 is used to perform a bitwise AND operation between the determined transaction status value and the second reference value, and determine the second quantity of the calculation result as the second reference value from all the obtained calculation results;
[0173] The calculation unit 608 is used to divide the second quantity by the first quantity to obtain the user retention rate on day T+N relative to day T in the preset period.
[0174] In this embodiment, the functions of each unit are the same as those described above. Figure 1 The steps in the illustrated embodiments are the same and will not be repeated here.
[0175] Please see Figure 7 This application provides an embodiment of a user retention status analysis system, which includes:
[0176] Configuration unit 701 is used to configure binary numbers according to the daily transaction status of each user within a preset period, including whether there are transactions or not.
[0177] The third determining unit 702 is used to determine the base number of binary numbers according to a preset period;
[0178] The upper limit control unit 703 is used to control the upper limit of the base number of bits through a preset period.
[0179] Storage unit 704 is used to convert each binary number into its corresponding decimal number and store it;
[0180] The data acquisition unit 705 is used to convert each decimal number back to each binary number after receiving a user retention rate calculation request for day T+N relative to day T in a preset period, and to obtain the binary number corresponding to each day from day T to day T+N from each binary number, and to convert the binary number into a transaction status value, where T and N are positive integers and the transaction status value is a decimal value.
[0181] The first determining unit 706 is used to determine a first reference value and a second reference value. The first reference value is a first value with base 2 and exponent N, and the second reference value is the second value obtained by adding 1 to the first value.
[0182] The first calculation unit 707 is used to perform a bitwise operation between each transaction status value and a first reference value, and determine the first quantity of the calculation result as the first reference value from all the calculation results obtained.
[0183] The second determining unit 708 is used to determine, from each transaction status value, the transaction status value that satisfies the condition that the calculation result is the first reference value;
[0184] The second calculation unit 709 is used to perform a bitwise AND operation between the determined transaction status value and the second reference value, and to determine the second quantity of the calculation result as the second reference value from all the obtained calculation results;
[0185] The calculation unit 710 is used to divide the second quantity by the first quantity to obtain the user retention rate of day T+N relative to day T in the preset period;
[0186] The parsing unit 711 is used to parse the calculation period of the periodic retention status confirmation request when a periodic retention status confirmation request is received.
[0187] Extraction unit 712 is used to extract the binary number of the corresponding date from the binary number according to the calculation period to obtain the periodic transaction status value;
[0188] The third operation unit 713 is used to perform a bitwise AND operation on the periodic transaction status value and the maximum value of the periodic transaction status, and record the number of times the result of the AND operation is 1, so as to obtain the periodic retention days. The periodic retention days are the number of days in the calculation period in which the user's transaction status has been completed. The maximum value of the periodic transaction status is the binary number of the status of having completed transactions on each day in the calculation period.
[0189] Optionally, the first arithmetic unit 707 is specifically used for:
[0190] The transaction status value and the first reference value are ANDed to obtain the first calculation result, which is used to represent the user's transaction status on the start date.
[0191] When the first calculation result is that there is a transaction, the user corresponding to the transaction status value is recorded. This process continues until all transaction status values have been calculated. Based on the recorded results, the first user group is obtained. The users corresponding to the first user group have a transaction status on day T. The number of users corresponding to the first user group is the first quantity.
[0192] Optionally, the second arithmetic unit 709 is specifically used for:
[0193] The transaction status value and the second reference value are ANDed to obtain the second calculation result;
[0194] When the second calculation result indicates that there is a transaction, the user corresponding to the transaction status value is recorded. This process continues until all transaction status values have been calculated. Based on the recorded results, a second user group is generated. The users corresponding to the second user group have transactions on day T and day T+N.
[0195] Optionally, the data acquisition unit 705 is specifically used for:
[0196] Get the first date of day T and the second date of day T+N;
[0197] Extract the transaction details between the first and second dates from the binary number to obtain the intermediate binary number;
[0198] Convert the intermediate binary number to a decimal number to obtain the transaction status value.
[0199] Optionally, configuration unit 701 is specifically used for:
[0200] Obtain the preset period and generate the base number of bits for the binary number based on the preset period;
[0201] The daily transaction details of each user are retrieved one by one according to the date sequence of the preset period;
[0202] The transaction details are recorded in the last bit of the base number. When obtaining the transaction details for the next date, the current data of the binary number is shifted left so that the transaction status for the next date is recorded in the last bit of the binary number. This process continues until the binary number configuration for all users in the preset period is completed.
[0203] In this embodiment, the functions of each unit are the same as those described above. Figures 2 to 5 The steps in the illustrated embodiments are the same and will not be repeated here.
[0204] Please see Figure 8 This application provides another embodiment of a user retention status analysis device, including:
[0205] Processor 801, memory 802, input / output unit 803, bus 804;
[0206] The processor 801 is connected to the memory 802, the input / output unit 803, and the bus 804;
[0207] Processor 801 performs specific operations Figures 1 to 5 The specific operations corresponding to the steps in the method will not be elaborated here.
[0208] This application also relates to a computer-readable storage medium on which a program is stored, characterized in that, when the program is run on a computer, it causes the computer to perform any of the methods described above.
[0209] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0210] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, 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 indirect coupling or communication connection between apparatuses or units, and may be electrical, mechanical, or other forms.
[0211] 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 this embodiment according to actual needs.
[0212] 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.
[0213] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a 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 a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
Claims
1. A method for analyzing user retention status, characterized in that: The method comprises: Binary numbers are configured according to the transaction status of each user's daily transactions within a preset period, wherein the transaction status includes transaction status and non-transaction status; Convert each of the binary numbers into a corresponding decimal number and store them; After receiving a user retention rate calculation request for the T+Nth day relative to the Tth day in the preset period, converting each of the decimal numbers back into each of the binary numbers, and obtaining a binary number corresponding to each day from the Tth day to the T+Nth day from each of the binary numbers, and converting the binary number into a transaction status value, wherein T and N are positive integers, and the transaction status value is a decimal value; Determine a first reference value and a second reference value, wherein the first reference value is a first value with 2 as the base and N as the exponent, and the second reference value is a second value obtained by adding 1 to the first value; Performing an AND operation on each of the transaction status values and the first reference value, and determining a first quantity whose operation result is the first reference value from all the obtained operation results; Determine, from each of the transaction status values, a transaction status value that satisfies the condition that the calculation result is the first reference value; Performing an AND operation on the determined transaction status value and the second reference value, and determining a second quantity whose operation result is the second reference value from all the obtained operation results; The second number is divided by the first number to obtain the user retention rate of the T+Nth day relative to the Tth day in the preset period.
2. The method according to claim 1, characterized in that The performing AND operations on each of the transaction status values and the first reference value respectively, and determining a first quantity whose operation results are the first reference value from all the obtained operation results, comprises: Performing an AND operation on the transaction status value and the first reference value to obtain a first calculation result, where the first calculation result is used to represent the transaction status of the user on day T; When the first calculation result is that there is a transaction, the user corresponding to the transaction status value is recorded until all transaction status values are calculated, and a first user group is obtained according to the recorded results. The transaction status of the users corresponding to the first user group on day T is that there is a transaction, and the number of users corresponding to the first user group is a first number.
3. The method according to claim 1, characterized in that The step of performing an AND operation on the determined transaction status value and the second reference value, and determining a second quantity whose operation results are the second reference value from all the obtained operation results, includes: Performing an AND operation on the transaction status value and the second reference value to obtain a second calculation result, where the second calculation result is used to represent the transaction status of the user on the T+Nth day; When the second calculation result is that there is a transaction, the user corresponding to the transaction status value is recorded until all transaction status values are calculated, and a second user group is generated according to the record results. The transaction status of the users corresponding to the second user group on T day and T+N day is that there is a transaction, and the number of users corresponding to the second user group is a second number.
4. The method according to any one of claims 1 to 3, characterized in that The converting each of the decimal numbers back to each of the binary numbers, and obtaining the binary number corresponding to each day from the Tth day to the T+Nth day from each of the binary numbers, and converting the binary number into a transaction status value, comprises: Get the first date of the Tth day and the second date of the T+Nth day; Obtaining the transaction status between the first date and the second date from the binary number to obtain an intermediate binary number; The intermediate binary number is converted into a decimal number to obtain a transaction status value.
5. The method according to any one of claims 1 to 3, characterized in that The method further comprises: When receiving a periodic retention status confirmation request, parsing a calculation period of the periodic retention status confirmation request; Extract the binary number of the corresponding date from the binary number according to the calculation period to obtain the periodic transaction status value; The cycle transaction status value is ANDed with the cycle transaction status maximum value, and the number of times the operation result is 1 in the AND operation is recorded to obtain the cycle retention days, where the cycle retention days are the number of days on which the user's transaction status is a transaction in the calculation cycle, and the cycle transaction status maximum value is a binary number on which the transaction status of each day in the calculation cycle is a transaction.
6. The method according to any one of claims 1 to 3, characterized in that The binary numbers are configured according to the daily transaction status of each user within a preset period, including: Obtaining a preset period, and generating a basic number of bits of a binary number according to the preset period; Obtaining the daily transaction status of each user one by one according to the date sequence of the preset period; The transaction status is recorded in the last digit of the basic number, and the current data of the binary number is shifted left when obtaining the transaction status of the next date, so that the transaction status of the next date is recorded in the last digit of the binary number, until the configuration of the binary numbers corresponding to all users in the preset period is completed.
7. The method according to claim 6, characterized in that After respectively configuring the binary numbers according to the daily transaction status of each user within the preset period, the method further includes: Determining the basic number of bits of the binary number according to the preset period; The upper limit of the basic bit number is controlled by a preset period.
8. A user retention status analysis system, characterized in that: The system comprises: A configuration unit, configured to configure binary numbers according to the transaction status of each user's daily transactions within a preset period, wherein the transaction status includes transaction status and non-transaction status; A storage unit, used to convert each of the binary numbers into a corresponding decimal number and store the decimal number; a data acquisition unit, configured to, after receiving a user retention rate calculation request for the T+Nth day relative to the Tth day in the preset period, convert each of the decimal numbers back into each of the binary numbers, and obtain a binary number corresponding to each day from the Tth day to the T+Nth day from each of the binary numbers, and convert the binary number into a transaction status value, wherein T and N are positive integers, and the transaction status value is a decimal value; A first determining unit is used to determine a first reference value and a second reference value, wherein the first reference value is a first value with 2 as the base and N as the exponent, and the second reference value is a second value obtained by adding 1 to the first value; a first operation unit, configured to perform an AND operation on each of the transaction status values and the first reference value, and determine a first quantity of the first reference value as an operation result from all the obtained operation results; A second determining unit, configured to determine, from among the transaction status values, a transaction status value that satisfies the condition that the calculation result is the first reference value; a second operation unit, configured to perform an AND operation on the determined transaction status value and the second reference value, and determine a second quantity whose operation results are the second reference value from all the obtained operation results; A calculation unit is used to divide the second number by the first number to obtain the user retention rate of the T+Nth day relative to the Tth day in the preset period.
9. A device for analyzing user retention status, characterized in that: The device comprises: Processor, memory, input-output unit, and bus; The processor is connected to the memory, the input and output unit, and the bus; The memory stores a program, and the processor calls the program to execute the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a program stored thereon, wherein the program, when executed on a computer, performs the method according to any one of claims 1 to 7.