CN113688338A - User data processing method, processing device and computer storage medium - Google Patents

User data processing method, processing device and computer storage medium Download PDF

Info

Publication number
CN113688338A
CN113688338A CN202010427091.2A CN202010427091A CN113688338A CN 113688338 A CN113688338 A CN 113688338A CN 202010427091 A CN202010427091 A CN 202010427091A CN 113688338 A CN113688338 A CN 113688338A
Authority
CN
China
Prior art keywords
activity
user data
data
target user
user
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
CN202010427091.2A
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.)
Shanghai Huiya Information Technology Co ltd
Original Assignee
Shanghai Huiya Information Technology 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 Shanghai Huiya Information Technology Co ltd filed Critical Shanghai Huiya Information Technology Co ltd
Priority to CN202010427091.2A priority Critical patent/CN113688338A/en
Publication of CN113688338A publication Critical patent/CN113688338A/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/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation

Abstract

The application discloses a processing method, a processing device and a computer storage medium of user data, wherein the method comprises the following steps: acquiring the activity of a target user; the user data corresponding to the first activity degree is stored in a storage database, the user data corresponding to the second activity degree is stored in the storage database and loaded into a cache database, and the first activity degree is smaller than the second activity degree; if the activity of the target user is the first activity, preloading user data of the target user from a storage database to a cache database when the target user logs in; and when a data calling instruction sent by the mobile terminal of the login target user is acquired, sending the user data in the cache database to the mobile terminal. By the method, the storage pressure of the cache database can be reduced, the cost of the cache database is reduced, and meanwhile, the response speed of the mobile terminal is improved.

Description

User data processing method, processing device and computer storage medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a method, a device, and a computer storage medium for processing user data.
Background
In a network service architecture, in order to improve the data reading and writing speed, a cache is used for data interaction, the function of the cache is to establish a copy of frequently accessed data, so that an original query access request originally needs to request a database operation, and can be directly read in a cache layer, and the data access speed is greatly improved. However, for applications with small access capacity, only a common database can meet the requirement, and for applications with large access capacity, the bottleneck of the common database is obvious.
Disclosure of Invention
In order to solve the above problems, the present application provides a processing method, a processing apparatus, and a computer storage medium for user data, which can reduce the storage pressure of a cache database, reduce the cost of the cache database, and improve the response speed of a mobile terminal.
One technical solution adopted by the present application is to provide a method for processing user data, including: acquiring the activity of a target user; the user data corresponding to the first activity degree is stored in a storage database, the user data corresponding to the second activity degree is stored in the storage database and loaded into a cache database, and the first activity degree is smaller than the second activity degree; if the activity of the target user is the first activity, preloading user data of the target user from a storage database to a cache database when the target user logs in; and when a data calling instruction sent by the mobile terminal of the login target user is acquired, sending the user data in the cache database to the mobile terminal.
The activity of the target user is a first activity, and the user data at least comprises first user data and second user data; the first user data and the second user data are determined based on the historical calling frequency, the historical calling duration or the historical calling sequence of the data;
if the activity of the target user is the first activity, preloading user data of the target user from a storage database to a cache database when the target user logs in, wherein the method comprises the following steps:
and if the activity of the target user is the first activity, preloading the first user data from the storage database to the cache database when the target user logs in.
When a data call instruction sent by a mobile terminal of a login target user is acquired, sending user data in a cache database to the mobile terminal, wherein the data call instruction comprises the following steps: when a calling instruction based on first user data sent by a mobile terminal of a login target user is obtained, sending the first user data in a cache database to the mobile terminal; the second user data is preloaded from the storage database into the cache database.
Wherein, the method also comprises: acquiring historical calling frequency, historical calling duration or historical calling sequence of target user data; determining a first loading priority based on a historical calling frequency, determining a second loading priority based on a historical calling duration, and determining a third loading priority based on a historical calling sequence; carrying out weighted summation on the first loading priority, the second loading priority and the third loading priority to obtain an average loading priority; and when the average loading priority is smaller than the set priority threshold, determining the target user data as second user data.
The first user data is video data; preloading first user data from a storage database into a cache database, comprising: determining a data amount of the video data; and if the data volume is larger than the set data volume threshold, preloading the data in the front of the playing sequence in the video data into a cache database.
Wherein, the method also comprises: acquiring the login times and login duration of a target user and the calling frequency of user data in the login duration; and calculating the activity of the target user based on the login times, the login duration and the calling frequency.
The activity of the target user is calculated based on the login times, the login duration and the call frequency, and the method comprises the following steps: determining a first preset activity degree based on the login times, determining a second preset activity degree based on the login duration, and determining a third preset activity degree based on the calling frequency; carrying out weighted summation on the first preset activity, the second preset activity and the third preset activity to obtain an average preset activity; and when the average preset activity is smaller than the set activity threshold, determining the activity of the target user as the first activity.
Wherein, the method also comprises: acquiring current user data sent by a mobile terminal, and storing the current user data in a cache database; the current user data is generated by the mobile terminal in response to an operation instruction of a target user; if the activity of the target user is the first activity, updating the user data of the target user in the storage database based on the current user data; and if the activity of the target user is the second activity, updating the user data of the target user in the storage database based on the current user data when the condition that the storage database is idle is monitored.
Another technical solution adopted by the present application is to provide a user data processing apparatus, wherein the user data processing apparatus includes a processor and a memory connected to each other; wherein the memory is adapted to store program data and the processor is adapted to execute the program data to implement any of the methods provided in the above-described arrangements.
Another technical solution adopted by the present application is to provide a computer storage medium, wherein the computer storage medium is used for storing program data, and the program data is used for implementing any one of the methods provided in the above-mentioned solutions when being executed by a processor.
The beneficial effect of this application is: different from the prior art, the present application provides a method for processing user data, including: acquiring the activity of a target user; the user data corresponding to the first activity degree is stored in a storage database, the user data corresponding to the second activity degree is stored in the storage database and loaded into a cache database, and the first activity degree is smaller than the second activity degree; if the activity of the target user is the first activity, preloading user data of the target user from a storage database to a cache database when the target user logs in; and when a data calling instruction sent by the mobile terminal of the login target user is acquired, sending the user data in the cache database to the mobile terminal. Through the mode, on the one hand, only partial data are preloaded into the cache data instead of all data, the pressure of a cache database is reduced, the cost is reduced, on the other hand, for a user with high activity degree, the data can be stored in the cache database for a long time, the data calling can be conveniently and rapidly carried out by the user with high activity degree, better service can be provided for high-quality customers by considering the user viscosity, for the user with low activity degree, the data can be loaded into the cache database after the user logs in, the user with low activity degree can not be loaded when the data is called, and the effect of improving the data calling can also be achieved. Therefore, by adopting the mode of the application, the storage pressure of the cache database can be reduced, the cost of the cache database is reduced, and meanwhile, the response speed of the mobile terminal is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts. Wherein:
fig. 1 is a schematic flowchart of a first embodiment of a user data processing method provided in the present application;
fig. 2 is a schematic flowchart of another embodiment of a user data processing method provided in the present application;
fig. 3 is a schematic flowchart of a second embodiment of a user data processing method provided in the present application;
fig. 4 is a schematic flowchart of a third embodiment of a user data processing method provided in the present application;
fig. 5 is a schematic flowchart of a fourth embodiment of a user data processing method provided in the present application;
fig. 6 is a schematic flowchart of a fifth embodiment of a user data processing method provided in the present application;
fig. 7 is a flowchart illustrating a sixth embodiment of a method for processing user data according to the present application;
FIG. 8 is a schematic structural diagram of an embodiment of a user data processing apparatus provided in the present application;
FIG. 9 is a schematic structural diagram of an embodiment of a computer storage medium provided in the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting of the application. It should be further noted that, for the convenience of description, only some of the structures related to the present application are shown in the drawings, not all of the structures. 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 application.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
Referring to fig. 1, fig. 1 is a schematic flow chart of a first embodiment of a user data processing method provided in the present application, where the method includes:
step 11: and acquiring the activity of the target user.
In some embodiments, the corresponding user data is stored in different locations depending on the activity of the user. Such as dividing the user's liveness into a first liveness and a second liveness. And storing the user data corresponding to the first activity in a storage database, storing the user data corresponding to the second activity in the storage database, and loading the user data into a cache database, wherein the first activity is less than the second activity.
The storage database is used for storing user data, and the user data is stored in the storage database no matter whether the user is in the first activity level or the second activity level. Only a copy of the user data of the target user is cached in the database. And the cache database stores the user data of the users with the second activity degree because the second activity degree meets the preset requirement. The storage time of the user data in the cache database is long, and the user data is not stored in the storage database permanently. The user data storage time of the cache database for the second activity user is much longer than the user data storage time of the first activity user. The cache database is connected with the storage database and used for data interaction with the storage database. The cache database and the storage database are established in the server.
The storage database may be a relational database, such as a Mysql database, a SqlServer database, an Oracle database, or a non-relational database, such as a Key-Value storage database, a column storage database, a document database, a graph database.
In some embodiments, when the target user logs in at the mobile terminal, the activity level of the target user is obtained, and the activity level is determined, and if the activity level of the target user is the second activity level, step 13 is executed. If the activity level of the target user is the first activity level, step 12 is executed.
It can be understood that the user data stored in the cache database may perform liveness determination on the target user corresponding to the user data within a set time period, and the user data of the target user belonging to the first liveness may be deleted. And if the target user with the first liveness logs out, clearing the user data corresponding to the target user in the cache database.
Step 12: and if the activity of the target user is the first activity, preloading the user data of the target user from the storage database to the cache database when the target user logs in.
In some embodiments, if the activity level of the target user is the first activity level, and at this time, the cache database does not have the user data of the target user, the user data of the target user is preloaded from the storage database to the cache database when the target user logs in. And when the data call instruction sent by the mobile terminal of the login target user is acquired, executing the step 13.
Step 13: and when a data calling instruction sent by the mobile terminal of the login target user is acquired, sending the user data in the cache database to the mobile terminal.
In an application scenario, a short video application in a mobile terminal is taken as an example and is explained with reference to fig. 2:
step 21: and obtaining login information of the target user.
When a target user logs in a short video application program in the mobile terminal, the user data processing device acquires the login information of the target user. Such as the account number of the target user or the user ID.
Step 22: and judging whether the target user activity is the first activity.
And acquiring the activity of the target user according to the login information of the target user, and judging whether the activity of the target user is the first activity. If yes, go to step 23.
Step 23: and preloading the user data of the target user from the storage database to the cache database.
The user data in the short video application program can be data related to the target user, such as short video data concerned by the target user, praise information, short video uploaded by the target user, and the like.
Step 24: and when a data calling instruction sent by the mobile terminal of the login target user is acquired, sending the user data in the cache database to the mobile terminal.
When the short video application program of the target user on the mobile terminal calls the user data, a corresponding data calling instruction is generated and sent to the user data processing device by the mobile terminal, and then the user data processing device sends the user data in the cache database to the mobile terminal.
It can be understood that, if the activity of the target user is the second activity, the corresponding user data is stored in the cache database, and in the interaction process, the mobile terminal of the target user is logged in to interact with the cache database. And if the activity of the target user is the first activity, in the interaction process, the mobile terminal logging in the target user interacts with the cache database, and the user data is synchronously updated in the cache database and the storage database.
Different from the prior art, the present application provides a method for processing user data, including: acquiring the activity of a target user; the user data corresponding to the first activity degree is stored in a storage database, the user data corresponding to the second activity degree is stored in the storage database and loaded into a cache database, and the first activity degree is smaller than the second activity degree; if the activity of the target user is the first activity, preloading user data of the target user from a storage database to a cache database when the target user logs in; and when a data calling instruction sent by the mobile terminal of the login target user is acquired, sending the user data in the cache database to the mobile terminal. Through the mode, on the one hand, only partial data are preloaded into the cache data instead of all data, the pressure of a cache database is reduced, the cost is reduced, on the other hand, for a user with high activity degree, the data can be stored in the cache database for a long time, the data calling can be conveniently and rapidly carried out by the user with high activity degree, better service can be provided for high-quality customers by considering the user viscosity, for the user with low activity degree, the data can be loaded into the cache database after the user logs in, the user with low activity degree can not be loaded when the data is called, and the effect of improving the data calling can also be achieved. Therefore, by adopting the mode of the application, the storage pressure of the cache database can be reduced, the cost of the cache database is reduced, and meanwhile, the response speed of the mobile terminal is improved.
Referring to fig. 3, fig. 3 is a schematic flowchart of a second embodiment of a user data processing method provided in the present application, where the method includes:
step 31: and acquiring the activity of the target user.
In this embodiment, the description is made on the target user's activity being the first activity. The user data comprises at least first user data and second user data; the first user data and the second user data are determined based on historical calling frequency, historical calling duration or historical calling sequence of the data. In some embodiments, the weights corresponding to the first user data and the second user data are determined based on a historical calling frequency, a historical calling duration or a historical calling sequence of the data, and the loading sequence of the first user data and the second user data is determined based on the weights. It is understood that the user data with large weight belongs to the common use of the target user, and can be pre-loaded preferentially. When the target user's activity level is the first activity level, step 32 is performed. Specifically, when the mobile terminal logs in the target user, the activity of the target user is obtained.
Step 32: the first user data is preloaded from the storage database into the cache database.
In some embodiments, the first user data is weighted more heavily than the second user data, and the first user data is preloaded from the storage database into the cache database upon login of a target user at a first activity level.
Step 33: and when a calling instruction based on the first user data sent by the mobile terminal of the login target user is obtained, sending the first user data in the cache database to the mobile terminal.
Step 34: the second user data is preloaded from the storage database into the cache database.
After the first user data in the cache database is sent to the mobile terminal, second user data is preloaded into the cache database from the storage database, so that the second user data in the cache database is sent to the mobile terminal when a call instruction based on the second user data sent by the mobile terminal of the login target user is obtained.
In some embodiments, the historical calling frequency, the historical calling duration or the historical calling sequence corresponding to the first user data and the second user data are obtained in real time to calculate the weight corresponding to the first user data and the second user data. And preloading the second user data from the storage database to the cache database when the weight of the first user data is less than that of the second user data. And when a calling instruction based on the second user data sent by the mobile terminal of the login target user is obtained, sending the second user data in the cache database to the mobile terminal. The first user data is preloaded from the storage database into the cache database.
By the method, the order of calling data after the user logs in the mobile terminal can be judged, and the user data is correspondingly loaded according to the judgment result without completely loading the user data to the cache database at one time, so that the storage resources of the cache database are further released, and the response speed of the cache database is improved.
Referring to fig. 4, fig. 4 is a schematic flowchart of a third embodiment of a user data processing method provided in the present application, where the method includes:
step 41: and acquiring the historical calling frequency, the historical calling duration or the historical calling sequence of the target user data.
In the present embodiment, the first user data and the second user data in the above-described embodiments are explained. The user data processing device acquires the historical calling frequency, the historical calling duration or the historical calling sequence of the target user data in a set period so as to distinguish the first user data from the second user data. It can be understood that different target users correspond to different historical calling frequencies, historical calling durations or historical calling sequences of user data. For example, if the set period is seven days, the historical call frequency, the historical call duration, or the historical call sequence of the user data of the current day and the previous 6 days of the target user a are obtained based on the current time. The user data of the target user a is described by taking an example in which the user data includes user data a and user data b. The historical calling frequency of the user data a is 20 times and corresponds to the historical calling time length each time, and the historical calling frequency of the user data b is 50 times and corresponds to the historical calling time length each time. And calculating the historical calling sequence by taking the period that the target user logs in the target user and exits every time, if the target user logs in for the first time, calling the user data b first, then calling the user data a, and then calling the user data b. And logging in for the second time, and only calling the user data a.
Step 42: the method comprises the steps of determining a first loading priority based on historical call frequency, determining a second loading priority based on historical call duration, and determining a third loading priority based on historical call sequencing.
The method for determining the first loading priority based on the historical calling frequency may be to acquire dates corresponding to the historical calling frequency of the user data, count calling frequencies corresponding to the user data in different dates, and then calculate the calling frequencies corresponding to the different dates to determine the first loading priority. Specifically, taking the cycle as seven days as an example, the calling frequency per day is multiplied by a corresponding coefficient, wherein the coefficient corresponding to a date closer to the current date is higher.
The method for determining the second loading priority based on the historical call duration may be to obtain a date corresponding to the historical call duration of the user data, count the call duration of each call corresponding to the user data in different dates, then calculate an average call duration per day, and then calculate the average call duration corresponding to different dates to determine the second loading priority. Specifically, taking a cycle of seven days as an example, the average call duration per day is multiplied by a corresponding coefficient, wherein a coefficient corresponding to a date closer to the current date is higher.
The third loading priority is determined based on the historical calling sequence, and the third loading priority of the user data can be calculated based on the preset loading priority after the dates corresponding to the historical calling sequence of the user data are obtained, the historical calling sequences of the user data corresponding to different dates are counted, the preset loading priority of the user data every day is calculated, and the third loading priority of the user data is calculated based on the preset loading priority. Specifically, taking the cycle as seven days as an example, the calling sequence of each day is multiplied by the corresponding coefficient to obtain the preset loading priority of the user data, and then the preset loading priority of the seven days is multiplied by the corresponding coefficient, wherein the coefficient corresponding to the date closer to the current date is higher.
Step 43: and carrying out weighted summation on the first loading priority, the second loading priority and the third loading priority to obtain an average loading priority.
For example, a first load priority is denoted by C, a secondThe load priority is represented by D and the third load priority is represented by E, the average load priority
Figure BDA0002499100540000101
Wherein, X1、X2、X3Are common coefficients.
Step 44: and when the average loading priority is smaller than the set priority threshold, determining the target user data as second user data.
In some embodiments, the user data of the target user with the second activity may also be differentiated in the above manner.
By the method, the user data are maintained, and the hit rate of the user calling the data after the user data are preloaded can be improved.
Referring to fig. 5, fig. 5 is a schematic flowchart of a fourth embodiment of a user data processing method provided in the present application, where the method includes:
step 51: and acquiring the activity of the target user.
And acquiring the activity of the target user, and executing the step 52 when the activity of the target user is the first activity.
Step 52: and preloading the first user data from the storage database to a cache database, and acquiring the type of the first user data.
In this embodiment, the first user data is calculated and distinguished by the user processing device according to the historical calling frequency, the historical calling duration, or the historical calling sequence, and the first user data is user data that is first called by the target user and predicted by the user processing device. In the preloading process, the type of the first user data is obtained, and if the type is video data, step 53 is executed.
Step 53: and if the type of the first user data is video data, determining the data volume of the video data.
It can be understood that the video data has a time length, so that when the video data is called by the target user, the video data cannot be completely viewed, and for the video data with a large data volume, if the video data is completely preloaded into the cache database, the load of the cache database is increased, and the storage resource is wasted.
Step 54: and if the data volume is larger than the set data volume threshold, preloading the data in the front of the playing sequence in the video data into a cache database.
In some embodiments, if the data amount is greater than the set data amount threshold, data in the video data that is in the front of the playing sequence is preloaded into the cache database. Specifically, the division into regions is performed according to the time length of the video data, such as one minute, 30 seconds. For example, if the data volume is larger than the set data volume threshold, dividing the 3-minute video data into 30 seconds and one sub-data volume, preloading the first 30 seconds of data into a cache database, sending the first 30 seconds of data to the mobile terminal when a call instruction is obtained, synchronously loading the second 30 seconds of data into the cache database, sending the second 30 seconds of data to the mobile terminal after the first 30 seconds of data is played, and sending the rest of data to the mobile terminal in this way.
By the mode, the user data with large data volume is split and sent, so that the pressure of a cache database is reduced, and the cost is reduced.
Referring to fig. 6, fig. 6 is a schematic flowchart of a fifth embodiment of a user data processing method provided in the present application, where the method further includes:
step 61: and acquiring the login times and login duration of the target user and the calling frequency of the user data in the login duration.
This embodiment is used to explain how to identify the activity of the user.
In some embodiments, the user data processing device may obtain the login times, the login duration and the call frequency of the user data in the login duration of the target user in a set period. For example, if the period is set to 30 days, the login times, login duration, and call frequency of the user data within the login duration of the target user are acquired on the basis of the current time of day on the previous 29 days and the current day of the target user.
Step 62: the method comprises the steps of determining a first preset activity degree based on login times, determining a second preset activity degree based on login duration, and determining a third preset activity degree based on calling frequency.
The mode of determining the first preset activity based on the login times may be to acquire the login times within a set time of the target user, count the login times within different dates, and then calculate the login times corresponding to the different dates to determine the first preset activity. Specifically, taking the cycle as 3 days as an example, the number of logins per day is multiplied by a corresponding coefficient to obtain a first preset activity level, wherein the coefficient corresponding to a date closer to the current date is higher.
The mode of determining the second preset activity based on the login duration may be to acquire the login duration of the target user at each login, count the login duration of each login in different dates, calculate the average login duration of each day, and calculate the average login duration corresponding to the different dates to determine the second preset activity. Specifically, taking the cycle as seven days as an example, the average login duration of each day is multiplied by a corresponding coefficient to obtain the second preset activity, wherein the coefficient corresponding to the date closer to the current date is higher.
The method for determining the third preset activity based on the calling frequency may be to obtain the calling frequency of the target user for the user data during login, count the calling frequency of the user data during login in different dates, average the calling frequency every day, and calculate the third preset activity based on the average calling frequency. Specifically, taking the period as seven days as an example, the average calling frequency of each day is multiplied by a corresponding coefficient to obtain a third preset activity, wherein the coefficient corresponding to a date closer to the current date is higher. It will be appreciated that target users who only log on, but do not invoke user data, may be excluded in this manner.
And step 63: and carrying out weighted summation on the first preset activity, the second preset activity and the third preset activity to obtain the average preset activity.
It can be understood that the weights corresponding to the first preset activity, the second preset activity and the third preset activity are set according to requirements, for example, the weights are respectively assigned to the first preset activity, the second preset activity and the third preset activity by 20%, 30% and 50%. The calculation formula of the average preset activity is AVG ═ H × 30% + I × 20% + J × 40%.
Wherein H represents a first preset activity. I denotes a second preset activity. J represents a third preset liveness.
Step 64: and when the average preset activity is smaller than the set activity threshold, determining the activity of the target user as the first activity.
After the current activity of the target user is confirmed, the previous activity of the current user is obtained, and if the previous activity is the first activity and the current activity is the second activity, the user data of the current user is stored in a cache database. If the previous activity degree is the second activity degree and the current activity degree is the first activity degree, removing the user data from the buffer database; after the mobile terminal sends a data calling instruction, user data are preloaded from the storage database to the cache database. Specifically, the loading manner refers to the above embodiments, and details are not described herein. If the previous activity and the current activity are not changed, no change is made.
By the mode, the user activity is maintained regularly, and the cache hit rate of the cache database can be improved. For users with higher liveness, the data can be stored in the cache database for a long time, the data calling can be conveniently and rapidly carried out by the users with high liveness, better service can be provided for high-quality clients by considering the viscosity of the users, the data can be loaded to the cache database after the users log in, the users with low liveness can not load the data when the data is called, and the effect of improving the data calling can be also played.
Referring to fig. 7, fig. 7 is a schematic flowchart of a sixth embodiment of a user data processing method provided in the present application, where the method further includes:
step 71: and acquiring current user data sent by the mobile terminal, and storing the current user data in a cache database.
In some embodiments, when the target user generates new user data, where the new user data includes user data formed after operations such as adding, modifying, deleting, and the like to the user data, the user data processing device stores the current user data in the cache database after acquiring the current user data sent by the mobile terminal, and the stored process is actually completed synchronously. For example, after the mobile terminal calls the target user data, the operations of adding, modifying, deleting, and the like of the target user data by the mobile terminal are synchronously performed in the cache database.
Step 72: and if the activity of the target user is the first activity, updating the user data of the target user in the storage database based on the current user data.
It can be understood that, because the time for storing the user data of the target user with the first activity in the cache database is short, if the user data in the cache database is not updated in time, when the user data in the cache database fails, the user data in the cache database is not synchronized with the actual user data, which may cause data confusion and affect the user experience. When the target user with the first liveness interacts with the cache database, the cache database is synchronized and interacts with the storage database so as to update the user data of the target user in the storage database.
Step 73: and if the activity of the target user is the second activity, updating the user data of the target user in the storage database based on the current user data when the condition that the storage database is idle is monitored.
It can be understood that, because the user data of the target user with the second activity is stored in the cache database for a longer time, the user data of the target user in the storage database can be updated based on the current user data when it is monitored that the storage database is idle. Therefore, the response of the storage database to the mobile terminal of the target user with the second activity can be reduced, and the response to the mobile terminal of the target user with the first activity can be improved. By the method, the response speed of the storage database to the mobile terminal of the target user with the first activity can be increased.
Referring to fig. 8, fig. 8 is a schematic structural diagram of an embodiment of a user data processing apparatus 80 provided in the present application, where the user data processing apparatus includes a processor 81 and a memory 82 connected to the processor 81; the memory 82 is used for storing program data and the processor 81 is used for executing the program data for carrying out the following method steps:
acquiring the activity of a target user; the user data corresponding to the first activity degree is stored in a storage database, the user data corresponding to the second activity degree is stored in a cache database, and the first activity degree is smaller than the second activity degree; if the activity of the target user is the first activity, preloading user data of the target user from a storage database to a cache database; and when a data calling instruction sent by the mobile terminal of the login target user is acquired, sending the user data in the cache database to the mobile terminal.
It will be appreciated that the processor 81 is arranged to execute program data and is also arranged to implement any of the above described embodiment methods.
It is understood that the user data processing device 80 may be a server or an intermediate device.
Referring to fig. 9, fig. 9 is a schematic structural diagram of an embodiment of a computer storage medium provided in the present application, the computer storage medium 90 is used for storing program data 91, and the program data 91 is used for implementing the following method steps when being executed by a processor:
acquiring the activity of a target user; the user data corresponding to the first activity degree is stored in a storage database, the user data corresponding to the second activity degree is stored in a cache database, and the first activity degree is smaller than the second activity degree; if the activity of the target user is the first activity, preloading user data of the target user from a storage database to a cache database; and when a data calling instruction sent by the mobile terminal of the login target user is acquired, sending the user data in the cache database to the mobile terminal.
It will be appreciated that the program data 91, when executed by a processor, is also for implementing any of the embodiment methods described above.
In the several embodiments provided in the present application, it should be understood that the disclosed method and apparatus may be implemented in other manners. For example, the above-described device embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed.
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 units can be selected according to actual needs to achieve the purpose of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated units in the other embodiments described above may be stored in a computer-readable storage medium if they are implemented in the form of software functional units and sold or used as separate products. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed by the prior art, or all or part of the technical solution may be embodied in 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, a network device, or the like) or a processor (processor) to execute all or part of the steps of the method according to the embodiments of the present application. 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.
The above description is only for the purpose of illustrating embodiments of the present application and is not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings of the present application or are directly or indirectly applied to other related technical fields, are also included in the scope of the present application.

Claims (10)

1. A method for processing user data, the method comprising:
acquiring the activity of a target user; the user data corresponding to a first activity degree is stored in a storage database, the user data corresponding to a second activity degree is stored in the storage database and loaded into a cache database, and the first activity degree is smaller than the second activity degree;
if the activity of the target user is a first activity, preloading user data of the target user from the storage database to the cache database when the target user logs in;
and when a data calling instruction sent by the mobile terminal for logging in the target user is acquired, sending the user data in the cache database to the mobile terminal.
2. The method of claim 1,
the activity of the target user is a first activity, and the user data at least comprises first user data and second user data; the first user data and the second user data are determined based on historical calling frequency, historical calling duration or historical calling sequence of data;
if the activity of the target user is a first activity, preloading user data of the target user from the storage database to the cache database when the target user logs in, including:
and if the activity of the target user is the first activity, preloading the first user data from the storage database to the cache database when the target user logs in.
3. The method of claim 2,
when the data call instruction sent by the mobile terminal for logging in the target user is obtained, sending the user data in the cache database to the mobile terminal, wherein the data call instruction comprises:
when a calling instruction based on the first user data and sent by a mobile terminal for logging in the target user is obtained, sending the first user data in the cache database to the mobile terminal;
preloading the second user data from the storage database into the cache database.
4. The method of claim 2,
the method further comprises the following steps:
acquiring historical calling frequency, historical calling duration or historical calling sequence of target user data;
determining a first loading priority based on the historical calling frequency, determining a second loading priority based on the historical calling duration, and determining a third loading priority based on the historical calling sequence;
performing weighted summation on the first loading priority, the second loading priority and the third loading priority to obtain an average loading priority;
and when the average loading priority is greater than a set priority threshold, determining the target user data as the first user data, and when the average loading priority is less than the set priority threshold, determining the target user data as the second user data.
5. The method of claim 2,
the first user data is video data;
the preloading the first user data from the storage database into the cache database comprises:
determining a data amount of the video data;
and if the data volume is larger than a set data volume threshold value, preloading the data in the front of the playing sequence in the video data into the cache database.
6. The method of claim 1,
the method further comprises the following steps:
acquiring the login times and login duration of a target user and the calling frequency of user data in the login duration;
and calculating the activity of the target user based on the login times, the login duration and the calling frequency.
7. The method of claim 6,
calculating the activity of the target user based on the login times, the login duration and the call frequency, including:
determining a first preset activity degree based on the login times, determining a second preset activity degree based on the login duration, and determining a third preset activity degree based on the calling frequency;
carrying out weighted summation on the first preset activity, the second preset activity and the third preset activity to obtain an average preset activity;
and when the average preset activity is smaller than the set activity threshold, determining that the activity of the target user is the first activity.
8. The method of claim 1,
the method further comprises the following steps:
acquiring current user data sent by a mobile terminal, and storing the current user data in a cache database; wherein the current user data is generated by the mobile terminal in response to the operation instruction of the target user;
if the activity of the target user is the first activity, updating the user data of the target user in the storage database based on the current user data;
if the activity of the target user is the second activity, updating the user data of the target user in the storage database based on the current user data when the storage database is monitored to be idle.
9. A user data processing apparatus, characterized in that the user data processing apparatus comprises a processor and a memory connected to each other;
wherein the memory is adapted to store program data and the processor is adapted to execute the program data to implement the method of any of claims 1-8.
10. A computer storage medium for storing program data for implementing the method according to any one of claims 1-8 when executed by a processor.
CN202010427091.2A 2020-05-19 2020-05-19 User data processing method, processing device and computer storage medium Pending CN113688338A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010427091.2A CN113688338A (en) 2020-05-19 2020-05-19 User data processing method, processing device and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010427091.2A CN113688338A (en) 2020-05-19 2020-05-19 User data processing method, processing device and computer storage medium

Publications (1)

Publication Number Publication Date
CN113688338A true CN113688338A (en) 2021-11-23

Family

ID=78576357

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010427091.2A Pending CN113688338A (en) 2020-05-19 2020-05-19 User data processing method, processing device and computer storage medium

Country Status (1)

Country Link
CN (1) CN113688338A (en)

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5559984A (en) * 1993-09-28 1996-09-24 Hitachi, Ltd. Distributed file system permitting each user to enhance cache hit ratio in file access mode
CN103020146A (en) * 2012-11-22 2013-04-03 华为技术有限公司 Data processing method and equipment
CN104331492A (en) * 2014-11-14 2015-02-04 北京国双科技有限公司 Method and device for caching multi-instance data
CN105100210A (en) * 2015-06-24 2015-11-25 深圳市美贝壳科技有限公司 File cache method and device applied to client
CN105391654A (en) * 2015-11-26 2016-03-09 中国建设银行股份有限公司 Account activeness-based system resource allocation method and device
CN106339331A (en) * 2016-08-31 2017-01-18 电子科技大学 Data cache layer replacement algorithm based on user activity degree
CN106649349A (en) * 2015-10-30 2017-05-10 腾讯科技(深圳)有限公司 Method, device and system for data caching, applicable to game application
CN106844032A (en) * 2017-01-23 2017-06-13 努比亚技术有限公司 The storage processing method and device of a kind of terminal applies
CN107026879A (en) * 2016-01-30 2017-08-08 华为技术有限公司 A kind of data cache method and background application system
CN107239572A (en) * 2017-06-28 2017-10-10 郑州云海信息技术有限公司 The data cache method and device of a kind of storage management software
CN110008284A (en) * 2019-03-18 2019-07-12 武汉达梦数据库有限公司 Method for synchronizing data of database and equipment based on data page preloading and rollback
CN110519327A (en) * 2019-07-12 2019-11-29 平安普惠企业管理有限公司 User enlivens type judgement method, device, computer equipment and storage medium
CN110807128A (en) * 2019-10-25 2020-02-18 北京达佳互联信息技术有限公司 Video preloading method, device, equipment and storage medium

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5559984A (en) * 1993-09-28 1996-09-24 Hitachi, Ltd. Distributed file system permitting each user to enhance cache hit ratio in file access mode
CN103020146A (en) * 2012-11-22 2013-04-03 华为技术有限公司 Data processing method and equipment
CN104331492A (en) * 2014-11-14 2015-02-04 北京国双科技有限公司 Method and device for caching multi-instance data
CN105100210A (en) * 2015-06-24 2015-11-25 深圳市美贝壳科技有限公司 File cache method and device applied to client
CN106649349A (en) * 2015-10-30 2017-05-10 腾讯科技(深圳)有限公司 Method, device and system for data caching, applicable to game application
CN105391654A (en) * 2015-11-26 2016-03-09 中国建设银行股份有限公司 Account activeness-based system resource allocation method and device
CN107026879A (en) * 2016-01-30 2017-08-08 华为技术有限公司 A kind of data cache method and background application system
CN106339331A (en) * 2016-08-31 2017-01-18 电子科技大学 Data cache layer replacement algorithm based on user activity degree
CN106844032A (en) * 2017-01-23 2017-06-13 努比亚技术有限公司 The storage processing method and device of a kind of terminal applies
CN107239572A (en) * 2017-06-28 2017-10-10 郑州云海信息技术有限公司 The data cache method and device of a kind of storage management software
CN110008284A (en) * 2019-03-18 2019-07-12 武汉达梦数据库有限公司 Method for synchronizing data of database and equipment based on data page preloading and rollback
CN110519327A (en) * 2019-07-12 2019-11-29 平安普惠企业管理有限公司 User enlivens type judgement method, device, computer equipment and storage medium
CN110807128A (en) * 2019-10-25 2020-02-18 北京达佳互联信息技术有限公司 Video preloading method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN105205014B (en) A kind of date storage method and device
CN107357896A (en) Expansion method, device, system and the data base cluster system of data-base cluster
CN104978335B (en) Data access control method and device
JP4317531B2 (en) System and method for balancing multiple memory buffer sizes
CN108780404A (en) Effective real-time migration of remote access data
CN107197359B (en) Video file caching method and device
CN111068305B (en) Cloud game loading control method and device, electronic equipment and storage medium
CN110895524B (en) Composite overdue method, device, server and storage medium of full-load redis time key
CN106951573A (en) A kind of living broadcast interactive data load method, server and computer-readable medium
CN110191168A (en) Processing method, device, computer equipment and the storage medium of online business datum
CN107688626A (en) Slow inquiry log processing method, device and electronic equipment
CN108632667A (en) A kind of coding/decoding method and terminal of multimedia file
CN113688338A (en) User data processing method, processing device and computer storage medium
CN109325001A (en) The method, device and equipment of small documents is deleted based on meta data server
CN113230665A (en) Resource allocation method and device
CN111913913A (en) Access request processing method and device
CN109977074B (en) HDFS-based LOB data processing method and device
WO2019206260A1 (en) Method and apparatus for reading file cache
CN112711739A (en) Data processing method and device, server and storage medium
CN115499513A (en) Data request processing method and device, computer equipment and storage medium
CN112231590B (en) Content recommendation method, system, computer device and storage medium
CN115269522A (en) Distributed file caching method, system, equipment and storage medium
CN106354722B (en) Message processing method and device for streaming computing system
CN114201696A (en) Message pushing method and device, storage medium and computer equipment
CN107016296A (en) A kind of data directory structure, the method for digital independent, device and electronic equipment

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