User portrait management method, device, electronic device and storage medium

By determining the user's authorization status in the user portrait management system, unauthorized use of user portraits is avoided, the problem of low user portrait security is solved, and higher user privacy protection is achieved.

CN114996347BActive Publication Date: 2024-08-27CHINA TELECOM CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210730320.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-24
Publication Date
2024-08-27
Estimated Expiration
2042-06-24

AI Technical Summary

Technical Problem

In the existing technology, user authorization is not obtained when conducting commercial activities based on user portraits, resulting in user rights and privacy being violated, and the security of user portraits is low.

Method used

After receiving the user portrait usage request, extract the user's user ID and usage summary, obtain the authorization list and authorization summary, and determine whether the user has the right to use. If the user does not have the right to use, an alarm message will be sent, otherwise the user portrait will be sent.

Benefits of technology

It effectively avoids the unauthorized use of user portraits, improves the security of user portraits, and protects users' rights and privacy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114996347B
    Figure CN114996347B
Patent Text Reader

Abstract

The disclosed embodiment provides a user portrait management method, device, electronic device and storage medium. After receiving a use request for a target user portrait of a target user, the user identification of the user carried in the use request and the use summary carried in the use request are extracted; the authorization list and authorization summary of the target user for the target user portrait are obtained; based on the user identification, use summary, authorization list and authorization summary, it is determined whether the user has the right to use the target user portrait; if the user does not have the right to use the target user portrait, an alarm message is sent to the electronic device used by the target user to remind the target user of the user's request to use the target user portrait; if the user has the right to use the target user portrait, the target user portrait is sent to the electronic device used by the user. Based on this, it is possible to avoid infringement of the user's rights and privacy and improve the security of the user portrait.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of Internet technology, and in particular to a user portrait management method, device, electronic device and storage medium. Background Art

[0002] With the rapid development of Internet technology, more and more applications (e.g., social applications, distributed financial applications, metaverse applications, game applications, etc.) use blockchain technology. When users use the functions provided by these applications, the applications will store the user data of the application in the blockchain. For example, social applications will store the user's personal information and social information in the blockchain. Therefore, a large amount of user data is deposited on the blockchain.

[0003] In related technologies, some companies collect a large amount of user data to create accurate user profiles when providing users with various services such as communication, social networking, online shopping, information, and entertainment. While providing services to users based on user profiles, they also conduct commercial activities based on user profiles, such as advertising.

[0004] However, in the above process, when commercial activities are conducted based on user portraits, the user's authorization may not be obtained, which may infringe on the user's rights and privacy, resulting in low security of user portraits. Summary of the invention

[0005] The purpose of the embodiments of the present disclosure is to provide a user portrait management method, device, electronic device and storage medium to avoid infringement of user rights and privacy and improve the security of user portraits. The specific technical solution is as follows:

[0006] In a first aspect, in order to achieve the above-mentioned purpose, the present disclosure provides a user portrait management method, the method comprising:

[0007] After receiving a use request for a target user portrait of a target user, extracting a user identifier of the user carried in the use request as a user identifier, and extracting a use summary carried in the use request; wherein the use summary indicates a use scenario in which the user obtains the target user portrait;

[0008] Obtaining the authorization list and authorization summary of the target user for the target user portrait; wherein the authorization list includes the user identifiers of each user authorized by the target user to use the target user portrait; and the authorization summary indicates the usage scenario in which the target user authorizes the use of the target user portrait;

[0009] Based on the user identification, the usage summary, the authorization list and the authorization summary, determining whether the user has the right to use the target user portrait;

[0010] If the user does not have the right to use the target user portrait, sending an alarm message to the electronic device used by the target user to remind the target user of the user's request to use the target user portrait;

[0011] If the user has the right to use the target user portrait, the target user portrait is sent to an electronic device used by the user.

[0012] In some embodiments, judging whether the user has the right to use the target user portrait based on the user identifier, the usage summary, the authorization list, and the authorization summary includes:

[0013] Determining whether the authorization list contains the user identifier;

[0014] If the user identifier is not included in the authorization list, it is determined that the user does not have the right to use the target user portrait;

[0015] If the user ID is included in the authorization list, calculate the difference between the usage summary and the authorization summary; if the difference is greater than a preset threshold, determine that the user does not have the right to use the target user portrait; if the difference is not greater than the preset threshold, determine that the user has the right to use the target user portrait.

[0016] In some embodiments, calculating the difference between the usage summary and the authorization summary includes:

[0017] Extracting continuous character strings of a first preset length from the usage summary to obtain the character strings contained in the usage summary;

[0018] For each extracted character string, if the authorization summary includes a character string that is identical to the character string, determining that the matching degree corresponding to the character string is a first value;

[0019] If the authorization summary does not contain a string identical to the string, extract a continuous string of a second preset length from the string to obtain each substring contained in the string; for each substring contained in the string, if the authorization summary does not contain a string identical to the substring, determine that the matching degree corresponding to the substring is a second value; if the authorization summary contains a string identical to the substring, calculate the matching degree corresponding to the substring based on the number of characters contained in the substring, the number of characters contained in the string, the number of characters contained in the authorization summary, and the number of occurrences of the string identical to the substring in the authorization summary; calculate the sum of the matching degrees corresponding to the substrings contained in the string, and calculate the ratio of the sum to the number of substrings contained in the string to obtain the matching degree corresponding to the string;

[0020] Based on the matching degree corresponding to each character string included in the usage summary and the number of character strings included in the usage summary, a difference value between the usage summary and the authorization summary is calculated.

[0021] In some embodiments, after receiving a use request for a target user portrait of a target user, extracting a user identifier of a user carried in the use request as a user identifier, and before extracting a use summary carried in the use request, the method further includes:

[0022] Based on the user information of the target user, determine a portrait dimension corresponding to the target user as a target portrait dimension;

[0023] Based on the user data of the target user in the target portrait dimension, generating a user portrait of the target user in the target portrait dimension as an initial user portrait;

[0024] Based on the initial user portrait, a final user portrait of the target user is generated as the target user portrait.

[0025] In some embodiments, generating a final user portrait of the target user based on the initial user portrait as the target user portrait includes:

[0026] Calculate the time weight of the initial user portrait based on the duration of the target time period corresponding to the user data of the target user and the duration between the first time the target user has a user behavior and the last time the target user has a user behavior within the target time period;

[0027] The calculated time weight and the initial user portrait are determined as the final user portrait of the target user, which serves as the target user portrait.

[0028] In some embodiments, the calculating the time weight of the initial user portrait based on the duration of the target time period corresponding to the user data of the target user and the duration between the first time when the target user has a user behavior and the last time when the target user has a user behavior within the target time period includes:

[0029] Determining whether a user portrait of the target user in the target portrait dimension has been generated before generating the initial portrait;

[0030] If a user profile of the target user in the target profile dimension has not been generated before the initial profile is generated, the time weight of the initial user profile is calculated based on the duration of the target time period corresponding to the user data of the target user and the duration between the first time the target user has a user behavior and the last time the target user has a user behavior within the target time period;

[0031] If a user portrait of the target user in the target portrait dimension has been generated before generating the initial portrait, obtain the time weights of the generated user portraits of the target user in the target portrait dimension; determine the time weights at the inflection points in the changing trend of the time weights of the user portraits according to the chronological order of the generation time of the user portraits, as the target time weight; calculate the time weight of the initial user portrait based on the target time weight, the number of time weights of the user portraits, the length of the target time period corresponding to the user data of the target user, and the length of time between the first time the target user has a user behavior and the last time the target user has a user behavior within the target time period.

[0032] In some embodiments, the calculating the time weight of the initial user portrait based on the target time weight, the number of time weights of each user portrait, the duration of the target time period corresponding to the user data of the target user, and the duration between the first time when the target user has a user behavior and the last time when the target user has a user behavior within the target time period includes:

[0033] Calculate a reference time weight based on the duration of a target time period corresponding to the user data of the target user, the duration between the first time the target user has a user behavior and the last time the target user has a user behavior within the target time period, and the time weight of the first user portrait among the user portraits in the order of the generation time of the user portraits;

[0034] If the reference time weight is not less than a third value, and according to the chronological order of the generation times of the user portraits, the time weight from the first user portrait among the user portraits to the target time weight is an upward trend, the time weight of the initial user portrait is calculated based on the length of the target time period corresponding to the user data of the target user, the length of time between the first time when the target user has a user behavior and the last time when the target user has a user behavior within the target time period, the number of the user portraits, and the number of time weights from the time weight of the first user portrait among the user portraits to the target time weight according to the chronological order of the generation times of the user portraits;

[0035] If the reference time weight is not less than the third value, and in the order of the generation time of the user portraits, the time weight from the first user portrait among the user portraits to the target time weight is in a downward trend, the time weight of the initial user portrait is calculated based on the time length between the moment when the target user first has a user behavior and the moment when the target user has last had a user behavior within the target time period, the length of the target time period corresponding to the user data of the target user, and the difference with the largest absolute value among the differences between two adjacent time weights among the time weights of the user portraits;

[0036] If the reference time weight is less than the third value, and according to the chronological order of the generation times of the user portraits, the time weight from the first user portrait among the user portraits to the target time weight is in a downward trend, the time weight of the initial user portrait is calculated based on the duration of the target time period corresponding to the user data of the target user, the duration between the moment when the target user first has a user behavior and the moment when the target user has a last user behavior within the target time period, the number of the user portraits, and the number of time weights from the time weight of the first user portrait among the user portraits to the target time weight according to the chronological order of the generation times of the user portraits;

[0037] If the reference time weight is less than the third value, and there is an upward trend from the time weight of the first user portrait among the user portraits to the target time weight in the order of the generation time of the user portraits, the time weight of the initial user portrait is calculated based on the duration between the first and last user behaviors of the target user within the target time period, the duration of the target time period corresponding to the user data of the target user, and the difference with the largest absolute value among the differences between two adjacent time weights in the time weights of the user portraits.

[0038] In some embodiments, after generating a final user portrait of the target user based on the initial user portrait as the target user portrait, the method further includes:

[0039] Generate the DID of the target user as the target DID according to a preset decentralized identity identifier DID generation rule and the user information of the target user;

[0040] Generate a user identifier of the target user as the target user identifier based on the generation time of the designated user portrait of the target user, the number of the target user and the target DID;

[0041] The target user identifier and the target user portrait are recorded accordingly.

[0042] In some embodiments, the generating the user identifier of the target user as the target user identifier based on the generation time of the designated user portrait of the target user, the number of the target user and the target DID includes:

[0043] Performing hash processing on the generation time of the designated user portrait of the target user to obtain a hash value of the generation time of the designated user portrait, and performing hash processing on the target user number to obtain a hash value of the target user number;

[0044] Concatenate the hash value of the generation time of the designated user portrait and the hash value of the target user's ID to obtain a hash value string;

[0045] Based on the hash value string and the target DID, a user identifier of the target user is generated as the target user identifier.

[0046] In some embodiments, generating the user identification of the target user as the target user identification based on the hash value string and the target DID includes:

[0047] If the number of characters included in the hash value string is not greater than the number of characters included in the target DID, for each character in the hash value string, determine the position of the character in the hash value string according to the order of the characters included in the hash value string from high to low; determine the character in the target DID that has the same position as the character according to the order of the characters included in the target DID from high to low, and obtain the character corresponding to the character in the target DID; calculate the remainder of the character and the character corresponding to the character in the target DID, and obtain the user ID of the target user as the target user ID;

[0048] If the number of characters included in the hash value string is greater than the number of characters included in the target DID, determine the character that exists in the corresponding position in the target DID as the first character according to the order of arrangement of the characters included in the hash value string from high to low, and determine the other characters in the hash value string except the first character as the second character; for each character in the target DID, count the number of occurrences of the character; for each first character, determine the position of the first character in the hash value string according to the order of arrangement of the characters included in the hash value string from high to low; determine the character in the target DID at the same position as the first character according to the order of arrangement of the characters included in the target DID from high to low, and obtain the character corresponding to the first character in the target DID; calculating the remainder between the first character and the character corresponding to the target DID as the first remainder; for each second character, determining the position of the second character in the hash value string according to the arrangement order of the characters contained in the hash value string from low to high; determining the character at the same position as the second character in the corresponding sorting result according to the arrangement order of the number of occurrences of the characters contained in the target DID from high to low, and obtaining the character corresponding to the second character in the target DID; calculating the remainder between the second character and the character corresponding to the target DID to obtain the second remainder; generating a user identification of the target user including the first remainder and the second remainder as the target user identification.

[0049] In some embodiments, the corresponding recording of the target user identifier and the target user portrait includes:

[0050] Determine whether the corresponding relationship between the user identifier stored in the portrait node and the user node contains the target user identifier; wherein the portrait node is the head node of the preset user blockchain; the user node is the non-head node of the user blockchain; a user node is used to store the user information of the corresponding user;

[0051] If the target user identifier is included in the corresponding relationship, determine the user node corresponding to the target user identifier, and obtain the user node of the target user; create a new linked list node after the last linked list node of the portrait blockchain with the user node of the target user as the head node, and store the target user portrait in the newly created linked list node;

[0052] If the target user identifier is not included in the corresponding relationship, a new user node is created after the last user node of the user blockchain as the user node of the target user, and the target user identifier and the user node of the target user are recorded correspondingly in the corresponding relationship; a new portrait blockchain is created with the user node of the target user as the head node; wherein the newly created portrait blockchain includes a newly created linked list node in addition to the head node; and the target user portrait is stored in the newly created linked list node.

[0053] In some embodiments, storing the target user portrait in the newly created linked list node includes:

[0054] Generate a two-dimensional array including the target user portrait and the generation time of the target user portrait, and store the two-dimensional array in the newly created linked list node.

[0055] In some embodiments, before sending the target user portrait to the electronic device used by the user, the method further includes:

[0056] In the correspondence between the user identifier and the user node recorded in the portrait node, determine the user node corresponding to the target user identifier, and obtain the user node of the target user;

[0057] In the correspondence between the user portrait recorded in the user node of the target user and the linked list node, determining the linked list node corresponding to the target user portrait;

[0058] The target user portrait is obtained from the determined linked list node.

[0059] In a second aspect, in order to achieve the above-mentioned purpose, the embodiment of the present disclosure provides a user portrait management device, the device comprising:

[0060] an extraction module, configured to, after receiving a use request for a target user portrait of a target user, extract a user identifier of a user carried in the use request as a user identifier, and extract a use summary carried in the use request; wherein the use summary indicates a use scenario in which the user obtains the target user portrait;

[0061] An acquisition module, used to acquire an authorization list and an authorization summary of the target user for the target user portrait; wherein the authorization list includes the user identifiers of each user authorized by the target user to use the target user portrait; and the authorization summary indicates a usage scenario in which the target user authorizes the use of the target user portrait;

[0062] A usage right judgment module, used to judge whether the user has the right to use the target user portrait based on the user identification, the usage summary, the authorization list and the authorization summary;

[0063] an alarm message sending module, configured to send an alarm message to an electronic device used by the target user if the user does not have the right to use the target user portrait, so as to remind the target user of the user's request to use the target user portrait;

[0064] The user portrait sending module is used to send the target user portrait to the electronic device used by the user if the user has the right to use the target user portrait.

[0065] In some embodiments, the usage right determination module is specifically used to determine whether the authorization list contains the user identifier;

[0066] If the user identifier is not included in the authorization list, it is determined that the user does not have the right to use the target user portrait;

[0067] If the user ID is included in the authorization list, calculate the difference between the usage summary and the authorization summary; if the difference is greater than a preset threshold, determine that the user does not have the right to use the target user portrait; if the difference is not greater than the preset threshold, determine that the user has the right to use the target user portrait.

[0068] In some embodiments, the usage right determination module is specifically used to extract continuous character strings of a first preset length from the usage summary to obtain the character strings contained in the usage summary;

[0069] For each extracted character string, if the authorization summary includes a character string that is identical to the character string, determining that the matching degree corresponding to the character string is a first value;

[0070] If the authorization summary does not contain a string identical to the string, extract a continuous string of a second preset length from the string to obtain each substring contained in the string; for each substring contained in the string, if the authorization summary does not contain a string identical to the substring, determine that the matching degree corresponding to the substring is a second value; if the authorization summary contains a string identical to the substring, calculate the matching degree corresponding to the substring based on the number of characters contained in the substring, the number of characters contained in the string, the number of characters contained in the authorization summary, and the number of occurrences of the string identical to the substring in the authorization summary; calculate the sum of the matching degrees corresponding to the substrings contained in the string, and calculate the ratio of the sum to the number of substrings contained in the string to obtain the matching degree corresponding to the string;

[0071] Based on the matching degree corresponding to each character string included in the usage summary and the number of character strings included in the usage summary, a difference value between the usage summary and the authorization summary is calculated.

[0072] In some embodiments, the apparatus further comprises:

[0073] a portrait dimension determination module, configured to, after the extraction module receives a use request for a target user portrait of a target user, extract the user identifier of the user carried in the use request as the user identifier, and before extracting the use summary carried in the use request, determine the portrait dimension corresponding to the target user based on the user information of the target user as the target portrait dimension;

[0074] An initial user portrait generating module, configured to generate a user portrait of the target user in the target portrait dimension based on the user data of the target user in the target portrait dimension as the initial user portrait;

[0075] The target user portrait generation module is used to generate a final user portrait of the target user based on the initial user portrait as the target user portrait.

[0076] In some embodiments, the target user portrait generation module is specifically used to calculate the time weight of the initial user portrait based on the duration of the target time period corresponding to the user data of the target user and the duration between the first time when the target user has a user behavior and the last time when the target user has a user behavior within the target time period;

[0077] The calculated time weight and the initial user portrait are determined as the final user portrait of the target user, which serves as the target user portrait.

[0078] In some embodiments, the target user portrait generation module is specifically used to determine whether a user portrait of the target user in the target portrait dimension has been generated before generating the initial portrait;

[0079] If a user profile of the target user in the target profile dimension has not been generated before the initial profile is generated, the time weight of the initial user profile is calculated based on the duration of the target time period corresponding to the user data of the target user and the duration between the first time the target user has a user behavior and the last time the target user has a user behavior within the target time period;

[0080] If a user portrait of the target user in the target portrait dimension has been generated before generating the initial portrait, obtain the time weights of the generated user portraits of the target user in the target portrait dimension; determine the time weights at the inflection points in the changing trend of the time weights of the user portraits according to the chronological order of the generation time of the user portraits, as the target time weight; calculate the time weight of the initial user portrait based on the target time weight, the number of time weights of the user portraits, the length of the target time period corresponding to the user data of the target user, and the length of time between the first time the target user has a user behavior and the last time the target user has a user behavior within the target time period.

[0081] In some embodiments, the target user portrait generation module is specifically used to calculate the reference time weight based on the duration of the target time period corresponding to the user data of the target user, the duration between the first time when the target user has a user behavior and the last time when the target user has a user behavior within the target time period, and the time weight of the first user portrait among the user portraits according to the order of generation time of the user portraits;

[0082] If the reference time weight is not less than a third value, and according to the chronological order of the generation times of the user portraits, the time weight from the first user portrait among the user portraits to the target time weight is an upward trend, the time weight of the initial user portrait is calculated based on the length of the target time period corresponding to the user data of the target user, the length of time between the first time when the target user has a user behavior and the last time when the target user has a user behavior within the target time period, the number of the user portraits, and the number of time weights from the time weight of the first user portrait among the user portraits to the target time weight according to the chronological order of the generation times of the user portraits;

[0083] If the reference time weight is not less than the third value, and in the order of the generation time of the user portraits, the time weight from the first user portrait among the user portraits to the target time weight is in a downward trend, the time weight of the initial user portrait is calculated based on the time length between the moment when the target user first has a user behavior and the moment when the target user has last had a user behavior within the target time period, the length of the target time period corresponding to the user data of the target user, and the difference with the largest absolute value among the differences between two adjacent time weights among the time weights of the user portraits;

[0084] If the reference time weight is less than the third value, and according to the chronological order of the generation times of the user portraits, the time weight from the first user portrait among the user portraits to the target time weight is in a downward trend, the time weight of the initial user portrait is calculated based on the duration of the target time period corresponding to the user data of the target user, the duration between the moment when the target user first has a user behavior and the moment when the target user has a last user behavior within the target time period, the number of the user portraits, and the number of time weights from the time weight of the first user portrait among the user portraits to the target time weight according to the chronological order of the generation times of the user portraits;

[0085] If the reference time weight is less than the third value, and there is an upward trend from the time weight of the first user portrait among the user portraits to the target time weight in the order of the generation time of the user portraits, the time weight of the initial user portrait is calculated based on the duration between the first and last user behaviors of the target user within the target time period, the duration of the target time period corresponding to the user data of the target user, and the difference with the largest absolute value among the differences between two adjacent time weights in the time weights of the user portraits.

[0086] In some embodiments, the apparatus further comprises:

[0087] A DID generation module is used to generate a final user portrait of the target user based on the initial user portrait in the target user portrait generation module, and then generate a DID of the target user as a target DID according to a preset decentralized identity identifier DID generation rule and the user information of the target user;

[0088] A user identification generation module, configured to generate a user identification of the target user as a target user identification based on the generation time of the designated user portrait of the target user, the number of the target user and the target DID;

[0089] The recording module is used to record the target user identifier and the target user portrait accordingly.

[0090] In some embodiments, the user identification generation module is specifically used to perform hash processing on the generation time of the designated user portrait of the target user to obtain the hash value of the generation time of the designated user portrait, and to perform hash processing on the number of the target user to obtain the hash value of the number of the target user;

[0091] Concatenate the hash value of the generation time of the designated user portrait and the hash value of the target user's ID to obtain a hash value string;

[0092] Based on the hash value string and the target DID, a user identifier of the target user is generated as the target user identifier.

[0093] In some embodiments, the user identification generation module is specifically used to, if the number of characters included in the hash value string is not greater than the number of characters included in the target DID, determine, for each character in the hash value string, the position of the character in the hash value string according to the arrangement order of the characters included in the hash value string from high to low; determine, according to the arrangement order of the characters included in the target DID from high to low, the character in the target DID that is at the same position as the character, and obtain the character corresponding to the character in the target DID; calculate the remainder of the character and the character corresponding to the character in the target DID, and obtain the user identification of the target user as the target user identification;

[0094] If the number of characters included in the hash value string is greater than the number of characters included in the target DID, determine the character that exists in the corresponding position in the target DID as the first character according to the order of arrangement of the characters included in the hash value string from high to low, and determine the other characters in the hash value string except the first character as the second character; for each character in the target DID, count the number of occurrences of the character; for each first character, determine the position of the first character in the hash value string according to the order of arrangement of the characters included in the hash value string from high to low; determine the character in the target DID at the same position as the first character according to the order of arrangement of the characters included in the target DID from high to low, and obtain the character corresponding to the first character in the target DID; calculating the remainder between the first character and the character corresponding to the target DID as the first remainder; for each second character, determining the position of the second character in the hash value string according to the arrangement order of the characters contained in the hash value string from low to high; determining the character at the same position as the second character in the corresponding sorting result according to the arrangement order of the number of occurrences of the characters contained in the target DID from high to low, and obtaining the character corresponding to the second character in the target DID; calculating the remainder between the second character and the character corresponding to the target DID to obtain the second remainder; generating a user identification of the target user including the first remainder and the second remainder as the target user identification.

[0095] In some embodiments, the recording module is specifically used to determine whether the corresponding relationship between the user identifier stored in the portrait node and the user node contains the target user identifier; wherein the portrait node is the head node of the preset user blockchain; the user node is the non-head node of the user blockchain; a user node is used to store the user information of the corresponding user;

[0096] If the target user identifier is included in the corresponding relationship, determine the user node corresponding to the target user identifier, and obtain the user node of the target user; create a new linked list node after the last linked list node of the portrait blockchain with the user node of the target user as the head node, and store the target user portrait in the newly created linked list node;

[0097] If the target user identifier is not included in the corresponding relationship, a new user node is created after the last user node of the user blockchain as the user node of the target user, and the target user identifier and the user node of the target user are recorded correspondingly in the corresponding relationship; a new portrait blockchain is created with the user node of the target user as the head node; wherein the newly created portrait blockchain includes a newly created linked list node in addition to the head node; and the target user portrait is stored in the newly created linked list node.

[0098] In some embodiments, the recording module is specifically used to generate a two-dimensional array including the target user portrait and the generation time of the target user portrait, and store the two-dimensional array in the newly created linked list node.

[0099] In some embodiments, the apparatus further comprises:

[0100] A user node determination module is used to determine the user node corresponding to the target user identifier in the correspondence between the user identifier and the user node recorded in the portrait node, and obtain the user node of the target user, before the user portrait sending module executes sending the target user portrait to the electronic device used by the user;

[0101] A linked list node determination module, used to determine the linked list node corresponding to the target user portrait in the correspondence between the user portrait recorded in the user node of the target user and the linked list nodes;

[0102] The user portrait acquisition module is used to acquire the target user portrait from the determined linked list node.

[0103] The embodiment of the present disclosure also provides an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;

[0104] Memory, used to store computer programs;

[0105] The processor is used to implement any of the above-mentioned steps of the user portrait management method when executing the program stored in the memory.

[0106] The embodiment of the present disclosure also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, any of the steps of the user portrait management method described above is implemented.

[0107] The embodiments of the present disclosure also provide a computer program product including instructions, which, when executed on a computer, enables the computer to execute any of the user portrait management methods described above.

[0108] A user portrait management method provided by an embodiment of the present disclosure comprises the following steps: after receiving a use request for a target user portrait of a target user, extracting a user identifier of a user carried in the use request as the user identifier, and extracting a use summary carried in the use request; the use summary indicates a use scenario in which the user obtains the target user portrait; obtaining an authorization list and an authorization summary of the target user for the target user portrait; the authorization list includes the user identifiers of each user authorized by the target user to use the target user portrait; the authorization summary indicates a use scenario in which the target user authorizes the target user to use the target user portrait; judging whether the user has the right to use the target user portrait based on the user identifier, the use summary, the authorization list and the authorization summary; if the user does not have the right to use the target user portrait, sending an alarm message to an electronic device used by the target user to remind the target user of the user's request to use the target user portrait; and if the user has the right to use the target user portrait, sending the target user portrait to the electronic device used by the user.

[0109] Based on the above processing, it can be determined whether the user has the right to use the target user portrait. If the user does not have the right to use the target user portrait, an alarm message is sent to the electronic device used by the target user to remind the target user of the user's request to use the target user portrait. If the user has the right to use the target user portrait, the target user portrait is sent to the electronic device used by the user. This can avoid the use of the user portrait without the user's perception, thereby avoiding infringement of the user's rights and privacy and improving the security of the user portrait.

[0110] Of course, it is not necessary to achieve all the advantages described above at the same time to implement any product or method of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0111] In order to more clearly illustrate the embodiments of the present disclosure 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, the drawings in the following description are only some embodiments of the present disclosure, and for ordinary technicians in this field, other embodiments can also be obtained based on these drawings.

[0112] Figure 1 A flowchart of a user portrait management method provided in an embodiment of the present disclosure;

[0113] Figure 2 A flowchart of another user portrait management method provided by an embodiment of the present disclosure;

[0114] Figure 3 A flowchart of another user portrait management method provided by an embodiment of the present disclosure;

[0115] Figure 4 A flowchart of another user portrait management method provided by an embodiment of the present disclosure;

[0116] Figure 5a A schematic diagram of the principle of generating a user portrait provided by an embodiment of the present disclosure;

[0117] Figure 5b A schematic diagram of a user portrait provided in an embodiment of the present disclosure;

[0118] Figure 6 A flowchart of another user portrait management method provided by an embodiment of the present disclosure;

[0119] Figure 7 A flowchart of another user portrait management method provided by an embodiment of the present disclosure;

[0120] Figure 8 A flowchart of another user portrait management method provided by an embodiment of the present disclosure;

[0121] Fig. 9 A flowchart of another user portrait management method provided by an embodiment of the present disclosure;

[0122] Fig.10 A flowchart of another user portrait management method provided by an embodiment of the present disclosure;

[0123] Fig.11 A flowchart of another user portrait management method provided by an embodiment of the present disclosure;

[0124] Fig.12 A schematic diagram of the structure of a blockchain provided in an embodiment of the present disclosure;

[0125] Fig.13 A flowchart of another user portrait management method provided by an embodiment of the present disclosure;

[0126] Fig.14 A flowchart of another user portrait management method provided by an embodiment of the present disclosure;

[0127] Fig.15 A flowchart of another user portrait management method provided by an embodiment of the present disclosure;

[0128] Fig.16 A flowchart of another user portrait management method provided by an embodiment of the present disclosure;

[0129] Fig.17 A structural diagram of a user portrait management device provided in an embodiment of the present disclosure;

[0130] Fig.18 A structural diagram of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0131] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field based on the present disclosure belong to the scope of protection of the present disclosure.

[0132] In related technologies, some companies collect a large amount of user data to create accurate user profiles when providing users with various services such as communication, social networking, online shopping, information, and entertainment. While providing services to users based on user profiles, they also conduct commercial activities based on user profiles, such as advertising. However, in the above process, when conducting commercial activities based on user profiles, the user's authorization may not be obtained, which will infringe on the user's rights and privacy, resulting in low security of user profiles.

[0133] To solve the above problems, see Figure 1 , Figure 1 A flowchart of a user portrait management method provided in an embodiment of the present disclosure, the method is applied to an electronic device, and the method may include the following steps:

[0134] S101: After receiving a use request for a target user portrait of a target user, extract a user identifier of the user carried in the use request as a user identifier, and extract a use summary carried in the use request.

[0135] The usage summary indicates the usage scenario in which the user obtains the target user portrait.

[0136] S102: Obtain the authorization list and authorization summary of the target user for the target user portrait.

[0137] The authorization list includes the user IDs of each user authorized by the target user to use the target user portrait; the authorization summary indicates the usage scenarios in which the target user authorizes the use of the target user portrait.

[0138] S103: Based on the user identification, usage summary, authorization list and authorization summary, determine whether the user has the right to use the target user portrait. If not, execute step S104; if yes, execute step S105.

[0139] S104: Sending an alarm message to the electronic device used by the target user to remind the target user of the user's request usage behavior for the target user's portrait.

[0140] S105: Sending the target user portrait to the electronic device used by the user.

[0141] Based on the user portrait management method provided by the embodiment of the present disclosure, it is possible to determine whether the user has the right to use the target user portrait. If the user does not have the right to use the target user portrait, an alarm message is sent to the electronic device used by the target user to remind the target user of the user's request to use the target user portrait. If the user has the right to use the target user portrait, the target user portrait is sent to the electronic device used by the user, thereby avoiding the use of the user portrait without the user's perception, thereby avoiding infringement of the user's rights and privacy, and improving the security of the user portrait.

[0142] For step S101, the target user is any user whose user portrait is recorded in the electronic device, and the target user may be an individual user. The target user portrait is the user portrait of the target user in any portrait dimension, and the portrait dimension represents the category of the application in which the user has a user behavior. For example, the portrait dimension may include: financial dimension, social dimension, collection dimension, metaverse dimension, and game dimension, etc.

[0143] The user is any user who currently requests to use the target user portrait. The user can be an enterprise user. For example, a financial enterprise requests the user portrait of the target user in the financial dimension to provide targeted financial services to the user based on the obtained user portrait, or a game enterprise requests the user portrait of the target user in the game dimension to provide targeted game services to the user based on the obtained user portrait.

[0144] The user sends a use request for the target user portrait of the target user to the electronic device, and the use request carries the user ID (i.e., user ID) and use summary of the user, as well as the user ID of the target user (i.e., target user ID in subsequent embodiments). The user ID of a user can be the name of the user, the number assigned to the user, and the user ID generated based on the DID of the user.

[0145] After receiving the use request, the electronic device extracts the user identification, use summary and target user identification carried in the use request. The use summary indicates the use scenario in which the user obtains the target user portrait, for example, obtaining the target user portrait to provide financial services to the user.

[0146] With respect to step S102, when generating the user's user portrait, the electronic device prompts the user to authorize other users to use the user's user portrait, and obtains the user's authorization list. The electronic device may also prompt the user to clarify the usage scenario of the user portrait, and obtain the user's authorization summary. For example, it may be clarified that the user portrait is only used for user habit analysis, or that the user portrait is used for all analyses, etc. Then, the electronic device locally records the user's user portrait's authorization list and authorization summary.

[0147] The electronic device obtains the authorization list and authorization summary for the target user portrait corresponding to the target user identification recorded locally, and obtains the authorization list and authorization summary of the target user portrait.

[0148] With respect to step S103 , the electronic device may determine whether the user has the right to use the target user portrait based on the following method.

[0149] Method 1:

[0150] The electronic device determines whether the authorization list of the target user portrait contains the user identification. If the authorization list of the target user portrait does not contain the user identification, it is determined that the user does not have the right to use the target user portrait. If the authorization list of the target user portrait contains the user identification, it is determined whether the usage summary is the same as the authorization summary. If the usage summary is the same as the authorization summary, it is determined that the user has the right to use the target user portrait. If the usage summary is different from the authorization summary, it is determined that the user does not have the right to use the target user portrait.

[0151] Method 2:

[0152] The electronic device (which may be referred to as the first electronic device) sends an inquiry message for the target user's portrait to the electronic device (which may be referred to as the second electronic device) used by the target user, and the inquiry message carries the user identification and the usage summary. The inquiry message may also carry the authorization list and the authorization summary, etc. The second electronic device may be a terminal, a server, etc.

[0153] The target user determines whether to authorize the user to use the target user portrait based on the user identification and usage summary carried in the inquiry message. If the target user determines to authorize the user to use the target user portrait, the target user inputs a confirmation authorization instruction to the second electronic device, and when the second electronic device receives the confirmation authorization instruction, it sends a confirmation authorization message to the first electronic device. When the first electronic device receives the confirmation authorization message, it determines that the user has the right to use the target user portrait.

[0154] If the target user determines not to authorize the user to use the target user portrait, the target user may not take any action. If the first electronic device does not receive the confirmation authorization message within the preset time period, it is determined that the user does not have the right to use the target user portrait. Alternatively, if the target user determines to authorize the user to use the target user portrait, the target user inputs a cancellation authorization instruction to the second electronic device, and when the second electronic device receives the cancellation authorization instruction, it sends a cancellation authorization message to the first electronic device. When the first electronic device receives the cancellation authorization message, it is determined that the user does not have the right to use the target user portrait.

[0155] Method three:

[0156] exist Figure 1 Based on Figure 2 , step S103 may include the following steps:

[0157] S1031: Determine whether the authorization list contains the user identification, if not, execute step S1032, if yes, execute step S1033.

[0158] S1032: Determine that the user does not have the right to use the target user portrait.

[0159] S1033: Calculate the difference between the usage summary and the authorization summary.

[0160] S1034: If the difference value is greater than a preset threshold, it is determined that the user does not have the right to use the target user portrait.

[0161] S1035: If the difference value is not greater than the preset threshold, it is determined that the user has the right to use the target user portrait.

[0162] In order to more accurately determine whether the user has the right to use the target user portrait, when it is determined that the authorization list of the target user portrait contains the user identification, the electronic device calculates the difference value between the usage summary and the authorization summary. For example, the electronic device can perform word segmentation on the usage summary, and generate a feature vector of the usage summary based on the word segmentation result of the usage summary. The electronic device can also perform word segmentation on the authorization summary, and generate a feature vector of the authorization summary based on the word segmentation result of the authorization summary. Then, the electronic device calculates the similarity between the feature vector of the usage summary and the feature vector of the authorization summary, and calculates the difference between 1 and the similarity to obtain the difference value between the usage summary and the authorization summary.

[0163] When the calculated difference value is greater than the preset threshold, it is determined that the user does not have the right to use the target user portrait; when the calculated difference value is not greater than the preset threshold, it is determined that the user has the right to use the target user portrait.

[0164] The preset threshold may be set by a technician based on experience, for example, the preset threshold may be 0.6, or the preset threshold may also be 0.5, but is not limited thereto. Alternatively, the preset threshold may also be learned based on sample data.

[0165] In some embodiments, Figure 2 Based on Figure 3 , step S1033 may include the following steps:

[0166] S10331: Extracting continuous character strings of a first preset length from the usage summary to obtain the character strings included in the usage summary.

[0167] S10332: For each extracted character string, if the authorization summary contains a character string that is identical to the character string, determine that the matching degree corresponding to the character string is a first value.

[0168] S10333: If the authorization summary does not contain a character string identical to the character string, extract a continuous character string of a second preset length from the character string to obtain each substring contained in the character string.

[0169] S10334: For each substring contained in the string, if the authorization summary does not contain a string identical to the substring, determine that the matching degree corresponding to the substring is a second value.

[0170] S10335: If the authorization summary contains a character string that is identical to the substring, calculate the degree of match corresponding to the substring based on the number of characters contained in the substring, the number of characters contained in the character string, the number of characters contained in the authorization summary, and the number of times the character string that is identical to the substring appears in the authorization summary.

[0171] S10336: Calculate the sum of the matching degrees corresponding to the substrings contained in the string, and calculate the ratio of the sum to the number of substrings contained in the string to obtain the matching degree corresponding to the string.

[0172] S10337: Calculate the difference value between the usage summary and the authorization summary based on the matching degree corresponding to each character string included in the usage summary and the number of character strings included in the usage summary.

[0173] The electronic device can extract the character string based on the usage summary of N-gram. N-gram is a method of extracting a sequence of N items from a given text in the NLP (Natural Language Processing) algorithm. The item can be a letter or a word, etc. When N=1, it is called a unigram; when N=2, it is called a bigram; when N=3, it is called a trigram, and so on. N is the first preset length in the embodiment of the present disclosure.

[0174] Taking trigram (i.e., N=3) as an example, the electronic device starts from the first character in the usage summary, extracts the 1st to 3rd characters to obtain a string, extracts the 2nd to 4th characters to obtain a string, extracts the 3rd to 6th characters to obtain a string, and so on, until the n-2th to nth characters are extracted to obtain a string, thereby obtaining multiple strings contained in the usage summary. n represents the number of characters contained in the usage summary.

[0175] For each character string included in the usage summary, it is determined whether the authorization summary includes a character string identical to the character string. If the authorization summary includes a character string identical to the character string, the electronic device determines that the matching degree corresponding to the character string is a first value, which may be 1.

[0176] When the authorization summary does not contain a string identical to the string, the electronic device extracts a continuous string of a second preset length from the string to obtain each substring contained in the string. The second preset length is smaller than the first preset length.

[0177] Exemplarily, the string is abc, and the second preset length is 1, then the substrings contained in the string are: a, b, c; the second preset length is 2, then the substrings contained in the string are ab, bc. It should be noted that ac is not continuous and therefore does not belong to a continuous substring.

[0178] For each substring included in the string, when the authorization summary does not include a string identical to the substring, the electronic device determines the matching degree corresponding to the substring as a second value, which may be a smaller value, for example, the second value is 0.

[0179] When the authorization summary includes a character string identical to the sub-character string, the electronic device calculates the matching degree corresponding to the sub-character string based on the following formula (1).

[0180]

[0181] d represents the matching degree corresponding to the substring; X represents the number of characters contained in the substring; Y represents the number of characters contained in the string; P represents the number of characters contained in the authorization summary; C represents the number of times the string identical to the substring appears in the authorization summary.

[0182] For each character string contained in the usage summary, after calculating the matching degree corresponding to each substring contained in the character string, the electronic device calculates the sum of the matching degrees corresponding to the substrings contained in the character string, and calculates the ratio of the sum to the number of substrings contained in the character string to obtain the matching degree corresponding to the character string.

[0183] Furthermore, after calculating the matching degree corresponding to each character string included in the usage summary, the electronic device calculates the difference value between the usage summary and the authorization summary based on the following formula (2).

[0184]

[0185] b represents the difference between the usage summary and the authorization summary; sum represents the sum function; di Indicates the matching degree corresponding to the i-th string contained in the summary; sumd i It represents the sum of the matching degrees of the strings included in the usage summary; S represents the number of strings included in the usage summary.

[0186] The matching degree corresponding to a substring indicates the degree of difference between the substring and the authorization summary, and the matching degree corresponding to a string indicates the degree of difference between the string and the authorization summary. Accordingly, the difference value between the usage summary and the authorization summary calculated based on the matching degree corresponding to each string can represent: the degree of difference between the usage summary and the authorization summary. The lower the degree of difference between the usage summary and the authorization summary, the lower the degree of difference between the usage scenario of the target user portrait represented by the usage summary and the usage scenario of the target user portrait represented by the authorization summary, that is, the greater the probability that the usage scenario of the target user portrait represented by the usage summary is the usage scenario of the target user portrait represented by the authorization summary, the greater the probability that the user has the right to use the target user portrait.

[0187] Therefore, when the difference between the usage summary and the authorization summary is greater than a preset threshold, the electronic device determines that the user does not have the right to use the target user portrait; when the difference between the usage summary and the authorization summary is not greater than the preset threshold, the electronic device determines that the user has the right to use the target user portrait.

[0188] With respect to step S104 and step S105, in the case where the user does not have the right to use the target user portrait, in order to avoid infringement of the user's rights and privacy and improve the security of the user portrait, the electronic device (i.e., the first electronic device) determines the user information corresponding to the target user identifier, and obtains the user information of the target user to which the target user portrait belongs (which may be referred to as the target user information), and the target user information may include the name of the target user and the IP (Internet Protocol) address of the electronic device (i.e., the second electronic device) used by the target user. Then, the first electronic device sends an alarm message to the second electronic device used by the target user according to the determined IP address to remind the target user of the user's request to use the target user portrait. The alarm message may carry the user identifier, the usage summary, the identifier of the target user portrait, and the identifier indicating that the user does not have the right to use the target user portrait.

[0189] When the user has the right to use the target user portrait, the first electronic device sends the target user portrait to the electronic device used by the user (which may be called a third electronic device), and the third electronic device may be a terminal, a server, etc. When sending the target user portrait to the third electronic device, the first electronic device may also send a reminder message to the second electronic device to remind the target user of the user's use behavior of the target user portrait. The reminder message may carry a user ID, a usage summary, an ID of the target user portrait, and an ID indicating that the user has the right to use the target user portrait.

[0190] Through the above steps, when other users request to use the user profile of the target user, the target user can be informed that his / her user profile is being used based on the user information of the target user, thereby avoiding infringement of the user's rights and privacy.

[0191] In some embodiments, the electronic device may also generate a user portrait of the target user. Figure 1 Based on Figure 4 Before step S101, the method may further include the following steps:

[0192] S106: Based on the user information of the target user, determine the portrait dimension corresponding to the target user as the target portrait dimension.

[0193] S107: Based on the user data of the target user in the target portrait dimension, generate a user portrait of the target user in the target portrait dimension as an initial user portrait.

[0194] S108: Based on the initial user portrait, generate a final user portrait of the target user as the target user portrait.

[0195] The user information of a user includes the basic information of the user, and the basic information of the user includes the name, gender, age and occupation of the user. The electronic device obtains the basic information of the target user and determines the target user category of the target user based on the basic information of the target user. For example, if the basic information of the target user includes: gender: male, age: 40, then the target user category is determined to be: middle-aged male. Alternatively, if the basic information of the target user includes: gender: female, age: 23, then the target user category is determined to be: young female.

[0196] Then, the electronic device obtains the portrait dimension corresponding to the target user category as the target portrait dimension. The portrait dimension corresponding to a user category is determined based on the user data of the users included in the user category.

[0197] For example, the user category is young males, and the users included in this user category include: User 1, User 2, User 3, and User 4. User data of User 1 includes: social related user data; user data of User 2 includes: social related user data and metaverse related user data; user data of User 3 includes: game related user data and social related user data; user data of User 4 includes: game related user data and social related user data.

[0198] The electronic device clusters the user data of the users included in the user category, and obtains the portrait dimensions corresponding to the user data of the users included in the user category, including: social dimension, game dimension, and metaverse dimension. Since there is less metaverse-related user data in the user data of each user, the electronic device determines that the portrait dimensions corresponding to the user category include: social dimension and game dimension.

[0199] Since various applications used by users will store user data in the blockchain, electronic devices can obtain user data of each user from mainstream public chains, which may include: Ethereum, Solana (a mainstream blockchain), BSC (Binance Smart Chain), Polygon (another mainstream blockchain), etc. These mainstream public chains involve distributed financial applications, NFT (Non-Fungible Token) digital collection applications, metaverse applications, etc. Then, the electronic device can store the obtained user data in a preset database in the form of a data wide table. A data wide table refers to a data table that associates indicators, dimensions, and attributes related to a business theme.

[0200] The electronic device obtains user data of the target user in the target portrait dimension from a preset database. The electronic device can process the obtained user data based on the following method to obtain a feature vector (which can be called a first feature vector) of the target user in the target portrait dimension.

[0201] Mode 1: The electronic device encodes the acquired user data according to a preset encoding method to obtain a first feature vector. The preset encoding method may be One-hot encoding or Embedding encoding.

[0202] Method 2: The electronic device calculates the data value of each user data in the target portrait dimension based on the acquired user data. The data value of a user data in a portrait dimension can be the TF-IDF (Term Frequency–Inverse Document Frequency) value of the user data in the portrait dimension. The electronic device generates a feature vector containing the data values ​​of each user data of the target user, and obtains a first feature vector.

[0203] Exemplarily, the user data of the target user is: the financial products purchased by the target user within one month include: product A, product B and product C. The electronic device calculates the TF-IDF value of product A in the user data on the financial dimension to obtain the data value a of product A, and calculates the TF-IDF value of product B in the user data on the financial dimension to obtain the data value b of product B, and calculates the TF-IDF value of product C in the user data on the financial dimension to obtain the data value c of product C. Then, the electronic device determines that the first feature vector is [a, b, c].

[0204] Furthermore, the electronic device generates a user portrait of the target user in the target portrait dimension based on the determined first feature vector and a preset user behavior analysis algorithm to obtain an initial user portrait.

[0205] For example, see Figure 5a , Figure 5a A schematic diagram of the principle of generating a user portrait provided in an embodiment of the present disclosure.

[0206] The preset user behavior analysis algorithms include: supervised learning analysis algorithms, such as regression analysis algorithms, CNN (Convolutional Neural Network) deep learning algorithms, unsupervised learning analysis algorithms, such as clustering analysis algorithms, and adaptive learning analysis algorithms, such as GAN (Generative Adversarial Network) prediction algorithms.

[0207] When the preset user behavior analysis algorithm is a cluster analysis algorithm, the electronic device can obtain the feature vector of each preset user portrait corresponding to the target portrait dimension, and then the electronic device can calculate the similarity between the feature vector of each preset user portrait and the first feature vector, and determine the preset user portrait with a larger calculated similarity as the initial user portrait of the target user in the target portrait dimension.

[0208] When the preset user behavior analysis algorithm is a supervised learning analysis algorithm, the electronic device can input the first feature vector into a pre-trained classification network model (e.g., a CNN model) to obtain the probability that the user portrait of the target user in the target portrait dimension output by the classification network model is each preset user portrait, and then the electronic device can determine that the corresponding preset user portrait with a larger probability is the initial user portrait of the target user in the target portrait dimension. The classification network model is trained based on the sample feature vector of the sample user in the target portrait dimension and the sample portrait of the sample user in the target portrait dimension.

[0209] For example, see Figure 5b , Figure 5b A schematic diagram of a user portrait provided in an embodiment of the present disclosure.

[0210] The user profile of user Alice includes: user profile in the financial dimension, for example, ordinary traders, liquidity providers, market makers, etc.

[0211] User profiles in the social dimension, for example, DAO (Decentralized Autonomous Organization) participants, StepN (an application built on the Solana blockchain) participants, etc.

[0212] User portraits in the collection dimension, for example, owners of Ant Digital products, digital collection diamond hands, etc.

[0213] User portraits in the metaverse dimension, for example, primary analysis of the metaverse, deep participants of Roblox (an application that provides social and gaming services), land builders of Sandbox (a blockchain-based gaming platform), etc.

[0214] User portraits in the gaming dimension, for example, DCL (a blockchain-based gaming application) game masters, GameFi (a blockchain-based gaming application) beginners, etc.

[0215] In one implementation, the electronic device can directly use the generated initial user portrait as the final target user portrait of the target user.

[0216] In another real-time method, since the initial user portrait is generated based on the user data of the user within a period of time, the initial user portrait can only represent the user characteristics of the target user within the time period, and cannot represent the changes in the importance of the user characteristics of the target user in the target portrait dimension over time, that is, the initial user portrait does not have time characteristics.

[0217] In order to generate a target user portrait with time characteristics, accordingly, Figure 4 Based on Figure 6 , step S108 may include the following steps:

[0218] S1081: Calculate the time weight of the initial user portrait based on the duration of the target time period corresponding to the user data of the target user and the duration between the first and last time the target user performed a user behavior within the target time period.

[0219] S1082: Determine the calculated time weight and the initial user portrait as the final user portrait of the target user, as the target user portrait.

[0220] The target time period is: the time period corresponding to the user data obtained when generating the initial user portrait. For example, if the target portrait dimension is the financial dimension, when generating the initial user portrait, the electronic device obtains the financial products purchased by the target user from May 1 to May 31, then the target time period is from May 1 to May 31, and the duration of the target time period is 31 days.

[0221] The target user first purchased a financial product within the target time period on May 10, and the last time he purchased a financial product was on May 15. Therefore, the duration between the first and last time the target user performed a user behavior within the target time period is 5 days.

[0222] The electronic device calculates the time weight of the initial user portrait based on the duration of the target time period corresponding to the user data of the target user (which may be referred to as the first duration) and the duration between the first time when the target user has a user behavior and the last time when the target user has a user behavior within the target time period (which may be referred to as the second duration). For example, the electronic device may directly calculate the ratio of the second duration to the first duration as the time weight of the initial user portrait.

[0223] The time weight of the initial user portrait can represent the importance of user data in the target portrait dimension within the target time period, that is, the importance of the user characteristics of the target user in the target portrait dimension. Furthermore, the time weight of each user portrait of the target user generated at different times can represent: the change in the importance of the user characteristics of the target user in the target portrait dimension over time.

[0224] Then, the electronic device determines the calculated time weight and the initial user portrait as the final target user portrait of the target user.

[0225] In some embodiments, Figure 6 Based on Figure 7 , step S1081 may include the following steps:

[0226] S10811: Determine whether a user portrait of the target user in the target portrait dimension has been generated before generating the initial portrait. If not, execute step S10812; if yes, execute step S10813.

[0227] S10812: Calculate the time weight of the initial user portrait based on the duration of the target time period corresponding to the user data of the target user and the duration between the first and last time the target user performed a user behavior within the target time period.

[0228] S10813: Obtain the time weight of each user portrait of the generated target user in the target portrait dimension.

[0229] S10814: Determine the time weight at the inflection point in the change trend of the time weight of each user portrait according to the chronological order of the generation time of each user portrait, as the target time weight.

[0230] S10815: Calculate the time weight of the initial user portrait based on the target time weight, the number of time weights of each user portrait, the length of the target time period corresponding to the user data of the target user, and the length of time between the first and last time the target user has a user behavior within the target time period.

[0231] The initial user portrait is generated based on the user data of the target user within the target time period. The electronic device determines whether, before generating the initial portrait, the electronic device has generated a user portrait of the target user in the target portrait dimension based on user data within other time periods.

[0232] If a user portrait of the target user in the target portrait dimension has not been generated before the initial portrait is generated, the electronic device calculates the time weight of the initial user portrait based on the duration of the target time period corresponding to the user data of the target user, and the duration between the first time the target user has a user behavior and the last time the target user has a user behavior in the target time period. If a user portrait of the target user in the target portrait dimension has been generated before the initial portrait is generated, the electronic device calculates the time weight of the initial user portrait based on the change trend of the time weights of the generated user portraits of the target user in the target portrait dimension, the duration of the target time period corresponding to the user data of the target user, and the duration between the first time the target user has a user behavior and the last time the target user has a user behavior in the target time period.

[0233] If a user portrait of the target user in the target portrait dimension has been generated before the initial portrait is generated, the electronic device calculates the time weight of the initial user portrait based on the following formula (3).

[0234]

[0235] Q represents the time weight of the initial user portrait; Δt represents the duration between the first and last time the target user performs a user behavior within the target time period; and T represents the duration of the target time period corresponding to the user data of the target user.

[0236] If a user portrait of the target user in the target portrait dimension has not been generated before the initial portrait is generated, the electronic device obtains the time weight of each user portrait of the generated target user in the target portrait dimension. For example, the electronic device can obtain the time weight of a preset number of user portraits closest to the current moment.

[0237] Then, the electronic device sorts the time weights of the user portraits according to the order of their generation time. Further, based on the sorting result, the electronic device determines the time weight at the inflection point in the change trend of the time weight of each user portrait as the target time weight.

[0238] Exemplarily, the electronic device sorts the time weights of the user portraits according to the order of their generation time, and the sorting result is: q1, q2, q3, q4. If q1 is greater than or equal to q2, q2 is greater than or equal to q3, but q3 is less than q4, then q3 is the target time weight (which can be recorded as qe) at the inflection point in the change trend of the time weights of the user portraits.

[0239] Furthermore, the electronic device calculates the time weight of the initial user portrait based on the target time weight, the number of time weights of each user portrait, the length of the target time period corresponding to the user data of the target user, and the length of time between the first and last time the target user has a user behavior within the target time period.

[0240] In some embodiments, step S10815 may include the following steps:

[0241] Step 1, calculate the reference time weight based on the duration of the target time period corresponding to the user data of the target user, the duration between the first and last user behaviors of the target user within the target time period, and the time weight of the first user portrait in each user portrait according to the order of generation time of each user portrait.

[0242] Step 2: If the reference time weight is not less than the third value, and there is an upward trend from the time weight of the first user portrait in each user portrait to the target time weight in the order of generation time of each user portrait, the time weight of the initial user portrait is calculated based on the length of the target time period corresponding to the user data of the target user, the length of time between the first and last user behaviors of the target user within the target time period, the number of user portraits, and the number of time weights from the time weight of the first user portrait in each user portrait to the target time weight in the order of generation time of each user portrait.

[0243] Step 3: If the reference time weight is not less than the third value, and the time weight of the first user portrait in each user portrait to the target time weight is in a downward trend in the order of the generation time of each user portrait, the time weight of the initial user portrait is calculated based on the duration between the first and last user behaviors of the target user in the target time period, the duration of the target time period corresponding to the user data of the target user, and the difference with the largest absolute value among the differences between two adjacent time weights in the time weights of each user portrait.

[0244] Step 4: If the reference time weight is less than the third value, and there is a downward trend from the time weight of the first user portrait in each user portrait to the target time weight in the order of generation time of each user portrait, the time weight of the initial user portrait is calculated based on the length of the target time period corresponding to the user data of the target user, the length of time between the first and last user behaviors of the target user within the target time period, the number of user portraits, and the number of time weights from the time weight of the first user portrait in each user portrait to the target time weight in the order of generation time of each user portrait.

[0245] Step 5: If the reference time weight is less than the third value, and the time weight from the first user portrait in each user portrait to the target time weight is on an upward trend in the order of the generation time of each user portrait, the time weight of the initial user portrait is calculated based on the duration between the first and last user behaviors of the target user in the target time period, the duration of the target time period corresponding to the user data of the target user, and the difference with the largest absolute value among the differences between two adjacent time weights in the time weights of each user portrait.

[0246] After obtaining the generated user portraits of the target user in the target portrait dimension, the electronic device calculates the reference time weight based on the duration of the target time period corresponding to the user data of the target user, the duration between the first and last time the target user behavior occurred within the target time period, and the time weight of the first user portrait in each user portrait in the order of the generation time of each user portrait and the following formula (4).

[0247]

[0248] Δq represents the reference time weight; Δt represents the duration between the first and last time the target user performs a user behavior within the target time period; T represents the duration of the target time period corresponding to the user data of the target user; q1 represents the time weight of the first user portrait in each user portrait in the order of their generation time.

[0249] Furthermore, the electronic device calculates the time weight of the initial user portrait based on whether the reference time weight is less than the third value and the change trend from the time weight of the first user portrait among the user portraits to the target time weight in the order of the generation time of each user portrait. The third value may be 0.

[0250] If the reference time weight is not less than the third value, and in the order of the generation time of each user portrait, the time weight from the first user portrait in each user portrait to the target time weight is an upward trend, indicating that the user characteristics of the target user in the target portrait dimension at the current moment maintain an upward trend, that is, the time weight of the initial user portrait of the target user in the target portrait dimension at the current moment is greater than the time weight of the user portrait in the most recent target portrait dimension, which means that the user characteristics of the target user in the target portrait dimension can still represent the target user, and the target user's preference for the target portrait dimension increases. The electronic device calculates the time weight of the initial user portrait based on the following formula (5).

[0251]

[0252] Q represents the time weight of the initial user portrait; Δt represents the duration between the first and last user behaviors of the target user within the target time period; T represents the duration of the target time period corresponding to the user data of the target user; M represents the number of time weights from the time weight of the first user portrait in each user portrait to the target time weight in the order of the generation time of each user portrait; K represents the number of user portraits; Δq represents the reference time weight.

[0253] If the reference time weight is not less than the third value, and in the order of the generation time of each user portrait, the time weight from the first user portrait to the target time weight of each user portrait is a downward trend, indicating that at the current moment the time weight of each user portrait of the target user changes from a downward trend to an upward trend, and the time weight of the user feature of the target user in the target portrait dimension becomes larger, the electronic device calculates the time weight of the initial user portrait based on the following formula (6).

[0254]

[0255] Q represents the time weight of the initial user portrait; Δt represents the duration between the first and last time the target user performs a user behavior within the target time period; T represents the duration of the target time period corresponding to the user data of the target user; Δq represents the reference time weight; A represents the difference with the largest absolute value among the differences between two adjacent time weights in the time weights of each user portrait.

[0256] If the reference time weight is less than the third value, and according to the chronological order of the generation time of each user portrait, the time weight from the first user portrait in each user portrait to the target time weight is in a downward trend, it indicates that the user characteristics of the target user in the target portrait dimension at the current moment maintain a downward trend, that is, the time weight of the initial user portrait of the target user in the target portrait dimension at the current moment is not greater than the time weight of the user portrait in the most recent target portrait dimension, which also indicates that the target user's preference for the target portrait dimension becomes smaller. The electronic device calculates the time weight of the initial user portrait based on the above formula (5).

[0257] If the reference time weight is less than the third value, and according to the chronological order of the generation time of each user portrait, the time weight from the first user portrait among the user portraits to the target time weight is an upward trend, indicating that at the current moment the time weight of each user portrait of the target user changes from an upward trend to a downward trend, and the time weight of the user feature of the target user in the target portrait dimension becomes smaller, the electronic device calculates the time weight of the initial user portrait based on the above formula (6).

[0258] After generating the target user portrait, the electronic device may also obtain the user identification of the target user (ie, the target user identification) and store the target user portrait according to the target user identification.

[0259] In one implementation, the electronic device may directly obtain a number pre-assigned to the target user as the target user identifier.

[0260] In another implementation, Figure 4 Based on Figure 8After step S108, the method may further include the following steps:

[0261] S109: Generate the DID of the target user as the target DID according to the preset DID generation rule and the user information of the target user.

[0262] S110: Generate a user identifier of the target user as the target user identifier based on the generation time of the designated user portrait of the target user, the target user ID and the target DID.

[0263] S111: Correspondingly record the target user identification and the target user portrait.

[0264] The user information of the target user includes: the name, age, gender, occupation, and number assigned to the target user.

[0265] The electronic device generates a DID document of the target user according to a preset DID (Decentralized Identifier) ​​generation rule and the user information of the target user. The preset DID generation rule may be a DID document generation method provided by W3C (World Wide Web Consortium).

[0266] A DID document is a JSON-LD Object (a method of representing and transmitting Internet data based on JSON). The DID document consists of six parts: a DID identifier, a set of cryptographic materials (such as a public key), a set of cryptographic protocols, a set of service endpoints, a timestamp, and an optional JSON-LD signature, which is used to prove that the DID document is legal.

[0267] The electronic device obtains the DID identifier in the DID document as the target DID of the target user.

[0268] If a user profile of the target user in the target profile dimension has not been generated before the target user profile is generated, the designated user profile is the target user profile. If a user profile of the target user in the target profile dimension has been generated before the target user profile is generated, the designated user profile can be any one of the generated user profiles, for example, the user profile with the earliest generation time.

[0269] The electronic device can generate a target user identifier based on the target DID of the target user, and record the target user identifier and the target user portrait accordingly.

[0270] When generating a user identification for each user, the electronic device may also record the user identification and user information of each user accordingly, and obtain the corresponding relationship between the user identification set and the user information set, so as to associate the user portrait and user information through the user identification. Subsequently, the electronic device may obtain the target user information of the target user based on the corresponding relationship between the user identification set and the user information set, and determine whether the user has the right to use the target user portrait based on the target user information, thereby improving the security of the user portrait.

[0271] The user identification set includes at least one user identification; the user information set includes at least one user information. The user identifications in the user identification set correspond to the user information in the user information set one by one. For example, the correspondence between the user identification set and the user information set includes: user identification A corresponds to user information A, user identification B corresponds to user information B, and user identification C corresponds to user information C.

[0272] In some embodiments, Figure 8 Based on Fig. 9 , step S110 may include the following steps:

[0273] S1101: Perform hash processing on the generation time of the designated user portrait of the target user to obtain the hash value of the generation time of the designated user portrait, and perform hash processing on the target user's number to obtain the hash value of the target user's number.

[0274] S1102: Concatenate the hash value of the generation time of the designated user portrait of the target user and the hash value of the target user's serial number to obtain a hash value string.

[0275] S1103: Based on the hash value string and the target DID, generate a user identifier of the target user as the target user identifier.

[0276] The electronic device obtains the generation time of the designated user portrait of the target user and the target user's number, performs hash processing on the generation time of the designated user portrait to obtain the hash value of the generation time of the designated user portrait, and performs hash processing on the target user's number to obtain the hash value of the target user's number. The electronic device concatenates the hash value of the generation time of the designated user portrait and the hash value of the target user's number to obtain a hash value string.

[0277] If a user profile of the target user in the target profile dimension has not been generated before the target user profile is generated, the designated user profile is the target user profile. If a user profile of the target user in the target profile dimension has been generated before the target user profile is generated, the designated user profile can be any one of the generated user profiles, for example, the user profile with the earliest generation time.

[0278] In one implementation, the electronic device may concatenate the obtained hash value string and the target DID, and use the concatenation result as the target user identification. Alternatively, when the number of characters contained in the hash value string and the target DID is the same, the electronic device may calculate the weighted sum of each character in the hash value string and the corresponding character in the target DID to obtain the target user identification.

[0279] In another implementation, Fig. 9 Based on Fig.10 , step S1103 may include the following steps:

[0280] S11031: If the number of characters contained in the hash value string is not greater than the number of characters contained in the target DID, for each character in the hash value string, determine the position of the character in the hash value string according to the order of the characters contained in the hash value string from high to low.

[0281] S11032: According to the order of the characters contained in the target DID from high to low, determine the character in the target DID that is in the same position as the character, and obtain the character corresponding to the character in the target DID; calculate the remainder between the character and the corresponding character in the target DID, and obtain the user ID of the target user as the target user ID.

[0282] S11033: If the number of characters contained in the hash value string is greater than the number of characters contained in the target DID, determine the character that exists in the corresponding position in the target DID as the first character according to the arrangement order of the characters contained in the hash value string from high to low, and determine the other characters in the hash value string except the first character as the second character.

[0283] S11034: For each character in the target DID, count the number of occurrences of the character.

[0284] S11035: For each first character, determine the position of the first character in the hash value string according to the order of the characters contained in the hash value string from high to low; determine the character in the target DID that is in the same position as the first character according to the order of the characters contained in the target DID from high to low, and obtain the character corresponding to the first character in the target DID; calculate the remainder between the first character and the corresponding character in the target DID as the first remainder.

[0285] S11036: For each second character, determine the position of the second character in the hash value string according to the order of the characters contained in the hash value string from low to high; determine the character in the same position as the second character in the corresponding sorting result according to the order of the number of occurrences of the characters contained in the target DID from high to low, and obtain the character corresponding to the second character in the target DID; calculate the remainder of the second character and the corresponding character in the target DID to obtain the second remainder.

[0286] S11037: Generate a user identifier of a target user including the first remainder and the second remainder as the target user identifier.

[0287] Exemplarily, if the hash value string is: [0, 2, 5, 3, 2, 2], and the target DID is [0, 1, 3, 5, 3, 3], the number of characters contained in the hash value string is the same as the number of characters contained in the target DID, and the electronic device calculates the remainder of the first character in the hash value string (i.e., 0) and the first character in the target DID (i.e., 0) in order from high to low, which is 0, and the remainder of the second character in the hash value string (i.e., 2) and the first character in the target DID (i.e., 1) is 0, and so on, until the remainder of the sixth character in the hash value string (i.e., 2) and the sixth character in the target DID (i.e., 3) is 2, and the target user identification is: [0, 0, 2, 3, 2, 2].

[0288] If the hash value string is: [0, 2, 5, 3, 2], and the target DID is [0, 1, 3, 5, 3, 3], and the number of characters contained in the hash value string is less than the number of characters contained in the target DID, the electronic device calculates the remainder of the first character in the hash value string (i.e., 0) and the first character in the target DID (i.e., 0) in order from high to low, which is 0, and the remainder of the second character in the hash value string (i.e., 2) and the first character in the target DID (i.e., 1) is 0, and so on, until the remainder of the fifth character in the hash value string (i.e., 2) and the fifth character in the target DID (i.e., 3) is 2, and the target user identification is: [0, 0, 2, 3, 2].

[0289] If the hash value string is: [0, 2, 5, 3, 2, 6, 9, 7], the target DID is [1, 1, 3, 5, 3, 3], the number of characters contained in the hash value string is greater than the number of characters contained in the target DID, and the electronic device determines, in order from high to low, that the characters existing in the corresponding positions in the target DID include: 0, 2, 5, 3, 2, 6, that is, the first character includes 0, 2, 5, 3, 2, 6, and the electronic device determines that the other characters in the hash value string except the first character include 9, that is, the second character includes 9, 7.

[0290] Then, the electronic device calculates the remainder of the first character in the hash value string (i.e., 0) and the first character in the target DID (i.e., 0) as 0, and calculates the remainder of the second character in the hash value string (i.e., 2) and the first character in the target DID (i.e., 1) as 0, and so on, until the remainder of the sixth first character in the hash value string (i.e., 6) and the sixth character in the target DID (i.e., 3) is 0, and the first remainders include: 0, 0, 2, 3, 0.

[0291] The electronic device determines that the number of occurrences of 3 in the target DID is 3, the number of occurrences of 1 is 2, and the number of occurrences of 5 is 1. Then, according to the order of the number of occurrences of the characters contained in the target DID from high to low, the sorting result obtained is: 3, 1, 5. The electronic device determines the first second character (i.e., 7) according to the order of the characters contained in the hash value string from low to high, and according to the order of the number of occurrences of the characters contained in the target DID from high to low, the first character in the corresponding sorting result is 3, then the electronic device calculates the remainder of 3 and 7 as 3, the electronic device determines the second second character (i.e., 9) according to the order of the characters contained in the hash value string from low to high, and according to the order of the number of occurrences of the characters contained in the target DID from high to low, the second character in the corresponding sorting result is 1, then the electronic device calculates the remainder of 9 and 1 as 0, and the second remainder includes: 3, 0.

[0292] Furthermore, the electronic device concatenates the first remainder and the second remainder to obtain the target user identifier: [0, 0, 2, 3, 0, 3, 0].

[0293] Based on the above processing, the target DID of the target user can be generated. The target DID is independent of any centralized registry, identity provider or certificate authority. It is a globally unique identity with global uniqueness, high resolvability, encryption, and cryptographic verification. The target user identity generated based on the target DID is highly secure, which can further improve the security of the user portrait.

[0294] In one implementation, the electronic device can directly store the target user identification and the target user portrait in a preset database. In addition, the electronic device also records the corresponding relationship between the target user identification and the target user information, and can associate the target user information and the target user portrait through the target user identification to improve the security of the user portrait.

[0295] In another implementation, in order to improve the security of the user portrait, the electronic device can store the target user portrait in a preset blockchain. Figure 8 Based on Fig.11 , step S111 may include the following steps:

[0296] S1111: Determine whether the corresponding relationship between the user identifier stored in the portrait node and the user node contains the target user identifier. If yes, execute step S1112; if not, execute step S1113.

[0297] Among them, the portrait node is the head node of the preset user blockchain; the user node is the non-head node of the user blockchain; a user node is used to store the user information of the corresponding user.

[0298] S1112: Determine the user node corresponding to the target user identifier and obtain the user node of the target user; create a new linked list node after the last linked list node of the portrait blockchain with the user node of the target user as the head node, and store the target user portrait in the newly created linked list node.

[0299] S1113: Create a new user node after the last user node in the user blockchain as the user node of the target user, and record the target user identifier and the user node of the target user in the corresponding relationship; create a new portrait blockchain with the user node of the target user as the head node; wherein the newly created portrait blockchain includes a newly created linked list node in addition to the head node; store the target user portrait in the newly created linked list node.

[0300] A preset blockchain is deployed in the electronic device, and the blockchain includes a user blockchain and a portrait blockchain. The head node of the user blockchain is a portrait node, and the portrait node records the corresponding relationship between the user's user identification and the user node. The non-head node of the user blockchain is a user node, and each user node records the user information of the corresponding user, as well as the corresponding relationship between the user portrait of the user and the linked list node.

[0301] The portrait blockchain corresponds to the user. The head node of a user's portrait blockchain is the user node of the user. The non-head nodes in the portrait blockchain are linked list nodes, which are used to store the user portrait of the user.

[0302] For example, see Fig.12 , Fig.12 A schematic diagram of the structure of a blockchain provided by an embodiment of the present disclosure. The user blockchain is: portrait node-user node 1-user node 2-user node 3. User node 1 is the user node of user 1, user node 2 is the user node of user 2, and user node 3 is the user node of user 3.

[0303] The portrait blockchain includes: the portrait blockchain corresponding to user 1, namely user node 1-linked list node 1-linked list node 2-linked list node 3, the portrait blockchain corresponding to user 2, namely user node 2-linked list node 4, and the portrait blockchain corresponding to user 3, namely user node 3-linked list node 5-linked list node 6.

[0304] After generating the target user portrait, the electronic device determines whether the target user identifier is included in the correspondence between the user identifier stored in the portrait node and the user node. If the target user identifier is included in the correspondence stored in the portrait node, it indicates that the user portrait of the target user has been generated, that is, the portrait blockchain corresponding to the target user has been generated. The electronic device determines the user node corresponding to the target user identifier in the correspondence, that is, the user node of the target user, and the portrait blockchain with the user node of the target user as the head node is the portrait blockchain corresponding to the target user.

[0305] The electronic device creates a new linked list node after the last linked list node of the portrait blockchain with the user node of the target user as the head node, and stores the target user portrait in the newly created linked list node. The electronic device can also record the corresponding relationship between the target user portrait and the newly created linked list node in the user node of the target user.

[0306] If the corresponding relationship stored in the portrait node does not contain the target user identifier, indicating that the user portrait of the target user has not been generated, that is, the user node of the target user has not been generated, then the electronic device creates a new user node after the last user node in the user blockchain as the user node of the target user, and records the target user identifier and the user node of the target user in the corresponding relationship. The corresponding relationship between the user identifier and the user node can also represent the corresponding relationship between the user identifier set and the user information set. The electronic device can also record the corresponding relationship between the target user portrait and the newly created linked list node in the user node of the target user.

[0307] Then, the user node of the target user of the electronic device is the head node, and a new portrait blockchain is created. The newly created portrait blockchain includes the head node (i.e. the user node of the target user) and a newly created linked list node. The electronic device stores the target user portrait in the newly created linked list node.

[0308] In some embodiments, the step of the electronic device storing the target user portrait in the newly created linked list node may include the following steps: generating a two-dimensional array including the target user portrait and the generation time of the target user portrait, and storing the two-dimensional array in the newly created linked list node.

[0309] The electronic device generates a two-dimensional array including a target user portrait and a generation time of the target user portrait, wherein one dimension of the two-dimensional array is the generation time of the target user portrait and the other dimension is the target user portrait. Then, the electronic device stores the two-dimensional array into a newly created linked list node.

[0310] Based on the above processing, the user portrait of the target user is connected to the user node that uniquely represents the user in the portrait blockchain. Through the user node, the identity information of the user corresponding to the user portrait can be assigned. The user's identity information can be the user ID of the user, that is, the user's identity information can be associated with the user portrait, and the ownership of the user portrait can be bound to the user based on the user's identity information. When using the user portrait, the user can be informed of the usage behavior of the user portrait through the association relationship. The user portrait is only allowed to be used after the user authorizes the usage behavior, which ensures that the user's rights and privacy are not violated and can improve the security of the user portrait.

[0311] In some embodiments, the electronic device may further obtain the target user portrait before sending the target user portrait to the electronic device used by the user.

[0312] In one implementation, if the electronic device directly stores the target user identification and the target user portrait corresponding to each other in a preset database, the electronic device directly obtains the target user portrait corresponding to the target user identification from the preset database.

[0313] In another implementation, Fig.11 Based on Fig.13 Before step S105, the method may further include the following steps:

[0314] S112: Determine the user node corresponding to the target user identifier in the correspondence between the user identifier and the user node recorded in the portrait node, and obtain the user node of the target user.

[0315] S113: Determine the linked list node corresponding to the target user portrait in the correspondence between the user portrait recorded in the user node of the target user and the linked list node.

[0316] S114: Obtain a target user portrait from the determined linked list node.

[0317] If the electronic device stores the target user portrait in the portrait blockchain corresponding to the target user, the electronic device determines the user node corresponding to the target user identifier in the correspondence between the user identifier recorded in the portrait node and the user node, and obtains the user node of the target user.

[0318] Then, the electronic device can determine the portrait blockchain with the user node of the target user as the head node, traverse the portrait blockchain, obtain the linked list node storing the target user portrait in the portrait blockchain, and obtain the target user portrait from the linked list node.

[0319] Alternatively, the electronic device determines the linked list node corresponding to the target user portrait in the correspondence between the user portrait recorded in the user node of the target user and the linked list node, and obtains the target user portrait from the determined linked list node.

[0320] See also Fig.14 , Fig.14 A flowchart of another user portrait management method provided in an embodiment of the present disclosure.

[0321] Step 1: Get user data.

[0322] Since various applications used by users will store user data in the blockchain, the electronic device can obtain the user data of each user from the mainstream public chain, and then the electronic device can store the obtained user data in a preset database in the form of a data wide table. Furthermore, the electronic device obtains the user data of the target user from the preset database.

[0323] Step 2: Determine the image dimension.

[0324] The electronic device determines the target user category of the target user based on the basic information of the target user, and obtains the target portrait dimension corresponding to the target user category.

[0325] Step 3: Form a user portrait based on the portrait dimensions.

[0326] The electronic device processes the user data of the target user in the target portrait dimension to generate a target user portrait of the target user in the target portrait dimension.

[0327] Step 4: Store the user portrait in the portrait blockchain and configure the user's identity for the user portrait, so that the user has the right to engage in commercial activities with respect to the user portrait based on the identity.

[0328] The electronic device stores the target user portrait of the target user in a portrait blockchain with the target user's user node as the head node, and records the correspondence between the target user identifier and the target user's user node, so that the target user identifier is associated with the portrait blockchain storing the target user's user portrait, that is, the target user portrait is associated with the target user's identity information. The target user's identity information can be the target user identifier, so that the target user has the right to engage in commercial activities with respect to the target user portrait based on the identity information.

[0329] Step 5: Determine the ownership of the user portrait through the user identity, and then use the user portrait based on the ownership.

[0330] When receiving a user's request to use the target user portrait of the target user, determine the identity information of the target user who owns the target user portrait (i.e., the target user identifier), and determine whether the user has the right to use the target user portrait based on the target user's identity information. When the user has the right to use the target user portrait, send an alarm message to the electronic device used by the target user. When the user has the right to use the target user portrait, send the target user portrait to the electronic device used by the user.

[0331] Based on the above processing, the user's identity information can be associated with the user portrait, and the ownership of the user portrait can be bound to the user based on the user's identity information. Further, when using the user portrait, the user can be informed of the usage behavior of the user portrait through the association relationship. The user portrait is only allowed to be used after the user authorizes the usage behavior, which ensures that the user's rights and privacy are not violated and can improve the security of the user portrait.

[0332] See also Fig.15 , Fig.15 A flowchart of another user portrait management method provided in an embodiment of the present disclosure.

[0333] Step 1: Get user data.

[0334] Since various applications used by users will store user data in the blockchain, the electronic device can obtain the user data of each user from the mainstream public chain, and then the electronic device can store the obtained user data in a preset database in the form of a data wide table. Furthermore, the electronic device obtains the user data of the target user from the preset database.

[0335] Step 2: Determine the portrait dimension based on user data.

[0336] The electronic device determines the target user category of the target user based on the basic information of the target user, and obtains the target portrait dimension corresponding to the target user category. The target portrait dimension is determined based on the user data of each user included in the target user category.

[0337] Step 3: Create a user portrait based on portrait dimensions, user data, and time attributes.

[0338] The electronic device processes the user data of the target user in the portrait dimension, generates an initial user portrait of the target user in the target portrait dimension, and calculates the time weight (i.e., time attribute) of the initial user portrait based on the length of the target time period corresponding to the user data of the target user and the length of time between the first and last user behaviors of the target user within the target time period, and determines the calculated time weight and the initial user portrait as the final target user portrait of the target user.

[0339] Step 4: Store the user portrait in the portrait blockchain and configure the user's identity for the user portrait, so that the user has the right to engage in commercial activities with the user portrait based on the identity.

[0340] The electronic device stores the target user portrait of the target user in a portrait blockchain with the target user's user node as the head node, and records the correspondence between the target user identifier and the target user's user node, so that the target user identifier is associated with the portrait blockchain storing the target user's user portrait, that is, the target user portrait is associated with the target user's identity information. The target user's identity information can be the target user identifier, so that the target user has the right to engage in commercial activities with respect to the target user portrait based on the identity information.

[0341] Step 5: Use the user profile through the user identity.

[0342] When receiving a user's request to use the target user portrait of the target user, determine the identity information of the target user who owns the target user portrait, and determine whether the user has the right to use the target user portrait based on the target user's identity information. When the user has the right to use the target user portrait, send an alarm message to the electronic device used by the target user. When the user has the right to use the target user portrait, send the target user portrait to the electronic device used by the user.

[0343] Based on the above processing, the time weight of the user's user portrait in each portrait dimension can be determined. The time weight describes the changing trend of the importance of the user's user characteristics in the portrait dimension over time, and then reflects the user's personalized differences caused by time characteristics in the process of generating user portraits, and the binding of user portraits and user identity information is realized by building a portrait blockchain. When using user portraits, users are notified of the use of user portraits through their identity information. The use of user portraits is only allowed after the user authorizes the use behavior, which ensures that user rights and privacy are not violated and can improve the security of user portraits.

[0344] See also Fig.16 , Fig.16 A flowchart of another user portrait management method provided in an embodiment of the present disclosure.

[0345] Step 1: Get user data.

[0346] Since various applications used by users will store user data in the blockchain, the electronic device can obtain the user data of each user from the mainstream public chain, and then the electronic device can store the obtained user data in a preset database in the form of a data wide table. Furthermore, the electronic device obtains the user data of the target user from the preset database.

[0347] Step 2: Determine the image dimension.

[0348] The electronic device determines the target user category of the target user based on the basic information of the target user, and obtains the target portrait dimension corresponding to the target user category. The target portrait dimension is determined based on the user data of each user included in the target user category.

[0349] Step 3: Form a user portrait based on the portrait dimensions.

[0350] The electronic device processes the user data of the target user in the target portrait dimension to generate a target user portrait of the target user in the target portrait dimension.

[0351] Step 4: Configure the digital identity of the user portrait based on DID, so that the user has the right to engage in commercial activities with the user portrait based on the digital identity.

[0352] The electronic device generates a target DID for the target user, and generates a target user identifier based on the target DID, uses the target user identifier as the digital identity of the target user, and then associates the target user's digital identity with the target user's target user portrait, thereby enabling the target user to enjoy the right to engage in commercial activities with respect to the target user portrait based on the digital identity.

[0353] Step 5: Use the user portrait through DID.

[0354] When receiving a user's request to use the target user portrait of the target user, determine the digital identity of the target user who owns the target user portrait (i.e., the target user identifier), and determine whether the user has the right to use the target user portrait based on the target user's digital identity, that is, determine whether the user has the right to use the target user portrait based on the target user information corresponding to the target user identifier. When the user has the right to use the target user portrait, send an alarm message to the electronic device used by the target user. When the user has the right to use the target user portrait, send the target user portrait to the electronic device used by the user.

[0355] Based on the above processing, the user's DID can be generated, and the user's user ID can be generated based on the DID, and then the owner of the user portrait can be determined through the user ID. When using the user portrait, the identity information of the user who owns the user portrait is determined through the user ID, and the user is notified of the use of the user portrait through the user's identity information. The user portrait is only allowed to be used after the user authorizes the use behavior, which ensures that the user's rights and privacy are not violated and can improve the security of the user portrait.

[0356] and Figure 1 Corresponding to the method embodiment of Fig.17 , Fig.17 A structural diagram of a user portrait management device provided in an embodiment of the present disclosure, the device comprising:

[0357] The extraction module 1701 is used to extract the user identifier of the user carried in the use request as the user identifier after receiving the use request for the target user portrait of the target user, and extract the use summary carried in the use request; wherein the use summary indicates the use scenario of the user obtaining the target user portrait;

[0358] The acquisition module 1702 is used to acquire the authorization list and authorization summary of the target user for the target user portrait; wherein the authorization list includes the user identification of each user authorized by the target user to use the target user portrait; and the authorization summary indicates the usage scenario in which the target user authorizes the use of the target user portrait;

[0359] The usage right judgment module 1703 is used to judge whether the user has the right to use the target user portrait based on the user identification, the usage summary, the authorization list and the authorization summary;

[0360] The warning message sending module 1704 is used to send a warning message to the electronic device used by the target user if the user does not have the right to use the target user portrait, so as to remind the target user of the user's request to use the target user portrait;

[0361] The user portrait sending module 1705 is used to send the target user portrait to the electronic device used by the user if the user has the right to use the target user portrait.

[0362] In some embodiments, the usage right determination module 1703 is specifically used to determine whether the authorization list contains the user identifier;

[0363] If the user identifier is not included in the authorization list, it is determined that the user does not have the right to use the target user portrait;

[0364] If the user ID is included in the authorization list, calculate the difference between the usage summary and the authorization summary; if the difference is greater than a preset threshold, determine that the user does not have the right to use the target user portrait; if the difference is not greater than the preset threshold, determine that the user has the right to use the target user portrait.

[0365] In some embodiments, the usage right determination module 1703 is specifically configured to extract continuous character strings of a first preset length from the usage summary to obtain the character strings contained in the usage summary;

[0366] For each extracted character string, if the authorization summary includes a character string that is identical to the character string, determining that the matching degree corresponding to the character string is a first value;

[0367] If the authorization summary does not contain a string identical to the string, extract a continuous string of a second preset length from the string to obtain each substring contained in the string; for each substring contained in the string, if the authorization summary does not contain a string identical to the substring, determine that the matching degree corresponding to the substring is a second value; if the authorization summary contains a string identical to the substring, calculate the matching degree corresponding to the substring based on the number of characters contained in the substring, the number of characters contained in the string, the number of characters contained in the authorization summary, and the number of occurrences of the string identical to the substring in the authorization summary; calculate the sum of the matching degrees corresponding to the substrings contained in the string, and calculate the ratio of the sum to the number of substrings contained in the string to obtain the matching degree corresponding to the string;

[0368] Based on the matching degree corresponding to each character string included in the usage summary and the number of character strings included in the usage summary, a difference value between the usage summary and the authorization summary is calculated.

[0369] In some embodiments, the apparatus further comprises:

[0370] a portrait dimension determination module, configured to, after the extraction module 1701 receives a use request for a target user portrait of a target user, extract the user identifier of the user carried in the use request as the user identifier, and before extracting the use summary carried in the use request, determine the portrait dimension corresponding to the target user based on the user information of the target user as the target portrait dimension;

[0371] An initial user portrait generating module, configured to generate a user portrait of the target user in the target portrait dimension based on the user data of the target user in the target portrait dimension as the initial user portrait;

[0372] The target user portrait generation module is used to generate a final user portrait of the target user based on the initial user portrait as the target user portrait.

[0373] In some embodiments, the target user portrait generation module is specifically used to calculate the time weight of the initial user portrait based on the duration of the target time period corresponding to the user data of the target user and the duration between the first time when the target user has a user behavior and the last time when the target user has a user behavior within the target time period;

[0374] The calculated time weight and the initial user portrait are determined as the final user portrait of the target user, which serves as the target user portrait.

[0375] In some embodiments, the target user portrait generation module is specifically used to determine whether a user portrait of the target user in the target portrait dimension has been generated before generating the initial portrait;

[0376] If a user profile of the target user in the target profile dimension has not been generated before the initial profile is generated, the time weight of the initial user profile is calculated based on the duration of the target time period corresponding to the user data of the target user and the duration between the first time the target user has a user behavior and the last time the target user has a user behavior within the target time period;

[0377] If a user portrait of the target user in the target portrait dimension has been generated before generating the initial portrait, obtain the time weights of the generated user portraits of the target user in the target portrait dimension; determine the time weights at the inflection points in the changing trend of the time weights of the user portraits according to the chronological order of the generation time of the user portraits, as the target time weight; calculate the time weight of the initial user portrait based on the target time weight, the number of time weights of the user portraits, the length of the target time period corresponding to the user data of the target user, and the length of time between the first time the target user has a user behavior and the last time the target user has a user behavior within the target time period.

[0378] In some embodiments, the target user portrait generation module is specifically used to calculate the reference time weight based on the duration of the target time period corresponding to the user data of the target user, the duration between the first time when the target user has a user behavior and the last time when the target user has a user behavior within the target time period, and the time weight of the first user portrait among the user portraits according to the order of generation time of the user portraits;

[0379] If the reference time weight is not less than a third value, and according to the chronological order of the generation times of the user portraits, the time weight from the first user portrait among the user portraits to the target time weight is an upward trend, the time weight of the initial user portrait is calculated based on the length of the target time period corresponding to the user data of the target user, the length of time between the first time when the target user has a user behavior and the last time when the target user has a user behavior within the target time period, the number of the user portraits, and the number of time weights from the time weight of the first user portrait among the user portraits to the target time weight according to the chronological order of the generation times of the user portraits;

[0380] If the reference time weight is not less than the third value, and in the order of the generation time of the user portraits, the time weight from the first user portrait among the user portraits to the target time weight is in a downward trend, the time weight of the initial user portrait is calculated based on the time length between the moment when the target user first has a user behavior and the moment when the target user has last had a user behavior within the target time period, the length of the target time period corresponding to the user data of the target user, and the difference with the largest absolute value among the differences between two adjacent time weights among the time weights of the user portraits;

[0381] If the reference time weight is less than the third value, and according to the chronological order of the generation times of the user portraits, the time weight from the first user portrait among the user portraits to the target time weight is in a downward trend, the time weight of the initial user portrait is calculated based on the duration of the target time period corresponding to the user data of the target user, the duration between the moment when the target user first has a user behavior and the moment when the target user has a last user behavior within the target time period, the number of the user portraits, and the number of time weights from the time weight of the first user portrait among the user portraits to the target time weight according to the chronological order of the generation times of the user portraits;

[0382] If the reference time weight is less than the third value, and there is an upward trend from the time weight of the first user portrait among the user portraits to the target time weight in the order of the generation time of the user portraits, the time weight of the initial user portrait is calculated based on the duration between the first and last user behaviors of the target user within the target time period, the duration of the target time period corresponding to the user data of the target user, and the difference with the largest absolute value among the differences between two adjacent time weights in the time weights of the user portraits.

[0383] In some embodiments, the apparatus further comprises:

[0384] A DID generation module is used to generate a final user portrait of the target user based on the initial user portrait in the target user portrait generation module, and then generate a DID of the target user as a target DID according to a preset decentralized identity identifier DID generation rule and the user information of the target user;

[0385] A user identification generation module, configured to generate a user identification of the target user as a target user identification based on the generation time of the designated user portrait of the target user, the number of the target user and the target DID;

[0386] The recording module is used to record the target user identifier and the target user portrait accordingly.

[0387] In some embodiments, the user identification generation module is specifically used to perform hash processing on the generation time of the designated user portrait of the target user to obtain the hash value of the generation time of the designated user portrait, and to perform hash processing on the number of the target user to obtain the hash value of the number of the target user;

[0388] Concatenate the hash value of the generation time of the designated user portrait and the hash value of the target user's ID to obtain a hash value string;

[0389] Based on the hash value string and the target DID, a user identifier of the target user is generated as the target user identifier.

[0390] In some embodiments, the user identification generation module is specifically used to, if the number of characters included in the hash value string is not greater than the number of characters included in the target DID, determine, for each character in the hash value string, the position of the character in the hash value string according to the arrangement order of the characters included in the hash value string from high to low; determine, according to the arrangement order of the characters included in the target DID from high to low, the character in the target DID that is at the same position as the character, and obtain the character corresponding to the character in the target DID; calculate the remainder of the character and the character corresponding to the character in the target DID, and obtain the user identification of the target user as the target user identification;

[0391] If the number of characters included in the hash value string is greater than the number of characters included in the target DID, determine the character that exists in the corresponding position in the target DID as the first character according to the order of arrangement of the characters included in the hash value string from high to low, and determine the other characters in the hash value string except the first character as the second character; for each character in the target DID, count the number of occurrences of the character; for each first character, determine the position of the first character in the hash value string according to the order of arrangement of the characters included in the hash value string from high to low; determine the character in the target DID at the same position as the first character according to the order of arrangement of the characters included in the target DID from high to low, and obtain the character corresponding to the first character in the target DID; calculating the remainder between the first character and the character corresponding to the target DID as the first remainder; for each second character, determining the position of the second character in the hash value string according to the arrangement order of the characters contained in the hash value string from low to high; determining the character at the same position as the second character in the corresponding sorting result according to the arrangement order of the number of occurrences of the characters contained in the target DID from high to low, and obtaining the character corresponding to the second character in the target DID; calculating the remainder between the second character and the character corresponding to the target DID to obtain the second remainder; generating a user identification of the target user including the first remainder and the second remainder as the target user identification.

[0392] In some embodiments, the recording module is specifically used to determine whether the corresponding relationship between the user identifier stored in the portrait node and the user node contains the target user identifier; wherein the portrait node is the head node of the preset user blockchain; the user node is the non-head node of the user blockchain; a user node is used to store the user information of the corresponding user;

[0393] If the target user identifier is included in the corresponding relationship, determine the user node corresponding to the target user identifier, and obtain the user node of the target user; create a new linked list node after the last linked list node of the portrait blockchain with the user node of the target user as the head node, and store the target user portrait in the newly created linked list node;

[0394] If the target user identifier is not included in the corresponding relationship, a new user node is created after the last user node of the user blockchain as the user node of the target user, and the target user identifier and the user node of the target user are recorded correspondingly in the corresponding relationship; a new portrait blockchain is created with the user node of the target user as the head node; wherein the newly created portrait blockchain includes a newly created linked list node in addition to the head node; and the target user portrait is stored in the newly created linked list node.

[0395] In some embodiments, the recording module is specifically used to generate a two-dimensional array including the target user portrait and the generation time of the target user portrait, and store the two-dimensional array in the newly created linked list node.

[0396] In some embodiments, the apparatus further comprises:

[0397] A user node determination module is used to determine the user node corresponding to the target user identifier in the correspondence between the user identifier and the user node recorded in the portrait node, and obtain the user node of the target user, before the user portrait sending module executes sending the target user portrait to the electronic device used by the user;

[0398] A linked list node determination module, used to determine the linked list node corresponding to the target user portrait in the correspondence between the user portrait recorded in the user node of the target user and the linked list nodes;

[0399] The user portrait acquisition module is used to acquire the target user portrait from the determined linked list node.

[0400] Based on the user portrait management device provided by the embodiment of the present disclosure, it is possible to determine whether the user has the right to use the target user portrait. If the user does not have the right to use the target user portrait, an alarm message is sent to the electronic device used by the target user to remind the target user of the user's request to use the target user portrait. If the user has the right to use the target user portrait, the target user portrait is sent to the electronic device used by the user, thereby avoiding the use of the user portrait without the user's perception, thereby avoiding infringement of the user's rights and privacy, and improving the security of the user portrait.

[0401] The present disclosure also provides an electronic device, such as Fig.18 As shown, it includes a processor 1801, a communication interface 1802, a memory 1803 and a communication bus 1804, wherein the processor 1801, the communication interface 1802, and the memory 1803 communicate with each other through the communication bus 1804.

[0402] Memory 1803, used for storing computer programs;

[0403] The processor 1801 is used to implement the steps of the user portrait management method described in any of the above embodiments when executing the program stored in the memory 1803.

[0404] 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.

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

[0406] 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.

[0407] 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.

[0408] In another embodiment provided by the present disclosure, a computer-readable storage medium is also provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned user portrait management methods are implemented.

[0409] In another embodiment provided by the present disclosure, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute any user portrait management method in the above embodiments.

[0410] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present disclosure is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.

[0411] It should be noted that, in this article, relational terms such as first and second, etc. 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 existence of other identical elements in the process, method, article or device including the elements.

[0412] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, electronic device, computer-readable storage medium, and computer program product 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.

[0413] The above description is only a preferred embodiment of the present disclosure and is not intended to limit the protection scope of the present disclosure. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present disclosure are included in the protection scope of the present disclosure.

Claims

1. A user portrait management method, characterized in that: The method comprises: After receiving a use request for a target user portrait of a target user, extracting a user identifier of the user carried in the use request as a user identifier, and extracting a use summary carried in the use request; wherein the use summary indicates a use scenario in which the user obtains the target user portrait; Obtaining the target user's authorization list and authorization summary for the target user portrait; wherein the authorization list includes the user identifiers of each user authorized by the target user to use the target user portrait; and the authorization summary indicates the usage scenario in which the target user authorizes the use of the target user portrait; Based on the user identification, the usage summary, the authorization list and the authorization summary, determining whether the user has the right to use the target user portrait; If the user does not have the right to use the target user portrait, sending an alarm message to the electronic device used by the target user to remind the target user of the user's request to use the target user portrait; If the user has the right to use the target user portrait, sending the target user portrait to the electronic device used by the user; Wherein, judging whether the user has the right to use the target user portrait based on the user identifier, the usage summary, the authorization list and the authorization summary includes: Determining whether the authorization list contains the user identifier; If the user identifier is not included in the authorization list, it is determined that the user does not have the right to use the target user portrait; If the user identifier is included in the authorization list, the difference between the usage summary and the authorization summary is calculated; if the difference is greater than a preset threshold, it is determined that the user does not have the right to use the target user portrait; if the difference is not greater than the preset threshold, it is determined that the user has the right to use the target user portrait; The difference value between the usage summary and the authorization summary is determined based on the matching degree corresponding to each string contained in the usage summary and the number of strings contained in the usage summary. The matching degree corresponding to each string contained in the usage summary is the degree of difference between each string and the authorization summary.

2. The method according to claim 1, characterized in that The calculating the difference value between the usage summary and the authorization summary includes: Extracting continuous character strings of a first preset length from the usage summary to obtain the character strings contained in the usage summary; For each extracted character string, if the authorization summary includes a character string that is identical to the character string, determining that the matching degree corresponding to the character string is a first value; If the authorization summary does not contain a string identical to the string, extract a continuous string of a second preset length from the string to obtain each substring contained in the string; for each substring contained in the string, if the authorization summary does not contain a string identical to the substring, determine that the matching degree corresponding to the substring is a second value; if the authorization summary contains a string identical to the substring, calculate the matching degree corresponding to the substring based on the number of characters contained in the substring, the number of characters contained in the string, the number of characters contained in the authorization summary, and the number of occurrences of the string identical to the substring in the authorization summary; calculate the sum of the matching degrees corresponding to the substrings contained in the string, and calculate the ratio of the sum to the number of substrings contained in the string to obtain the matching degree corresponding to the string; Based on the matching degree corresponding to each character string included in the usage summary and the number of character strings included in the usage summary, a difference value between the usage summary and the authorization summary is calculated.

3. The method according to claim 1, characterized in that After receiving a use request for a target user portrait of a target user, extracting a user identifier of the user carried in the use request as a user identifier, and before extracting a use summary carried in the use request, the method further includes: Based on the user information of the target user, determine a portrait dimension corresponding to the target user as a target portrait dimension; Based on the user data of the target user in the target portrait dimension, generating a user portrait of the target user in the target portrait dimension as an initial user portrait; Based on the initial user portrait, a final user portrait of the target user is generated as the target user portrait.

4. The method according to claim 3, characterized in that The generating, based on the initial user portrait, a final user portrait of the target user as the target user portrait, includes: Calculate the time weight of the initial user portrait based on the duration of the target time period corresponding to the user data of the target user and the duration between the first time the target user has a user behavior and the last time the target user has a user behavior within the target time period; The calculated time weight and the initial user portrait are determined as the final user portrait of the target user, which serves as the target user portrait.

5. The method according to claim 4, characterized in that The calculating the time weight of the initial user portrait based on the duration of the target time period corresponding to the user data of the target user and the duration between the first time when the target user has a user behavior and the last time when the target user has a user behavior within the target time period includes: Determining whether a user portrait of the target user in the target portrait dimension has been generated before generating the initial user portrait; If a user profile of the target user in the target profile dimension has not been generated before the initial user profile is generated, the time weight of the initial user profile is calculated based on the duration of the target time period corresponding to the user data of the target user and the duration between the first time the target user has a user behavior and the last time the target user has a user behavior within the target time period; If a user portrait of the target user in the target portrait dimension has been generated before generating the initial user portrait, obtain the time weights of the generated user portraits of the target user in the target portrait dimension; determine the time weights at the inflection points in the changing trend of the time weights of the user portraits according to the chronological order of the generation times of the user portraits, as the target time weight; calculate the time weight of the initial user portrait based on the target time weight, the number of time weights of the user portraits, the length of the target time period corresponding to the user data of the target user, and the length of time between the first time the target user has a user behavior and the last time the target user has a user behavior within the target time period.

6. The method according to claim 5, characterized in that The calculating the time weight of the initial user portrait based on the target time weight, the number of time weights of each user portrait, the duration of the target time period corresponding to the user data of the target user, and the duration between the moment when the target user first performs a user behavior and the moment when the target user last performs a user behavior within the target time period includes: Calculate a reference time weight based on the duration of a target time period corresponding to the user data of the target user, the duration between the first time the target user has a user behavior and the last time the target user has a user behavior within the target time period, and the time weight of the first user portrait among the user portraits in the order of the generation time of the user portraits; If the reference time weight is not less than a third value, and according to the chronological order of the generation times of the user portraits, the time weight from the first user portrait among the user portraits to the target time weight is an upward trend, the time weight of the initial user portrait is calculated based on the length of the target time period corresponding to the user data of the target user, the length of time between the first time when the target user has a user behavior and the last time when the target user has a user behavior within the target time period, the number of the user portraits, and the number of time weights from the time weight of the first user portrait among the user portraits to the target time weight according to the chronological order of the generation times of the user portraits; If the reference time weight is not less than the third value, and in the order of the generation time of the user portraits, the time weight from the first user portrait among the user portraits to the target time weight is in a downward trend, the time weight of the initial user portrait is calculated based on the time length between the moment when the target user first has a user behavior and the moment when the target user has last had a user behavior within the target time period, the length of the target time period corresponding to the user data of the target user, and the difference with the largest absolute value among the differences between two adjacent time weights among the time weights of the user portraits; If the reference time weight is less than the third value, and according to the chronological order of the generation times of the user portraits, the time weight from the first user portrait among the user portraits to the target time weight is in a downward trend, the time weight of the initial user portrait is calculated based on the duration of the target time period corresponding to the user data of the target user, the duration between the moment when the target user first has a user behavior and the moment when the target user has a last user behavior within the target time period, the number of the user portraits, and the number of time weights from the time weight of the first user portrait among the user portraits to the target time weight according to the chronological order of the generation times of the user portraits; If the reference time weight is less than the third value, and there is an upward trend from the time weight of the first user portrait among the user portraits to the target time weight in the order of the generation time of the user portraits, the time weight of the initial user portrait is calculated based on the duration between the first and last user behaviors of the target user within the target time period, the duration of the target time period corresponding to the user data of the target user, and the difference with the largest absolute value among the differences between two adjacent time weights in the time weights of the user portraits.

7. The method according to claim 3, characterized in that After generating a final user portrait of the target user based on the initial user portrait as the target user portrait, the method further includes: Generate the DID of the target user as the target DID according to a preset decentralized identity identifier DID generation rule and the user information of the target user; Generate a user identifier of the target user as the target user identifier based on the generation time of the designated user portrait of the target user, the number of the target user and the target DID; The target user identifier and the target user portrait are recorded accordingly.

8. The method according to claim 7, characterized in that The generating the user identifier of the target user as the target user identifier based on the generation time of the designated user portrait of the target user, the number of the target user and the target DID includes: Performing hash processing on the generation time of the designated user portrait of the target user to obtain a hash value of the generation time of the designated user portrait, and performing hash processing on the target user number to obtain a hash value of the target user number; Concatenate the hash value of the generation time of the designated user portrait and the hash value of the target user's ID to obtain a hash value string; Based on the hash value string and the target DID, a user identifier of the target user is generated as the target user identifier.

9. The method according to claim 8, characterized in that The step of generating the user identifier of the target user based on the hash value string and the target DID as the target user identifier includes: If the number of characters included in the hash value string is not greater than the number of characters included in the target DID, for each character in the hash value string, determine the position of the character in the hash value string according to the order of the characters included in the hash value string from high to low; determine the character in the target DID that has the same position as the character according to the order of the characters included in the target DID from high to low, and obtain the character corresponding to the character in the target DID; calculate the remainder of the character and the character corresponding to the character in the target DID, and obtain the user ID of the target user as the target user ID; If the number of characters included in the hash value string is greater than the number of characters included in the target DID, determine the character that exists in the corresponding position in the target DID as the first character according to the order of arrangement of the characters included in the hash value string from high to low, and determine the other characters in the hash value string except the first character as the second character; for each character in the target DID, count the number of occurrences of the character; for each first character, determine the position of the first character in the hash value string according to the order of arrangement of the characters included in the hash value string from high to low; determine the character in the target DID at the same position as the first character according to the order of arrangement of the characters included in the target DID from high to low, and obtain the character corresponding to the first character in the target DID; calculating the remainder between the first character and the character corresponding to the target DID as the first remainder; for each second character, determining the position of the second character in the hash value string according to the arrangement order of the characters contained in the hash value string from low to high; determining the character at the same position as the second character in the corresponding sorting result according to the arrangement order of the number of occurrences of the characters contained in the target DID from high to low, and obtaining the character corresponding to the second character in the target DID; calculating the remainder between the second character and the character corresponding to the target DID to obtain the second remainder; generating a user identification of the target user including the first remainder and the second remainder as the target user identification.

10. The method according to claim 7, characterized in that The corresponding record of the target user identifier and the target user portrait includes: Determine whether the corresponding relationship between the user identifier stored in the portrait node and the user node contains the target user identifier; wherein the portrait node is the head node of the preset user blockchain; the user node is the non-head node of the user blockchain; a user node is used to store the user information of the corresponding user; If the target user identifier is included in the corresponding relationship, determine the user node corresponding to the target user identifier, and obtain the user node of the target user; create a new linked list node after the last linked list node of the portrait blockchain with the user node of the target user as the head node, and store the target user portrait in the newly created linked list node; If the target user identifier is not included in the corresponding relationship, a new user node is created after the last user node of the user blockchain as the user node of the target user, and the target user identifier and the user node of the target user are recorded correspondingly in the corresponding relationship; a new portrait blockchain is created with the user node of the target user as the head node; wherein the newly created portrait blockchain includes a newly created linked list node in addition to the head node; and the target user portrait is stored in the newly created linked list node.

11. The method according to claim 10, characterized in that The storing the target user portrait to the newly created linked list node includes: Generate a two-dimensional array including the target user portrait and the generation time of the target user portrait, and store the two-dimensional array in the newly created linked list node.

12. The method according to claim 10, characterized in that Before sending the target user portrait to the electronic device used by the user, the method further includes: In the correspondence between the user identifier and the user node recorded in the portrait node, determine the user node corresponding to the target user identifier, and obtain the user node of the target user; In the correspondence between the user portrait recorded in the user node of the target user and the linked list node, determining the linked list node corresponding to the target user portrait; The target user portrait is obtained from the determined linked list node.

13. A user portrait management device, characterized in that: The device comprises: an extraction module, configured to, after receiving a use request for a target user portrait of a target user, extract a user identifier of a user carried in the use request as a user identifier, and extract a use summary carried in the use request; wherein the use summary indicates a use scenario in which the user obtains the target user portrait; An acquisition module, used to acquire an authorization list and an authorization summary of the target user for the target user portrait; wherein the authorization list includes the user identifiers of each user authorized by the target user to use the target user portrait; and the authorization summary indicates a usage scenario in which the target user authorizes the use of the target user portrait; A usage right judgment module, used to judge whether the user has the right to use the target user portrait based on the user identification, the usage summary, the authorization list and the authorization summary; an alarm message sending module, configured to send an alarm message to an electronic device used by the target user if the user does not have the right to use the target user portrait, so as to remind the target user of the user's request to use the target user portrait; A user portrait sending module, configured to send the target user portrait to an electronic device used by the user if the user has the right to use the target user portrait; Wherein, the usage right judgment module is specifically used to: judge whether the authorization list contains the user identifier; if the authorization list does not contain the user identifier, determine that the user does not have the right to use the target user portrait; if the authorization list contains the user identifier, calculate the difference value between the usage summary and the authorization summary; if the difference value is greater than a preset threshold, determine that the user does not have the right to use the target user portrait; if the difference value is not greater than the preset threshold, determine that the user has the right to use the target user portrait; The difference value between the usage summary and the authorization summary is determined based on the matching degree corresponding to each string contained in the usage summary and the number of strings contained in the usage summary. The matching degree corresponding to each string contained in the usage summary is the degree of difference between each string and the authorization summary.

14. The device according to claim 13, characterized in that The usage right judgment module is specifically used to extract continuous character strings of a first preset length from the usage summary to obtain the character strings contained in the usage summary; For each extracted character string, if the authorization summary includes a character string that is identical to the character string, determining that the matching degree corresponding to the character string is a first value; If the authorization summary does not contain a character string identical to the character string, extract a continuous character string of a second preset length from the character string to obtain each substring contained in the character string; for each substring contained in the character string, if the authorization summary does not contain a character string identical to the substring, determine that the matching degree corresponding to the substring is a second value; if the authorization summary contains a character string identical to the substring, calculate the matching degree corresponding to the substring based on the number of characters contained in the substring, the number of characters contained in the character string, the number of characters contained in the authorization summary, and the number of occurrences of the character string identical to the substring in the authorization summary; Calculate the sum of the matching degrees corresponding to the substrings contained in the string, and calculate the ratio of the sum to the number of substrings contained in the string to obtain the matching degree corresponding to the string; Based on the matching degree corresponding to each character string included in the usage summary and the number of character strings included in the usage summary, a difference value between the usage summary and the authorization summary is calculated.

15. The device according to claim 13, characterized in that The device also includes: a portrait dimension determination module, configured to, after the extraction module receives a use request for a target user portrait of a target user, extract the user identifier of the user carried in the use request as the user identifier, and before extracting the use summary carried in the use request, determine the portrait dimension corresponding to the target user based on the user information of the target user as the target portrait dimension; An initial user portrait generating module, configured to generate a user portrait of the target user in the target portrait dimension based on the user data of the target user in the target portrait dimension as the initial user portrait; The target user portrait generation module is used to generate a final user portrait of the target user based on the initial user portrait as the target user portrait.

16. The device according to claim 15, characterized in that The target user portrait generation module is specifically used to calculate the time weight of the initial user portrait based on the duration of the target time period corresponding to the user data of the target user and the duration between the first time when the target user has a user behavior and the last time when the target user has a user behavior within the target time period; The calculated time weight and the initial user portrait are determined as the final user portrait of the target user, which serves as the target user portrait.

17. The device according to claim 16, characterized in that The target user portrait generation module is specifically used to determine whether a user portrait of the target user in the target portrait dimension has been generated before generating the initial user portrait; If a user profile of the target user in the target profile dimension has not been generated before the initial user profile is generated, the time weight of the initial user profile is calculated based on the duration of the target time period corresponding to the user data of the target user and the duration between the first time the target user has a user behavior and the last time the target user has a user behavior within the target time period; If a user portrait of the target user in the target portrait dimension has been generated before generating the initial user portrait, obtaining the time weight of each user portrait of the target user in the target portrait dimension that has been generated; According to the order of generation time of the user portraits, determine the time weight at the inflection point in the change trend of the time weight of the user portraits as the target time weight; The time weight of the initial user portrait is calculated based on the target time weight, the number of time weights of each user portrait, the length of the target time period corresponding to the user data of the target user, and the length of time between the first and last time the target user has a user behavior within the target time period.

18. The device according to claim 17, characterized in that The target user portrait generation module is specifically used to calculate the reference time weight based on the duration of the target time period corresponding to the user data of the target user, the duration between the first time when the target user has a user behavior and the last time when the target user has a user behavior within the target time period, and the time weight of the first user portrait among the user portraits according to the order of generation time of the user portraits; If the reference time weight is not less than a third value, and according to the chronological order of the generation times of the user portraits, the time weight from the first user portrait among the user portraits to the target time weight is an upward trend, the time weight of the initial user portrait is calculated based on the length of the target time period corresponding to the user data of the target user, the length of time between the first time when the target user has a user behavior and the last time when the target user has a user behavior within the target time period, the number of the user portraits, and the number of time weights from the time weight of the first user portrait among the user portraits to the target time weight according to the chronological order of the generation times of the user portraits; If the reference time weight is not less than the third value, and in the order of the generation time of the user portraits, the time weight from the first user portrait among the user portraits to the target time weight is in a downward trend, the time weight of the initial user portrait is calculated based on the time length between the moment when the target user first has a user behavior and the moment when the target user has last had a user behavior within the target time period, the length of the target time period corresponding to the user data of the target user, and the difference with the largest absolute value among the differences between two adjacent time weights among the time weights of the user portraits; If the reference time weight is less than the third value, and according to the chronological order of the generation times of the user portraits, the time weight from the first user portrait among the user portraits to the target time weight is in a downward trend, the time weight of the initial user portrait is calculated based on the duration of the target time period corresponding to the user data of the target user, the duration between the moment when the target user first has a user behavior and the moment when the target user has a last user behavior within the target time period, the number of the user portraits, and the number of time weights from the time weight of the first user portrait among the user portraits to the target time weight according to the chronological order of the generation times of the user portraits; If the reference time weight is less than the third value, and there is an upward trend from the time weight of the first user portrait among the user portraits to the target time weight in the order of the generation time of the user portraits, the time weight of the initial user portrait is calculated based on the duration between the first and last user behaviors of the target user within the target time period, the duration of the target time period corresponding to the user data of the target user, and the difference with the largest absolute value among the differences between two adjacent time weights in the time weights of the user portraits.

19. The device according to claim 15, characterized in that The device also includes: A DID generation module is used to generate a final user portrait of the target user based on the initial user portrait in the target user portrait generation module, and then generate a DID of the target user as a target DID according to a preset decentralized identity identifier DID generation rule and the user information of the target user; A user identification generation module, configured to generate a user identification of the target user as a target user identification based on the generation time of the designated user portrait of the target user, the number of the target user and the target DID; The recording module is used to record the target user identifier and the target user portrait accordingly.

20. The device according to claim 19, characterized in that The user identification generation module is specifically used to perform hash processing on the generation time of the designated user portrait of the target user to obtain the hash value of the generation time of the designated user portrait, and to perform hash processing on the number of the target user to obtain the hash value of the number of the target user; Concatenate the hash value of the generation time of the designated user portrait and the hash value of the target user's ID to obtain a hash value string; Based on the hash value string and the target DID, a user identifier of the target user is generated as the target user identifier.

21. The device according to claim 20, characterized in that The user identification generation module is specifically configured to, if the number of characters included in the hash value string is not greater than the number of characters included in the target DID, determine, for each character in the hash value string, the position of the character in the hash value string according to the arrangement order of the characters included in the hash value string from high to low; determine, according to the arrangement order of the characters included in the target DID from high to low, the character in the target DID that is at the same position as the character, and obtain the character corresponding to the character in the target DID; Calculate the remainder of the character and the corresponding character in the target DID to obtain the user ID of the target user as the target user ID; If the number of characters included in the hash value string is greater than the number of characters included in the target DID, according to the order of the characters included in the hash value string from high to low, determine the character that exists in the corresponding position in the target DID as the first character, and determine the other characters in the hash value string except the first character as the second character; for each character in the target DID, count the number of occurrences of the character; For each first character, determine the position of the first character in the hash value string according to the order of the characters contained in the hash value string from high to low; determine the character in the target DID that has the same position as the first character according to the order of the characters contained in the target DID from high to low, and obtain the character corresponding to the first character in the target DID; Calculate the remainder of the first character and the corresponding character in the target DID as a first remainder; For each second character, determine the position of the second character in the hash value string according to the order of the characters contained in the hash value string from low to high; determine the character in the same position as the second character in the corresponding sorting result according to the order of the number of occurrences of the characters contained in the target DID from high to low, and obtain the character corresponding to the second character in the target DID; The remainder between the second character and the character corresponding to the target DID is calculated to obtain a second remainder; and a user identifier of the target user including the first remainder and the second remainder is generated as a target user identifier.

22. The device according to claim 19, characterized in that The recording module is specifically used to determine whether the corresponding relationship between the user identifier stored in the portrait node and the user node contains the target user identifier; wherein the portrait node is the head node of the preset user blockchain; the user node is the non-head node of the user blockchain; a user node is used to store the user information of the corresponding user; If the target user identifier is included in the corresponding relationship, determine the user node corresponding to the target user identifier, and obtain the user node of the target user; create a new linked list node after the last linked list node of the portrait blockchain with the user node of the target user as the head node, and store the target user portrait in the newly created linked list node; If the target user identifier is not included in the corresponding relationship, a new user node is created after the last user node of the user blockchain as the user node of the target user, and the target user identifier and the user node of the target user are recorded correspondingly in the corresponding relationship; a new portrait blockchain is created with the user node of the target user as the head node; wherein the newly created portrait blockchain includes a newly created linked list node in addition to the head node; and the target user portrait is stored in the newly created linked list node.

23. The device according to claim 22, characterized in that The recording module is specifically used to generate a two-dimensional array including the target user portrait and the generation time of the target user portrait, and store the two-dimensional array in the newly created linked list node.

24. The device according to claim 22, characterized in that The device also includes: A user node determination module is used to determine the user node corresponding to the target user identifier in the correspondence between the user identifier and the user node recorded in the portrait node, and obtain the user node of the target user, before the user portrait sending module executes sending the target user portrait to the electronic device used by the user; A linked list node determination module, used to determine the linked list node corresponding to the target user portrait in the correspondence between the user portrait recorded in the user node of the target user and the linked list nodes; The user portrait acquisition module is used to acquire the target user portrait from the determined linked list node.

25. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1-12 when executing a program stored in a memory.

26. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 12 are implemented.