Preference setting method and device for user interface, electronic equipment and storage medium

Through machine learning algorithms and Redis caching mechanism, the preference settings of the user interface are dynamically adjusted, solving the problem that the user interface preference settings cannot be dynamically adjusted in the existing technology, and achieving the effect of personalized experience and rapid updates.

CN119718503AInactive Publication Date: 2025-03-28北京领雁科技股份有限公司
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411592304.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-08
Publication Date
2025-03-28
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art cannot dynamically adjust the preferences of the user interface according to changes in user behavior, resulting in limited personalized experience.

Method used

Machine learning algorithms are used to automatically identify and adjust user preferences, combine Redis caching mechanism to improve data reading speed, reduce database query times, and provide personalized services through user behavior analysis.

Benefits of technology

It realizes a personalized experience of the user interface, ensures rapid loading and updating of user settings, and provides more efficient services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119718503A_ABST
    Figure CN119718503A_ABST
Patent Text Reader

Abstract

The invention provides a preference setting method and device for a user interface, electronic equipment and a storage medium. The method comprises the steps that whether target preference setting information of a user for the user interface exists in a Redis cache or not is detected based on account information of the user; if the target preference setting information exists in the Redis cache, loading the target preference setting information in the Redis cache, and setting the user interface based on the target preference setting information; if the target preference setting information does not exist, searching whether the target preference setting information exists in a configuration table of a database based on the account information of the user, and if the target preference setting information does not exist in the configuration table, monitoring an interaction behavior between the user and the user interface, and determining interaction behavior data of the user; and inputting the interactive behavior data into the pre-trained preference setting recommendation model, processing the interactive behavior data based on a collaborative filtering algorithm and a decision tree algorithm, and determining recommendation preference setting information, thereby realizing personalized user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] The existing technology mainly focuses on using blueprint files to store user interface layout information to synchronize user preferences across devices and applications. Users can access these blueprint files through different applications to generate user interfaces that meet their preferences. However, relying on fixed blueprint files, it is impossible to dynamically adjust settings according to changes in user behavior, and it is impossible to adjust preference settings in real time according to user usage behavior, which limits the personalized experience. Therefore, how to set preferences for the user interface has become a technical issue that cannot be underestimated. Summary of the invention

[0003] In view of this, the purpose of this application is to provide a preference setting method, device, electronic device and storage medium for the user interface, which uses machine learning algorithms to automatically identify and adjust user preference settings to achieve personalized user experience, adopts Redis cache mechanism to improve data reading speed, reduce the number of database queries, ensure the fast loading and updating of user settings, and comprehensively analyze user usage habits through user behavior to provide more efficient services.

[0004] The present application embodiment provides a preference setting method for a user interface, the preference setting method comprising:

[0005] Based on the user's account information, detecting whether there is target preference setting information of the user for the user interface in the Redis cache;

[0006] If so, loading the target preference setting information into the Redis cache, and setting the user interface based on the target preference setting information;

[0007] If not, searching the configuration table of the database based on the user's account information to see whether the target preference setting information exists; if the target preference setting information does not exist in the configuration table, monitoring the interaction between the user and the user interface to determine the interaction behavior data of the user;

[0008] The interactive behavior data is input into a pre-trained preference setting recommendation model, and the interactive behavior data is processed based on a collaborative filtering algorithm and a decision tree algorithm to determine recommended preference setting information, so that the user interface is set based on the recommended preference setting information.

[0009] In a possible implementation manner, monitoring the interaction behavior of the user with the user interface to determine the interaction behavior data of the user includes:

[0010] Detecting whether the user's interactive behavior triggers a preset event listener; wherein the interactive behavior includes a drag bar for adjusting column width and an input box for modifying layout;

[0011] If not, then no queue record is performed for the interactive behavior data corresponding to the interactive behavior;

[0012] If so, queue recording the interactive behavior data corresponding to the interactive behavior based on the processing function corresponding to the event listener;

[0013] When the amount of interaction behavior data in the queue is equal to a preset amount, the interaction behavior data is sent to the behavior log table of the database through an API interface for storage.

[0014] In a possible implementation manner, the inputting the interaction behavior data into a pre-trained preference setting recommendation model, processing the interaction behavior data based on a collaborative filtering algorithm and a decision tree algorithm, and determining recommended preference setting information includes:

[0015] Performing data preprocessing and feature engineering processing on the interactive behavior data to determine behavioral feature information of the interactive behavior data;

[0016] Classify the behavior feature information based on the decision tree algorithm to determine a plurality of reference behavior feature information in the database that are of the same category as the behavior feature information;

[0017] Processing the behavior feature information and the reference behavior feature information based on the collaborative filtering algorithm to determine the similarity between the behavior feature information and each of the reference behavior feature information;

[0018] The reference preference setting information of the reference behavior feature information corresponding to the similarity greater than a preset threshold is used as the recommended preference setting information.

[0019] In a possible implementation manner, the preference setting recommendation model is determined by the following steps:

[0020] Inputting the preprocessed sample behavior feature information into the neural network model, processing the sample behavior feature information based on the collaborative filtering algorithm and the decision tree algorithm, and determining the predicted preference setting information corresponding to the sample behavior feature information;

[0021] Determining the recall rate, precision and F1 score of the neural network model based on the predicted preference setting information and the actual preference setting information of the sample behavior feature information;

[0022] The network parameters of the neural network model are adjusted based on the recall rate, the precision and the F1 score, and the parameter adjustment of the neural network model is stopped until the recall rate, the precision and the F1 score meet the preset evaluation criteria to determine the preference setting recommendation model.

[0023] In a possible implementation manner, after the interaction behavior data is input into a pre-trained preference setting recommendation model, the interaction behavior data is processed based on a collaborative filtering algorithm and a decision tree algorithm to determine recommended preference setting information, so that the user interface is set based on the recommended preference setting information, the preference setting method further includes:

[0024] The recommendation preference setting information and the user's account information are synchronously updated to the Redis cache and the database.

[0025] In a possible implementation manner, after searching in a configuration table of a database based on the user's account information whether the target preference setting information exists, the preference setting method further includes:

[0026] If the target preference setting information exists in the database, the target preference setting information is obtained from the database, and the user interface is set based on the target preference setting information.

[0027] In a possible implementation manner, the setting the user interface based on the target preference setting information includes:

[0028] The target preference setting information is obtained based on an API interface, and the element information of the user interface is updated in real time based on the target preference setting information to generate a customized user interface.

[0029] The embodiment of the present application further provides a preference setting device for a user interface, the preference setting device comprising:

[0030] A detection module, used to detect whether the user's target preference setting information for the user interface exists in the Redis cache based on the user's account information;

[0031] A Redis cache loading module, configured to load the target preference setting information into the Redis cache if it exists, and set the user interface based on the target preference setting information;

[0032] a behavior data collection module, configured to search the configuration table of the database for the target preference setting information based on the user's account information if the target preference setting information does not exist, and to monitor the interaction between the user and the user interface to determine the interaction behavior data of the user if the target preference setting information does not exist in the configuration table;

[0033] The intelligent recommendation module is used to input the interactive behavior data into a pre-trained preference setting recommendation model, process the interactive behavior data based on a collaborative filtering algorithm and a decision tree algorithm, and determine recommended preference setting information so as to set the user interface based on the recommended preference setting information.

[0034] An embodiment of the present application also provides an electronic device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the preference setting method for the user interface as described above are performed.

[0035] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned method for setting preferences for a user interface are executed.

[0036] The embodiment of the present application provides a method, device, electronic device and storage medium for setting preferences for a user interface. The method includes: detecting whether the user's target preference setting information for the user interface exists in the Redis cache based on the user's account information; if it exists, loading the target preference setting information in the Redis cache, and setting the user interface based on the target preference setting information; if it does not exist, searching the configuration table of the database based on the user's account information to find whether the target preference setting information exists; if the target preference setting information does not exist in the configuration table, monitoring the interaction between the user and the user interface to determine the user's interaction behavior data; inputting the interaction behavior data into a pre-trained preference setting recommendation model, processing the interaction behavior data based on a collaborative filtering algorithm and a decision tree algorithm, determining the recommended preference setting information, so that the user interface is set based on the recommended preference setting information. The machine learning algorithm is used to automatically identify and adjust user preferences to achieve a personalized user experience, and the Redis cache mechanism is used to improve the data reading speed, reduce the number of database queries, ensure the rapid loading and updating of user settings, and comprehensively analyze the user's usage habits through user behavior to provide more efficient services.

[0037] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0039] Figure 1 A flowchart of a method for setting preferences for a user interface provided in an embodiment of the present application;

[0040] Figure 2 A schematic diagram of training a preference setting recommendation model provided in an embodiment of the present application;

[0041] Figure 3 One of the structural schematic diagrams of a preference setting device for a user interface provided in an embodiment of the present application;

[0042] Figure 4 A second structural diagram of a preference setting device for a user interface provided in an embodiment of the present application;

[0043] Figure 5 A schematic structural diagram of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0044] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application usually described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, each other embodiment obtained by those skilled in the art without making creative work belongs to the scope of protection of the present application.

[0045] First, the application scenarios to which the present application is applicable are introduced. The present application can be applied in the field of information processing technology.

[0046] After research, it was found that the existing technology mainly focuses on using blueprint files to store user interface layout information to synchronize user preference settings across devices and applications. Users can access these blueprint files through different applications to generate user interfaces that meet their preferences. However, relying on fixed blueprint files, it is impossible to dynamically adjust settings according to changes in user behavior, and it is impossible to adjust preference settings in real time according to user usage behavior, which limits the personalized experience. Therefore, how to set preferences for the user interface has become a technical issue that cannot be underestimated.

[0047] Based on this, the embodiment of the present application provides a preference setting method for the user interface, which uses a machine learning algorithm to automatically identify and adjust user preference settings to achieve a personalized user experience, adopts a Redis cache mechanism to improve data reading speed, reduce the number of database queries, ensure fast loading and updating of user settings, and comprehensively analyze user usage habits through user behavior to provide more efficient services.

[0048] See also Figure 1 , Figure 1 The present invention provides a flowchart of a method for setting preferences for a user interface. Figure 1 As shown in , the preference setting method provided in the embodiment of the present application includes:

[0049] S101: Detecting whether there is target preference setting information of the user for the user interface in the Redis cache based on the user's account information.

[0050] In this step, it is detected whether there is user target preference setting information for the user interface in the Redis cache according to the user's account information.

[0051] The preference setting information is information that the user wants the user interface to be configured according to his or her own preferences during use. The preference setting information may include page layout, font size, color theme, and shortcut key configuration.

[0052] S102: If it exists, load the target preference setting information into the Redis cache, and set the user interface based on the target preference setting information.

[0053] In this step, if it exists, the target preference setting information is loaded into the Redis cache, and the user interface is set based on the target preference setting information.

[0054] In a possible implementation manner, the setting the user interface based on the target preference setting information includes:

[0055] The target preference setting information is obtained based on an API interface, and the element information of the user interface is updated in real time based on the target preference setting information to generate a customized user interface.

[0056] Here, the front end uses a preset API interface to obtain target preference setting information, and uses the target preference setting information to update the element information of the user interface in real time to generate a customized user interface.

[0057] Specifically, the state hook is used to manage user preferences. When the component is loaded, the API for obtaining user preferences is called. When the user adjusts the column width through the input box, the state is updated to the new value. After clicking the "Save" button, a POST request is sent to update the settings. The page elements are adjusted in real time according to the user preferences, and the CSS properties are modified through the DOM API (Document Object Model Application Programming Interface) to ensure that the user sees the customized interface.

[0058] S103: If not, search the configuration table of the database based on the user's account information to see whether the target preference setting information exists; if the target preference setting information does not exist in the configuration table, monitor the interaction between the user and the user interface to determine the user's interaction behavior data.

[0059] In this step, if the target preference setting information does not exist in the Redis cache, the user's account information is used to search the configuration table of the database to see if there is target preference setting information. If the target preference setting information does not exist in the configuration table, the user's interaction behavior with the user interface is monitored to determine the user's interaction behavior data.

[0060] Here, the database includes user tables, configuration tables, and behavior log tables. The user table (`users`) stores basic user information, such as `user_id`, user name, and email address, to ensure that each user has a unique identifier. The configuration table (`user_preferences`) stores the user's personalized preferences, including column width, page layout, etc., and is associated with the user table through `user_id`. The behavior log table (`user_actions`) records the user's behavior in the application, including `user_id`, operation type, timestamp, and setting value, for subsequent data analysis.

[0061] Among them, interactive behavior data records the user's interactive behavior during the use of the application, which is used to analyze user habits and generate recommendations. Interactive behavior data includes adjusting the size of column widths, modifying layouts, etc. For example, if a user adjusts the column width on a page, the time and specific value of this operation are recorded.

[0062] In a possible implementation manner, monitoring the interaction behavior of the user with the user interface to determine the interaction behavior data of the user includes:

[0063] A: Detect whether the user's interactive behavior triggers a pre-set event listener; wherein the interactive behavior includes a drag bar for adjusting the column width and an input box for modifying the layout.

[0064] Here, event listeners are added in the Vue.js component for user interactions, such as drag bars for adjusting column widths and input boxes for modifying layouts.

[0065] B: If not, then the interactive behavior data corresponding to the interactive behavior is not queued and recorded; if so, then the interactive behavior data corresponding to the interactive behavior is queued and recorded based on the processing function corresponding to the event listener.

[0066] Here, if not, the interactive behavior data corresponding to the interactive behavior is not queued and recorded; if yes, the interactive behavior data corresponding to the interactive behavior is queued and recorded using the processing function corresponding to the event listener.

[0067] C: When the amount of interactive behavior data in the queue is equal to a preset amount, the interactive behavior data is sent to the behavior log table of the database through an API interface for storage.

[0068] Here, when the amount of interactive behavior data in the queue is equal to a preset amount, the interactive behavior data is sent to the behavior log table of the database through the API interface for storage.

[0069] In a specific embodiment, in a Vue.js component, event listeners are added to elements with user interaction (such as a drag bar for adjusting column width and an input box for modifying layout). When a user performs a specific operation, the listener will trigger the corresponding processing function. In the processing function, the user's operation type (such as "adjust column width" or "modify layout") and its corresponding value (such as new column width or layout settings) are recorded, and the interactive behavior data is received using an API interface. A database table named `user_actions` is designed to store user operation records. The table includes fields such as user ID, operation type, operation value, and timestamp for subsequent analysis and query. In order to improve performance, a queue is implemented on the front end to record user operations. When a certain number of operation records are accumulated, these data are sent to the back end in batches to reduce the frequency of network requests. WebSocket or long polling technology is used to ensure that changes in user behavior can be fed back to the back end in real time, and a real-time data monitoring mechanism is implemented to further enhance the user experience.

[0070] S104: Input the interaction behavior data into a pre-trained preference setting recommendation model, process the interaction behavior data based on a collaborative filtering algorithm and a decision tree algorithm, determine recommended preference setting information, and set the user interface based on the recommended preference setting information.

[0071] In this step, the interactive behavior data is input into the preference setting recommendation model, and the interactive behavior data is processed using a collaborative filtering algorithm and a decision tree algorithm to determine recommended preference setting information, so that the user interface is set using the recommended preference setting information.

[0072] In this application, through intelligent user behavior analysis, the system can learn and remember the user's personalized operating habits (such as adjusting column width, layout, etc.), and automatically apply these preference settings when the user uses the system again, improving the user experience. The system does not rely on manual settings by the user, and can automatically optimize the interface layout and interaction method through data mining, reducing the user's operating burden.

[0073] In a possible implementation manner, the inputting the interaction behavior data into a pre-trained preference setting recommendation model, processing the interaction behavior data based on a collaborative filtering algorithm and a decision tree algorithm, and determining recommended preference setting information includes:

[0074] a: Perform data preprocessing and feature engineering processing on the interactive behavior data to determine behavioral feature information of the interactive behavior data.

[0075] Here, data preprocessing and feature engineering processing are performed on the interactive behavior data to determine the behavioral feature information of the interactive behavior data.

[0076] Among them, data preprocessing includes missing value processing, duplicate record processing and outlier detection processing to ensure the accuracy and validity of the data.

[0077] Feature engineering involves converting user behavior data into a format suitable for model training. For example, the operation type can be converted into a numerical feature, and time features (such as the hour of the day) can be extracted based on the timestamp to reflect the user's usage habits.

[0078] b: Classify the behavior feature information based on the decision tree algorithm to determine a plurality of reference behavior feature information in the database that are of the same category as the behavior feature information.

[0079] Here, the behavior feature information is classified using a decision tree algorithm to determine a plurality of reference behavior feature information in the database that are of the same category as the behavior feature information.

[0080] c: Processing the behavior feature information and the reference behavior feature information based on the collaborative filtering algorithm to determine the similarity between the behavior feature information and each of the reference behavior feature information.

[0081] Here, the behavior feature information and the reference behavior feature information are processed using a collaborative filtering algorithm to determine the similarity between the behavior feature information and each reference behavior feature information.

[0082] d: taking the reference preference setting information of the reference behavior feature information corresponding to the similarity greater than a preset threshold as the recommended preference setting information.

[0083] Here, the reference preference setting information of the reference behavior feature information corresponding to the similarity greater than a preset threshold is used as the recommended preference setting information.

[0084] In this application, a scheduled task can be used (regularly extracting interactive behavior data from the `user_actions` table of the database, and an appropriate time interval can be selected to obtain it to ensure that the data is updated in a timely manner.

[0085] In this application, through collaborative filtering and decision tree and other machine learning algorithms, the user's behavior data can be analyzed in real time and personalized recommendation results can be generated. Intelligent recommendation based on user operation data not only improves the user experience, but also can continuously learn and optimize according to the constantly updated behavior data to ensure the accuracy and personalization of the recommendation results.

[0086] In a possible implementation manner, the preference setting recommendation model is determined by the following steps:

[0087] (1): The preprocessed sample behavior feature information is input into the neural network model, and the sample behavior feature information is processed based on the collaborative filtering algorithm and the decision tree algorithm to determine the predicted preference setting information corresponding to the sample behavior feature information.

[0088] Here, the preprocessed sample behavior feature information is input into the neural network model, and the sample behavior feature information is processed using the collaborative filtering algorithm and the decision tree algorithm to determine the prediction preference setting information corresponding to the sample behavior feature information.

[0089] (2): Based on the predicted preference setting information and the actual preference setting information of the sample behavior feature information, the recall rate, precision and F1 score of the neural network model are determined.

[0090] Here, the recall, precision and F1 score of the neural network model are determined using the predicted preference information and the actual preference information of the sample behavior feature information.

[0091] (3): Adjust the network parameters of the neural network model based on the recall rate, the precision and the F1 score, and stop adjusting the parameters of the neural network model when the recall rate, the precision and the F1 score meet the preset evaluation criteria, so as to determine the preference setting recommendation model.

[0092] Here, the recall rate, precision and F1 score are used to adjust the network parameters of the neural network model until the recall rate, precision and F1 score meet the preset evaluation criteria, then the parameter adjustment of the neural network model is stopped to determine the preference setting recommendation model.

[0093] For further information, see Figure 2 , Figure 2 This is a schematic diagram of the training of the preference setting recommendation model provided in the embodiment of the present application. Figure 2 As shown in the figure, a scheduled task is used to regularly extract sample interaction behavior data from the `user_actions` table of the database, and the sample interaction behavior data is preprocessed and feature engineered to obtain sample behavior feature information. The model is trained using machine learning algorithms and sample behavior feature information, and the performance of the model is evaluated on the test set, using common evaluation indicators such as accuracy, recall, and F1 value. Check whether the model meets the performance requirements. If so, the model is integrated and stored. If not, the hyperparameters are adjusted to continue model training. The saved model is loaded into the backend service, and when the user requests their preference settings, personalized recommendations are provided in real time by calling the `predict` method of the model. Repeat the above steps regularly, and retrain the model with newly collected user behavior data to ensure continuous learning and optimization of the recommendation system.

[0094] In a possible implementation manner, after the interaction behavior data is input into a pre-trained preference setting recommendation model, the interaction behavior data is processed based on a collaborative filtering algorithm and a decision tree algorithm to determine recommended preference setting information, so that the user interface is set based on the recommended preference setting information, the preference setting method further includes:

[0095] The recommendation preference setting information and the user's account information are synchronously updated to the Redis cache and the database.

[0096] Here, after returning the recommendation results, the recommendation results are also updated to the Redis cache, using the Redis set method to ensure that they are obtained from Redis first the next time a request is made. You can also set the TTL (Time To Live) of the Redis cache to ensure the timeliness of the cached data. In addition, after recording new user behavior, you can clear the old cache to ensure the accuracy of the recommendation. If the user makes a setting change on the interface, the Redis cache is updated immediately after the update operation to ensure that the user interface is consistent with the database.

[0097] In this application, by introducing the Redis cache mechanism, user preference settings and recommendation data can be quickly read and written and updated in real time, which greatly reduces the frequency of database queries and improves the response speed of the system. At the same time, the use of technical means such as batch processing and WebSocket reduces the frequency of network requests and further improves the efficiency of data processing.

[0098] In this application, the user's preferences and recommendation data are synchronized in the front-end, back-end and cache. Each user operation will immediately update the cache and database to ensure that the user interface is consistent with the back-end data, avoiding data inconsistency issues and improving the stability and reliability of the system.

[0099] In a possible implementation manner, after searching in a configuration table of a database based on the user's account information whether the target preference setting information exists, the preference setting method further includes:

[0100] If the target preference setting information exists in the database, the target preference setting information is obtained from the database, and the user interface is set based on the target preference setting information.

[0101] Here, if the target preference setting information exists in the database, the target preference setting information is obtained from the database, and the user interface is set using the target preference setting information.

[0102] In a specific embodiment, the user's account information is first used to detect whether the user's preference setting information exists in the Redis cache. If so, the preference setting information is loaded into the Redis cache. If not, the user's account information is used to search the configuration table of the database for the preference setting information. If the target preference setting information exists in the database, the target preference setting information is obtained from the database. If the preference setting information does not exist in the configuration table, the interaction between the user and the user interface is monitored to determine the user's interaction behavior data; the interaction behavior data is input into a pre-trained preference setting recommendation model, and the interaction behavior data is processed using a collaborative filtering algorithm and a decision tree algorithm to determine the recommended preference setting information.

[0103] The embodiment of the present application provides a preference setting method for a user interface, the preference setting method comprising: detecting whether the target preference setting information of the user for the user interface exists in the Redis cache based on the user's account information; if it exists, loading the target preference setting information in the Redis cache, and setting the user interface based on the target preference setting information; if it does not exist, searching the configuration table of the database based on the user's account information to see whether the target preference setting information exists, and if the target preference setting information does not exist in the configuration table, monitoring the interaction between the user and the user interface to determine the interaction behavior data of the user; inputting the interaction behavior data into a pre-trained preference setting recommendation model, processing the interaction behavior data based on a collaborative filtering algorithm and a decision tree algorithm, and determining the recommended preference setting information, so that the user interface is set based on the recommended preference setting information. The machine learning algorithm is used to automatically identify and adjust user preference settings to achieve a personalized user experience, the Redis cache mechanism is used to improve the data reading speed, reduce the number of database queries, ensure the rapid loading and updating of user settings, and comprehensively analyze the user's usage habits through user behavior to provide more efficient services.

[0104] See also Figure 3 , Figure 4 , Figure 3 One of the structural schematic diagrams of a preference setting device for a user interface provided in an embodiment of the present application; Figure 4 This is a second structural diagram of a preference setting device for a user interface provided in an embodiment of the present application. Figure 3 As shown in , the preference setting device 300 includes:

[0105] A detection module 310 is used to detect whether the user's target preference setting information for the user interface exists in the Redis cache based on the user's account information;

[0106] A Redis cache loading module 320, configured to load the target preference setting information into the Redis cache if it exists, and to set the user interface based on the target preference setting information;

[0107] The behavior data collection module 330 is used to search the configuration table of the database for the target preference setting information based on the user's account information if the target preference setting information does not exist, and if the target preference setting information does not exist in the configuration table, monitor the interaction behavior of the user with the user interface to determine the interaction behavior data of the user;

[0108] The intelligent recommendation module 340 is used to input the interaction behavior data into a pre-trained preference setting recommendation model, process the interaction behavior data based on a collaborative filtering algorithm and a decision tree algorithm, and determine recommended preference setting information so as to set the user interface based on the recommended preference setting information.

[0109] Furthermore, when the behavior data collection module 330 is used to monitor the interaction behavior of the user with the user interface and determine the interaction behavior data of the user, the behavior data collection module 330 is specifically used to:

[0110] Detecting whether the user's interactive behavior triggers a preset event listener; wherein the interactive behavior includes a drag bar for adjusting column width and an input box for modifying layout;

[0111] If not, then no queue record is performed for the interactive behavior data corresponding to the interactive behavior;

[0112] If so, queue recording the interactive behavior data corresponding to the interactive behavior based on the processing function corresponding to the event listener;

[0113] When the amount of interaction behavior data in the queue is equal to a preset amount, the interaction behavior data is sent to the behavior log table of the database through an API interface for storage.

[0114] Furthermore, when the intelligent recommendation module 340 is used to input the interaction behavior data into the pre-trained preference setting recommendation model, process the interaction behavior data based on the collaborative filtering algorithm and the decision tree algorithm, and determine the recommended preference setting information, the intelligent recommendation module 340 is specifically used to:

[0115] Performing data preprocessing and feature engineering processing on the interactive behavior data to determine behavioral feature information of the interactive behavior data;

[0116] Classify the behavior feature information based on the decision tree algorithm to determine a plurality of reference behavior feature information in the database that are of the same category as the behavior feature information;

[0117] Processing the behavior feature information and the reference behavior feature information based on the collaborative filtering algorithm to determine the similarity between the behavior feature information and each of the reference behavior feature information;

[0118] The reference preference setting information of the reference behavior feature information corresponding to the similarity greater than a preset threshold is used as the recommended preference setting information.

[0119] Further, such as Figure 4As shown, the preference setting device 300 further includes a model training module 350. The model training module 350 determines the preference setting recommendation model through the following steps:

[0120] Inputting the preprocessed sample behavior feature information into the neural network model, processing the sample behavior feature information based on the collaborative filtering algorithm and the decision tree algorithm, and determining the predicted preference setting information corresponding to the sample behavior feature information;

[0121] Determining the recall rate, precision and F1 score of the neural network model based on the predicted preference setting information and the actual preference setting information of the sample behavior feature information;

[0122] The network parameters of the neural network model are adjusted based on the recall rate, the precision and the F1 score, and the parameter adjustment of the neural network model is stopped until the recall rate, the precision and the F1 score meet the preset evaluation criteria to determine the preference setting recommendation model.

[0123] Further, such as Figure 4 As shown, the preference setting device 300 further includes a cache module 360, and the cache module 360 ​​is used to:

[0124] The recommendation preference setting information and the user's account information are synchronously updated to the Redis cache and the database.

[0125] Further, such as Figure 4 As shown, the preference setting device 300 further includes an interface setting module 370, and the interface setting module 370 is used to:

[0126] If the target preference setting information exists in the database, the target preference setting information is obtained from the database, and the user interface is set based on the target preference setting information.

[0127] Furthermore, the interface setting module 370 is also used for:

[0128] The target preference setting information is obtained based on an API interface, and the element information of the user interface is updated in real time based on the target preference setting information to generate a customized user interface.

[0129] An embodiment of the present application provides a preference setting device for a user interface, the preference setting device comprising: a detection module, for detecting whether the target preference setting information of the user for the user interface exists in the Redis cache based on the user's account information; a Redis cache loading module, for loading the target preference setting information into the Redis cache if the target preference setting information exists, and setting the user interface based on the target preference setting information; a behavior data collection module, for searching in a configuration table of a database based on the user's account information if the target preference setting information does not exist, and if the target preference setting information does not exist in the configuration table, monitoring the interaction between the user and the user interface to determine the interaction behavior data of the user; and an intelligent recommendation module, for inputting the interaction behavior data into a pre-trained preference setting recommendation model, processing the interaction behavior data based on a collaborative filtering algorithm and a decision tree algorithm, and determining recommended preference setting information, so that the user interface is set based on the recommended preference setting information. Use machine learning algorithms to automatically identify and adjust user preferences to achieve a personalized user experience. Use the Redis cache mechanism to increase data reading speed, reduce the number of database queries, ensure fast loading and updating of user settings, and comprehensively analyze user usage habits through user behavior to provide more efficient services.

[0130] See also Figure 5 , Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 5 As shown in , the electronic device 500 includes a processor 510 , a memory 520 and a bus 530 .

[0131] The memory 520 stores machine-readable instructions executable by the processor 510. When the electronic device 500 is running, the processor 510 communicates with the memory 520 via the bus 530. When the machine-readable instructions are executed by the processor 510, the above-mentioned Figure 1 as well as Figure 2 The specific implementation of the steps of the method for setting preferences for the user interface in the method embodiment shown can be found in the method embodiment, and will not be repeated here.

[0132] The present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the computer program can execute the above-mentioned Figure 1 as well as Figure 2 The specific implementation of the steps of the method for setting preferences for the user interface in the method embodiment shown can be found in the method embodiment, and will not be repeated here.

[0133] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0134] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.

[0135] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0136] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0137] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application can essentially be embodied in the form of a software product, or in other words, the part that contributes to the prior art or the part of the technical solution. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0138] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-mentioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A method for setting preferences for a user interface, characterized in that: The preference setting method comprises: Based on the user's account information, detecting whether there is target preference setting information of the user for the user interface in the Redis cache; If so, loading the target preference setting information into the Redis cache, and setting the user interface based on the target preference setting information; If not, searching the configuration table of the database based on the user's account information to see whether the target preference setting information exists; if the target preference setting information does not exist in the configuration table, monitoring the interaction between the user and the user interface to determine the interaction behavior data of the user; The interactive behavior data is input into a pre-trained preference setting recommendation model, and the interactive behavior data is processed based on a collaborative filtering algorithm and a decision tree algorithm to determine recommended preference setting information, so that the user interface is set based on the recommended preference setting information.

2. The preference setting method according to claim 1, characterized in that: The monitoring of the interaction behavior between the user and the user interface to determine the interaction behavior data of the user includes: Detecting whether the user's interactive behavior triggers a preset event listener; wherein the interactive behavior includes a drag bar for adjusting column width and an input box for modifying layout; If not, then no queue record is performed for the interactive behavior data corresponding to the interactive behavior; If so, queue recording the interactive behavior data corresponding to the interactive behavior based on the processing function corresponding to the event listener; When the amount of interaction behavior data in the queue is equal to a preset amount, the interaction behavior data is sent to the behavior log table of the database through an API interface for storage.

3. The preference setting method according to claim 1, characterized in that: The step of inputting the interaction behavior data into a pre-trained preference setting recommendation model, processing the interaction behavior data based on a collaborative filtering algorithm and a decision tree algorithm, and determining recommended preference setting information includes: Performing data preprocessing and feature engineering processing on the interactive behavior data to determine behavioral feature information of the interactive behavior data; Classify the behavior feature information based on the decision tree algorithm to determine a plurality of reference behavior feature information in the database that are of the same category as the behavior feature information; Processing the behavior feature information and the reference behavior feature information based on the collaborative filtering algorithm to determine the similarity between the behavior feature information and each of the reference behavior feature information; The reference preference setting information of the reference behavior feature information corresponding to the similarity greater than a preset threshold is used as the recommended preference setting information.

4. The preference setting method according to claim 1, characterized in that: The preference setting recommendation model is determined by the following steps: Inputting the preprocessed sample behavior feature information into the neural network model, processing the sample behavior feature information based on the collaborative filtering algorithm and the decision tree algorithm, and determining the predicted preference setting information corresponding to the sample behavior feature information; Determining the recall rate, precision and F1 score of the neural network model based on the predicted preference setting information and the actual preference setting information of the sample behavior feature information; The network parameters of the neural network model are adjusted based on the recall rate, the precision and the F1 score, and the parameter adjustment of the neural network model is stopped until the recall rate, the precision and the F1 score meet the preset evaluation criteria to determine the preference setting recommendation model.

5. The preference setting method according to claim 1, characterized in that: After the interaction behavior data is input into a pre-trained preference setting recommendation model, the interaction behavior data is processed based on a collaborative filtering algorithm and a decision tree algorithm to determine recommended preference setting information, so that the user interface is set based on the recommended preference setting information, the preference setting method further includes: The recommendation preference setting information and the user's account information are synchronously updated to the Redis cache and the database.

6. The preference setting method according to claim 1, characterized in that: After searching the configuration table of the database based on the user's account information to see whether the target preference setting information exists, the preference setting method further includes: If the target preference setting information exists in the database, the target preference setting information is obtained from the database, and the user interface is set based on the target preference setting information.

7. The preference setting method according to claim 1, characterized in that: The setting of the user interface based on the target preference setting information includes: The target preference setting information is obtained based on an API interface, and the element information of the user interface is updated in real time based on the target preference setting information to generate a customized user interface.

8. A preference setting device for a user interface, characterized in that: The preference setting device comprises: A detection module, used to detect whether the user's target preference setting information for the user interface exists in the Redis cache based on the user's account information; A Redis cache loading module, configured to load the target preference setting information into the Redis cache if it exists, and set the user interface based on the target preference setting information; a behavior data collection module, configured to search the configuration table of the database for the target preference setting information based on the user's account information if the target preference setting information does not exist, and to monitor the interaction between the user and the user interface to determine the interaction behavior data of the user if the target preference setting information does not exist in the configuration table; The intelligent recommendation module is used to input the interactive behavior data into a pre-trained preference setting recommendation model, process the interactive behavior data based on a collaborative filtering algorithm and a decision tree algorithm, and determine recommended preference setting information so as to set the user interface based on the recommended preference setting information.

9. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and the machine-readable instructions are executed by the processor to execute the steps of the preference setting method for the user interface as described in any one of claims 1 to 7.

10. 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 steps of the method for setting preferences for a user interface as claimed in any one of claims 1 to 7 are executed.

Citation Information

Patent Citations

  • Management system and method for multi-user customized interactive interface of CFD software

    CN113392627A

  • Page generation method and device, equipment and storage medium

    CN114218514A

  • Water drinking recommendation method and device, water dispenser and storage medium

    CN116913469A

  • On-screen price comparison system and device based on travel management platform, and medium

    CN118552285A

  • Interactive interface optimization method and device and storage medium

    CN118747054A