User data processing method, device, electronic device and storage medium

By constructing and encrypting user portrait information, the problem of user portrait information leakage is solved, and high security of user privacy information and data redundant storage are achieved to prevent information loss.

CN112560054BActive Publication Date: 2024-11-08GREE ELECTRIC APPLIANCE INC OF ZHUHAI +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011474641.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-14
Publication Date
2024-11-08
Estimated Expiration
2040-12-14

AI Technical Summary

Technical Problem

In the prior art, user portrait information is easily illegally obtained, resulting in the leakage of user privacy information and lack of effective protective measures.

Method used

By obtaining user behavior data, using pre-trained data detection model to construct user portrait information, convert it into preset information format and encrypt it, generate user portrait ciphertext, save it in terminal devices and servers, and use asymmetric encryption algorithm to use Ensure data security.

Benefits of technology

Effectively prevent user privacy information from being leaked, improve the security of user portrait information, and prevent data loss through dual storage in terminal devices and servers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112560054B_ABST
    Figure CN112560054B_ABST
Patent Text Reader

Abstract

The present application relates to a user data processing method, device, electronic device and storage medium, the method comprising: obtaining user behavior data; constructing user portrait information corresponding to the user behavior data according to a pre-trained data detection model; converting the user portrait information into a preset information format and encrypting it to obtain a user portrait ciphertext; and saving the user portrait ciphertext to a terminal device and a server. The technical solution constructs user portrait information based on user behavior data, and encrypts and stores the user portrait information in a terminal device and a server after converting the user portrait information into a unified format. Since ciphertext is stored, malicious third parties are prevented from intercepting data and obtaining user privacy information, thereby improving the security of user privacy information. In addition, the user portrait information is stored in the terminal device and the server respectively to prevent data loss caused by failure of one of the devices, thereby improving data security.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of information security technology, and in particular to a user data processing method, device, electronic device and storage medium. Background Art

[0002] In the era of big data and mobile Internet, in order to analyze the group distribution characteristics and diversified and personalized needs of users, most network operators and network product and service providers will use user profiling in their business activities. User profiling is the process of collecting, aggregating and analyzing user data to analyze or predict the personal characteristics of a specific natural person, such as his / her occupation, economy, health, education, personal preferences, credit, behavior, etc., to form a personal characteristic model. The final personal characteristic model is the user portrait information.

[0003] Since user portrait information is related to personal privacy information such as user behavior habits and consumption habits, how to prevent user portrait information from being leaked and illegally obtained and used by others has become a technical problem that urgently needs to be solved. Summary of the invention

[0004] In order to solve the technical problem in the prior art that user portrait information is easily leaked and illegally obtained and used by others, the embodiments of the present application provide a user data processing method, device, electronic device and storage medium.

[0005] In a first aspect, an embodiment of the present application provides a method for processing user data, including:

[0006] Obtain user behavior data;

[0007] Constructing user profile information corresponding to the user behavior data according to a pre-trained data detection model;

[0008] The user portrait information is converted into a preset information format and then encrypted to obtain a user portrait ciphertext;

[0009] The user portrait ciphertext is saved to the terminal device and the server.

[0010] Optionally, constructing user portrait information corresponding to the user behavior data based on a pre-trained data detection model includes:

[0011] Inputting the user behavior data into the data detection model to obtain a user habit label corresponding to the user behavior data;

[0012] The user portrait information is constructed according to the user habit tags.

[0013] Optionally, inputting the user behavior data into the data detection model to obtain a user habit label corresponding to the user behavior data includes:

[0014] Identify the behavior time, behavior characteristics and criticality corresponding to each of the behavior characteristics corresponding to the user behavior data;

[0015] Obtaining a weight influence factor corresponding to the behavior time, wherein the weight influence factor increases the feature weight corresponding to the behavior feature as the behavior time approaches the current time;

[0016] Calculating a feature weight corresponding to the behavior feature according to the weight influencing factor and the criticality;

[0017] The user habit label is generated according to the behavior feature and the feature weight.

[0018] Optionally, generating the user habit label according to the behavior feature and the feature weight includes:

[0019] When the feature weight is greater than or equal to a weight threshold, a user habit label including the behavior feature and the feature weight is generated.

[0020] Optionally, the identifying the criticality corresponding to each of the behavioral features includes:

[0021] Determining a first set including the behavior features from the user behavior data;

[0022] Calculating the occurrence frequency of the behavior feature in the first set;

[0023] Calculating the reverse file frequency of the behavior feature, where the reverse file frequency is obtained by dividing the total number of user behavior data by the number of data in the first set and then taking the logarithm of the obtained quotient;

[0024] The criticality is obtained according to the product of the occurrence frequency and the reverse file frequency.

[0025] Optionally, constructing the user portrait information according to the user habit tag includes:

[0026] Get the most recent historical user habit tag;

[0027] Comparing the similarity between the user habit tag and the historical user habit tag;

[0028] When the similarity is less than or equal to a preset threshold, the user habit tag is used to update the historical user habit tag;

[0029] The user portrait information is constructed based on the updated user habit tags.

[0030] Optionally, the converting the user portrait information into a preset information format and then encrypting it to obtain a user portrait ciphertext includes:

[0031] Determining a symmetric key encrypted by an asymmetric encryption algorithm between the terminal device and the server;

[0032] The user portrait data in a preset information format is encrypted using the symmetric key to obtain the user portrait ciphertext.

[0033] In a second aspect, an embodiment of the present application provides a user data processing device, including:

[0034] Acquisition module, used to obtain user behavior data;

[0035] A construction module, used to construct user portrait information corresponding to the user behavior data according to a pre-trained data detection model;

[0036] A conversion encryption module, used to convert the user portrait information into a preset information format and then encrypt it to obtain a user portrait ciphertext;

[0037] The storage module is used to save the encrypted user portrait to the terminal device and the server.

[0038] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;

[0039] The memory is used to store computer programs;

[0040] The processor is used to implement the above method steps when executing a computer program.

[0041] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the above-mentioned method steps when the computer program is executed by a processor.

[0042] The above technical solution provided by the embodiment of the present application has the following advantages compared with the prior art:

[0043] In this embodiment, user profile information is constructed based on user behavior data, and the user profile information is converted into a unified format and encrypted and stored in the terminal device and server. Since the stored information is encrypted, malicious third parties are prevented from obtaining user privacy information after intercepting the data, thereby improving the security of user privacy information. In addition, the user profile information is stored separately in the terminal device and the server to prevent data loss caused by failure of one of the devices, thereby improving data security. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0045] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0046] Figure 1 A flowchart of a user data processing method provided in an embodiment of the present application;

[0047] Figure 2 A flowchart of a user data processing method provided by another embodiment of the present application;

[0048] Figure 3 A flowchart of a user data processing method provided by another embodiment of the present application;

[0049] Figure 4 A flowchart of a user data processing method provided by another embodiment of the present application;

[0050] Figure 5 A flowchart of a user data processing method provided by another embodiment of the present application;

[0051] Figure 6 A flowchart of a user data processing method provided by another embodiment of the present application;

[0052] Figure 7 A block diagram of a user data processing device provided in an embodiment of the present application;

[0053] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0054] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0055] The embodiment of the present application improves the security of user data by converting and encrypting user portrait information.

[0056] The technical solution of the embodiment of the present application can be implemented on a terminal device or a server, that is, user portrait information is constructed based on user behavior data, and the user portrait information is converted and encrypted, which can be executed by the terminal device or by the server. The encrypted user portrait information will be stored in ciphertext on the terminal device and the server respectively.

[0057] First, a user data processing method provided by an embodiment of the present invention is introduced below.

[0058] Figure 1 A flowchart of a user data processing method provided in an embodiment of the present application. Figure 1 As shown, the method is applied to a terminal device or a server, and comprises the following steps:

[0059] Step S11, obtaining user behavior data.

[0060] Among them, user behavior data can be collected by terminal devices, and user behavior data includes the behaviors performed by users, such as the number of times a web page is visited, the relevance of the visited web pages, the frequency of visits, the time spent on visited web pages, the information entered, interactive operations (follow, rate, bookmark, order), etc.

[0061] The terminal device sends the collected user data to the server, and the server executes the subsequent steps, or the terminal device itself executes the subsequent steps.

[0062] Optionally, in this step, the user behavior data can also be screened and filtered to remove invalid user behavior data. Invalid user behavior data includes: behavior data with a low frequency of occurrence, such as pages opened by users by mistake, etc.; user behavior data that is prohibited from being collected by users, such as the behavior of visiting banking, financial, and wealth management websites, etc.

[0063] Step S12, constructing user portrait information corresponding to the user behavior data based on the pre-trained data detection model.

[0064] Among them, the data detection model can be obtained by pre-training target detection models such as Faster R-CNN, SSD and YOLO using sample data.

[0065] Step S13, converting the user portrait information into a preset information format and then encrypting it to obtain a user portrait ciphertext.

[0066] Among them, the format of user portrait information can be converted based on the information exchange technology of Extensible Markup Language (XML). In this way, the server requests sent and the responses received by different terminal devices, using different operating systems, through different communication lines and communication protocols are converted into the same information format, so that the terminal devices can access different servers through a single line, and the servers can also provide services to different terminal devices through a single line.

[0067] The user portrait information after format conversion is encrypted using a symmetric encryption algorithm, an asymmetric encryption algorithm, or a combination of the two, to ensure the security of the user portrait information transmitted between the terminal device and the server.

[0068] Optionally, the MD5 Message-Digest Algorithm can be used between the terminal device and the server to further encrypt the user portrait information. The MD5 algorithm processes the user portrait information in 512-bit groups, and each group is divided into 16 32-bit sub-groups. After a series of processing, the output of the algorithm consists of four 32-bit groups. After the four 32-bit groups are cascaded, a 128-bit hash value is generated. In this way, the complete consistency of the user portrait information transmitted between the terminal device and the server is ensured.

[0069] Optionally, different encryption algorithms may be used to encrypt the user portrait information stored in the terminal device and the user portrait information stored in the server.

[0070] Step S14, save the encrypted user portrait to the terminal device and server.

[0071] In this embodiment, user profile information is constructed based on user behavior data, and the user profile information is converted into a unified format and encrypted and stored in the terminal device and server. Since the stored information is encrypted, malicious third parties are prevented from obtaining user privacy information after intercepting the data, thereby improving the security of user privacy information. In addition, the user profile information is stored separately in the terminal device and the server to prevent data loss caused by failure of one of the devices, thereby improving data security.

[0072] Optionally, in the terminal device or server, the newly generated user portrait information is used to update and overwrite the historical portrait information corresponding to the user, and mark the timestamp.

[0073] In the above embodiment, the data detection model can be trained in the server. If the terminal device is used to build the user portrait information, the server will send the data detection model to the terminal device.

[0074] Figure 2This is a flowchart of a user data processing method provided by another embodiment of the present application. Figure 2 As shown, the above step S12 includes the following steps:

[0075] Step S21, inputting the user behavior data into the data detection model to obtain the user habit label corresponding to the user behavior data;

[0076] Step S22, constructing user portrait information based on user habit tags.

[0077] Through the data detection model, user habit labels are used to describe user behavior data, so that the final user portrait information can be a collection of user habit labels.

[0078] Among them, historical user behavior data can be used as samples to train the target detection model, so that the model learns the relationship between user behavior data and user habits. For example, the behavior data corresponding to a user's visit to a website includes the type of website visited and the time spent on each website each time. In this way, based on the historical user's behavior data on visiting websites, the time distribution of users' visits to various types of websites can be counted, and then the user's website type preference can be determined, and the user habit label used to mark the website type preference can be obtained.

[0079] Figure 3 This is a flowchart of a user data processing method provided by another embodiment of the present application. Figure 3 As shown, step S21 includes the following steps:

[0080] Step S31, identifying the behavior time, behavior features and the criticality corresponding to each behavior feature corresponding to the user behavior data.

[0081] Among them, criticality is used to express the frequency of occurrence of the behavioral feature and its influence on the formation of user habit labels.

[0082] In this step, by identifying the behavior features corresponding to the user behavior data, it is possible to determine whether the behavior features are the user's current habits based on the behavior time and the frequency of the behavior, thereby determining the user habit label.

[0083] Figure 4 This is a flowchart of a user data processing method provided by another embodiment of the present application. Figure 4 As shown, optionally, the identification of the criticality corresponding to each behavior feature in step S31 can be implemented by a term frequency-inverse document frequency (TF-IDF) algorithm, which specifically includes the following steps S41 to S44:

[0084] Step S41, determining a first set of behavior features from user behavior data.

[0085] Step S42, calculating the occurrence frequency of the behavior feature in the first set.

[0086] For example, if the number of all behavioral features in the first set is n and the number of occurrences of behavioral feature i is t, then the occurrence frequency of behavioral feature i is

[0087] Step S43, calculating the reverse file frequency of the behavior feature, where the reverse file frequency is obtained by dividing the total number of user behavior data by the number of data in the first set, and then taking the logarithm of the obtained quotient.

[0088] For example, if the total number of user behavior data is M and the number of data in the first set is m, then the reverse file frequency of behavior feature i is

[0089] Step S44, obtaining the criticality according to the product of the occurrence frequency and the reverse file frequency.

[0090] Based on the occurrence frequency TF of the behavior feature i obtained in step S42 above and the inverse file frequency IDF, the criticality of the behavior feature i is calculated.

[0091] If the total number of user behavior data is 10,000,000, the number of user data in the first set containing behavior feature i is 1,000, the number of all behavior features in the first set is 100, and the number of occurrences of behavior feature i is 15, then the criticality corresponding to the behavior feature is

[0092] Step S32, obtaining a weight influence factor corresponding to the behavior time, wherein the weight influence factor increases the feature weight corresponding to the behavior feature as the behavior time approaches the current time.

[0093] The longer the behavior time is, the smaller the impact on the user's current behavior habits. For example, 5 years ago, a user searched for college entrance examination books, and the current user searches for postgraduate entrance examination books. At this time, the label corresponding to the college entrance examination books cannot be used as user portrait information.

[0094] For example, the weight impact factor corresponding to the last week is 1, the weight impact factor corresponding to the last month is 0.6, the weight impact factor corresponding to the last year is 0.3, and the weight impact factor corresponding to the last five years is 0.01.

[0095] If the time range of user behavior distribution is large, such as the existence of user behavior data containing the same behavior characteristics in the last week, the last month, and the last year, the time range with the highest frequency can be selected to determine the corresponding weight impact factor of the behavior characteristic. For example, if a user visits a shopping website 14 times in the last week and 100 times in the last month, the frequency of visiting the shopping website in the last week is 2 times / day, and the frequency of visiting the shopping website in the last month is 3.3 times / day. The weight impact factor corresponding to the last month, 0.6, can be selected as the weight impact factor for the behavior characteristic of visiting shopping websites.

[0096] Optionally, the weight influence factor corresponding to the most recent behavior time may be selected as the weight influence factor of the behavior feature; or the weight influence factor corresponding to the time when the access frequency exceeds a certain threshold may be selected as the weight influence factor of the behavior feature; and so on.

[0097] Step S33, calculating the feature weight corresponding to the behavior feature according to the weight influence factor and the criticality.

[0098] For example, the weight impact factor is multiplied by the criticality to obtain the weight corresponding to the behavior feature. If the behavior time of the user behavior data containing the behavior feature i is the last month, and the weight impact factor corresponding to the behavior feature i is 0.6, then the feature weight corresponding to the behavior feature W = 0.6 × 0.6 = 0.36.

[0099] Step S34, generating user habit labels based on behavioral characteristics and characteristic weights.

[0100] Optionally, a weight threshold may be set, and when the feature weight is greater than or equal to the weight threshold, a user habit label including the behavior feature and the feature weight is generated. For example, the user habit label generated based on the above behavior feature i and feature weight may be <behavior feature i, 0.36>.

[0101] Through the above steps S31 to S34, the user behavior characteristics, behavior time and the criticality corresponding to the behavior characteristics identified by the data detection model are used to analyze and obtain the user habit label, so that the user habit label can accurately reflect the user's current behavior habits.

[0102] In the above embodiment, in order to avoid frequent updates of user portrait information, the user habit label is not updated when the user behavior habits do not change much. Figure 5 This is a flowchart of a user data processing method provided by another embodiment of the present application. Figure 5 As shown, the above step S22 includes:

[0103] Step S51, obtaining the most recently obtained historical user habit tag;

[0104] Step S52, comparing the similarity between the user habit tag and the historical user habit tags;

[0105] Step S53, when the similarity is less than or equal to a preset threshold, the historical user habit tag is updated using the user habit tag;

[0106] Step S54, constructing user portrait information based on the updated user habit tags.

[0107] Through the above steps S51 to S54, when the user habits change significantly, the user habit labels are updated, and the user portrait information is reconstructed based on the new user habit labels.

[0108] Figure 6 This is a flowchart of a user data processing method provided by another embodiment of the present application. Figure 6 As shown, the above step S13 includes:

[0109] Step S61, determining a symmetric key encrypted by an asymmetric encryption algorithm between the terminal device and the server;

[0110] Step S62, encrypt the user portrait data in a preset information format using a symmetric key to obtain a user portrait ciphertext.

[0111] Among them, symmetric encryption AES uses only the same key for data encryption and decryption. Asymmetric encryption RSA requires the generation of two keys (a pair) in advance. The data encrypted by one of the keys can only be decrypted by the other key. Usually one of the two keys will be exposed, that is, open to the public, and this key is called the "public key". On the contrary, the other is hidden and the undisclosed key is called the "private key". In this embodiment, data encryption can be implemented by combining RSA and AES encryption algorithms.

[0112] For example, the terminal device uses a combination of RSA and AES encryption algorithms to implement data encryption, and the server decrypts the data in the following steps:

[0113] Step a1, the terminal device randomly generates an AES key aesKey;

[0114] Step a2, using aesKey to encrypt the user portrait information to obtain encrypted content A;

[0115] Step a3, encrypt aesKey using the RSA public key rsaPublicKey to obtain encrypted content B;

[0116] Step a4, transmitting the encrypted content A and the encrypted content B to the server;

[0117] Step a5, the server receives the encrypted content A and the encrypted content B;

[0118] Step a6, using the RSA private key rsaPrivateKey preset on the server to decrypt the encrypted content B and restore the aesKey of the terminal device;

[0119] Step a7, use the obtained aesKey to decrypt the encrypted content A to obtain the user portrait information.

[0120] In this way, even if the encrypted AES key is intercepted by others during the transmission process, it will be of no help to them, because others do not know the RSA private key and cannot decrypt the original AES key, and therefore cannot decrypt the user portrait information encrypted with AES.

[0121] In addition, the server may also use a combination of RSA and AES encryption algorithms to implement data encryption, and the terminal device may perform decryption. The specific process is similar to the above encryption and decryption process and will not be repeated here.

[0122] In the above embodiment, by adopting a combination of symmetric and asymmetric encryption methods, the security of communication between the terminal device and the server, as well as the security of storing user portrait information in the terminal device and the server, is further improved.

[0123] The following are device embodiments of the present application, which can be used to execute method embodiments of the present application.

[0124] Figure 7 This is a block diagram of a user data processing device provided in an embodiment of the present application. The device can be implemented as part or all of an electronic device through software, hardware, or a combination of both. Figure 7 As shown, the user data processing device includes:

[0125] An acquisition module 71 is used to acquire user behavior data;

[0126] A construction module 72, used to construct user portrait information corresponding to the user behavior data according to a pre-trained data detection model;

[0127] The conversion and encryption module 73 is used to convert the user portrait information into a preset information format and then encrypt it to obtain a user portrait ciphertext;

[0128] The storage module 74 is used to save the encrypted user portrait to the terminal device and the server.

[0129] Optionally, a construction module 72 is used to input the user behavior data into the data detection model to obtain a user habit label corresponding to the user behavior data; and construct the user portrait information according to the user habit label.

[0130] Optionally, a module 72 is constructed to identify the behavior time, behavior characteristics and the criticality corresponding to each behavior characteristic corresponding to the user behavior data; obtain a weight influence factor corresponding to the behavior time, wherein the weight influence factor increases the feature weight corresponding to the behavior characteristic as the behavior time approaches the current time; calculate the feature weight corresponding to the behavior characteristic based on the weight influence factor and the criticality; and generate the user habit label based on the behavior characteristic and the feature weight.

[0131] Optionally, a construction module 72 is used to generate a user habit label including the behavior feature and the feature weight when the feature weight is greater than or equal to a weight threshold.

[0132] Optionally, a construction module 72 is used to determine a first set containing the behavioral features from the user behavior data; calculate the frequency of occurrence of the behavioral features in the first set; calculate the reverse file frequency of the behavioral features, the reverse file frequency being obtained by dividing the total number of user behavior data by the number of data in the first set and then taking the logarithm of the quotient; and obtain the criticality based on the product of the occurrence frequency and the reverse file frequency.

[0133] Optionally, a construction module 72 is used to obtain the most recently obtained historical user habit tag; compare the similarity between the user habit tag and the historical user habit tag; when the similarity is less than or equal to a preset threshold, use the user habit tag to update the historical user habit tag; and construct the user portrait information based on the updated user habit tag.

[0134] Optionally, the conversion encryption module 73 is used to determine the symmetric key encrypted between the terminal device and the server through an asymmetric encryption algorithm; encrypt the user portrait data in a preset information format through the symmetric key to obtain the user portrait ciphertext.

[0135] The present application also provides an electronic device, such as Figure 8 As shown, the electronic device may include: a processor 1501 , a communication interface 1502 , a memory 1503 and a communication bus 1504 , wherein the processor 1501 , the communication interface 1502 , and the memory 1503 communicate with each other via the communication bus 1504 .

[0136] Memory 1503, used for storing computer programs;

[0137] The processor 1501 is used to implement the steps of the above method embodiment when executing the computer program stored in the memory 1503.

[0138] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0139] The communication interface is used for communication between the above electronic device and other devices.

[0140] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0141] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0142] The present application also provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method embodiment described below are implemented.

[0143] It should be noted that, for the above-mentioned device, electronic device and computer-readable storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0144] It should be further noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0145] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A user data processing method, characterized in that: include: Obtain user behavior data; Constructing user profile information corresponding to the user behavior data according to a pre-trained data detection model; The user portrait information is converted into a preset information format and then encrypted to obtain a user portrait ciphertext; The encrypted user portrait is saved in the terminal device and the server; The step of constructing user portrait information corresponding to the user behavior data based on the pre-trained data detection model includes: Inputting the user behavior data into the data detection model to obtain a user habit label corresponding to the user behavior data; Constructing the user portrait information according to the user habit tags; The step of inputting the user behavior data into the data detection model to obtain a user habit label corresponding to the user behavior data includes: Identify the behavior time, behavior characteristics and criticality corresponding to each of the behavior characteristics corresponding to the user behavior data; Obtaining a weight influence factor corresponding to the behavior time, wherein the weight influence factor increases the feature weight corresponding to the behavior feature as the behavior time approaches the current time; Calculating a feature weight corresponding to the behavior feature according to the weight influencing factor and the criticality; Generating the user habit label according to the behavior feature and the feature weight; The identifying the criticality corresponding to each of the behavioral features includes: Determining a first set including the behavior features from the user behavior data; Calculating the occurrence frequency of the behavior feature in the first set; Calculating the reverse file frequency of the behavior feature, where the reverse file frequency is obtained by dividing the total number of user behavior data by the number of data in the first set and then taking the logarithm of the obtained quotient; The criticality is obtained according to the product of the occurrence frequency and the reverse file frequency.

2. The method according to claim 1, characterized in that The step of generating the user habit label according to the behavior feature and the feature weight includes: When the feature weight is greater than or equal to a weight threshold, a user habit label including the behavior feature and the feature weight is generated.

3. The method according to claim 1, characterized in that The constructing the user portrait information according to the user habit tag includes: Get the most recent historical user habit tag; Comparing the similarity between the user habit tag and the historical user habit tag; When the similarity is less than or equal to a preset threshold, the user habit tag is used to update the historical user habit tag; The user portrait information is constructed based on the updated user habit tags.

4. The method according to claim 1, characterized in that: The converting the user portrait information into a preset information format and then encrypting it to obtain a user portrait ciphertext includes: Determining a symmetric key encrypted by an asymmetric encryption algorithm between the terminal device and the server; The user portrait data in a preset information format is encrypted using the symmetric key to obtain the user portrait ciphertext.

5. A user data processing device, characterized in that: include: Acquisition module, used to obtain user behavior data; A construction module, used to construct user portrait information corresponding to the user behavior data according to a pre-trained data detection model; A conversion encryption module, used to convert the user portrait information into a preset information format and then encrypt it to obtain a user portrait ciphertext; A storage module, used to save the encrypted user portrait to a terminal device and a server; The construction module is used to input the user behavior data into the data detection model to obtain the user habit label corresponding to the user behavior data; and construct the user portrait information according to the user habit label; The construction module is used to identify the behavior time, behavior characteristics and the criticality corresponding to each behavior characteristic corresponding to the user behavior data; obtain the weight influence factor corresponding to the behavior time, and the weight influence factor affects the increase of the feature weight corresponding to the behavior characteristic as the behavior time approaches the current time; calculate the feature weight corresponding to the behavior characteristic according to the weight influence factor and the criticality; generate the user habit label according to the behavior characteristic and the feature weight; The construction module is used to determine a first set including the behavior features from the user behavior data; Calculating the occurrence frequency of the behavior feature in the first set; Calculate the reverse file frequency of the behavior feature, where the reverse file frequency is obtained by dividing the total number of user behavior data by the number of data in the first set and then taking the logarithm of the quotient; obtain the criticality according to the product of the occurrence frequency and the reverse file frequency.

6. An electronic device, characterized in that: include: A processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; The memory is used to store computer programs; The processor is used to implement the method steps described in any one of claims 1 to 4 when executing the computer program.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method steps described in any one of claims 1 to 4 are implemented.