Page recommendation method and device, server and storage medium
By mapping user type to page recommendation strategy, personalized recommendation pages are automatically generated, solving the problems of high human resource consumption and low efficiency in existing technologies, and achieving efficient page recommendation.
Patent Information
- Application Number
- CN202111322741.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-09
- Publication Date
- 2026-01-27
- Estimated Expiration
- 2041-11-09
AI Technical Summary
Existing page recommendation methods result in high human resource consumption and slow page recommendation efficiency, mainly because a large amount of recommendation page code needs to be written for different types of users.
By receiving user type information and utilizing the mapping relationship between user type and page recommendation strategy, personalized recommendation pages can be automatically generated, reducing the waste of human resources and improving efficiency.
It enables the automatic generation of recommendation pages based on user type, reducing the waste of human resources, shortening the development cycle, and improving the efficiency of page recommendation.
Smart Images

Figure CN114003818B_ABST
Abstract
Description
Technical Field
[0001] This application relates to computer technology, and more particularly to a page recommendation method, apparatus, server, and storage medium. Background Technology
[0002] Operators can provide personalized recommendations to different user types to improve user experience. Currently, operators can achieve personalized recommendations by sending recommendation pages containing different content to the terminal devices used by different user types. The page recommendation strategy used to generate the recommendation page for each user type, as well as the corresponding metadata for that strategy, are all different.
[0003] In existing page recommendation methods, for any type of user, the page recommendation strategy used to generate the recommended page for that user type, and the metadata corresponding to the page recommendation strategy, are part of the code for that recommended page. In other words, for any type of user, developers need to write page code that includes "the page recommendation strategy for that user type, and the metadata corresponding to the page recommendation strategy."
[0004] However, when there are many types of users, developers need to write a lot of code for the recommendation pages, which leads to a large consumption of human resources and slow page recommendation efficiency. Summary of the Invention
[0005] This application provides a page recommendation method, apparatus, server, and storage medium to solve the problems of high human resource consumption and slow page recommendation efficiency caused by existing page recommendation methods.
[0006] Firstly, this application provides a page recommendation method, which is applied to a first server in a server cluster, and the method includes:
[0007] Receive a page recommendation request triggered by a first user through a first terminal device; the page recommendation request carries first information, which is used to indicate the type of the first user;
[0008] Based on the type of the first user indicated by the first information, and the mapping relationship between the user type and the page recommendation strategy, the first page recommendation strategy corresponding to the first user is obtained; the first page recommendation strategy is used to generate the first recommendation page;
[0009] The first recommendation page is generated based on the recommendation strategy of the first page;
[0010] Send the access address of the first recommended page to the first terminal device.
[0011] Optionally, there may be multiple recommendation strategies for the first page corresponding to the first user;
[0012] The step of generating the first recommended page according to the first page recommendation strategy includes:
[0013] According to each first page recommendation strategy, the metadata corresponding to each first page recommendation strategy is obtained from the first database. The metadata is used to generate the recommendation page indicated by the corresponding first page recommendation strategy.
[0014] Based on the metadata corresponding to each first-page recommendation strategy, generate the recommendation page corresponding to each first-page recommendation strategy;
[0015] The first recommended page is determined from the recommended pages corresponding to each first-page recommendation strategy.
[0016] Optionally, generating the recommended page corresponding to each first page recommendation strategy based on the metadata corresponding to each first page recommendation strategy includes:
[0017] For any first-page recommendation strategy, the metadata corresponding to the first-page recommendation strategy is parsed and processed to obtain the page display information described by each metadata.
[0018] According to the preset page rendering rules, the parsed page display information is rendered to obtain the recommended page corresponding to the first page recommendation strategy.
[0019] Optionally, the page recommendation request is triggered by the first user through the user interface of the first application on the first terminal device, and the page recommendation request also carries the identifier of the first application;
[0020] The step of determining the first recommended page from the recommended pages corresponding to each first page recommendation strategy includes:
[0021] The recommended page that matches the first application among the recommended pages corresponding to each first page recommendation strategy is taken as the first recommended page.
[0022] Optionally, there may be multiple recommendation strategies for the first page corresponding to the first user;
[0023] The step of generating the first recommended page according to the first page recommendation strategy includes:
[0024] Determine the target page recommendation strategy from multiple first-page recommendation strategies;
[0025] Based on the target page recommendation strategy, obtain the metadata corresponding to the target page recommendation strategy from the first database;
[0026] The first recommended page is generated based on the metadata corresponding to the target page recommendation strategy.
[0027] Optionally, the method further includes:
[0028] Obtain an update request triggered by a second user through a second terminal device, the update request being used to update metadata;
[0029] Update the metadata in the first database according to the update request.
[0030] Optionally, updating the metadata in the first database according to the update request includes:
[0031] Receive the update request from the second terminal device;
[0032] The step of updating the metadata in the first database according to the update request includes:
[0033] According to the update request, update the metadata in the second database; the second database is a backup database of the first database;
[0034] The update request is broadcast to a second server in the server cluster other than the first server, and the metadata in the first database is updated.
[0035] Optionally, after updating the metadata in the first database according to the update request, the method further includes:
[0036] An update response is sent to the second terminal device, the update response indicating that the metadata update is complete.
[0037] Secondly, this application provides a page recommendation device, which is applied to a first server in a server cluster, and the device includes:
[0038] A receiving module is configured to receive a page recommendation request triggered by a first user through a first terminal device; the page recommendation request carries first information, which is used to indicate the type of the first user;
[0039] The processing module is configured to obtain a first page recommendation strategy corresponding to the first user based on the type of the first user indicated by the first information and the mapping relationship between the user type and the page recommendation strategy; and generate the first recommended page based on the first page recommendation strategy; the first page recommendation strategy is used to generate the first recommended page.
[0040] The sending module is used to send the access address of the first recommended page to the first terminal device.
[0041] Thirdly, this application provides a server, including: at least one processor and a memory;
[0042] The memory stores computer-executed instructions;
[0043] The at least one processor executes computer execution instructions stored in the memory, causing the server to perform the method described in any of the first aspects.
[0044] Fourthly, this application provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the method described in any of the first aspects.
[0045] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the method described in the first aspect.
[0046] The page recommendation method, apparatus, server, and storage medium provided in this application, through the first user type indicated by the first information carried in the page recommendation request, and the mapping relationship between the user type and the page recommendation strategy, allow a first server to obtain a first page recommendation strategy corresponding to the first user. This method enables the first recommended page generated based on the first page recommendation strategy corresponding to the first user to meet the user's personalized needs. Compared to existing page recommendation methods that require developers to create recommendation page code for different user types, this application automatically generates the first recommended page based on the first user type, reducing the waste of human resources and improving the efficiency of recommending different pages to different types of users. Attached Figure Description
[0047] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0048] Figure 1a A schematic diagram of a recommendation page displayed on a user's terminal device;
[0049] Figure 1 A flowchart illustrating a page recommendation method provided in this application;
[0050] Figure 2 A flowchart illustrating a method for generating a first recommendation page provided in this application;
[0051] Figure 3 A schematic diagram illustrating an application scenario of the page recommendation method provided in this application;
[0052] Figure 4A flowchart illustrating a method for updating metadata provided in this application;
[0053] Figure 5 A flowchart illustrating another page recommendation method provided in this application;
[0054] Figure 6 A schematic diagram of a page recommendation device provided in this application;
[0055] Figure 7 This is a schematic diagram of a server structure provided for this application.
[0056] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0057] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0058] First, let me explain the terms used in this application:
[0059] A chimney system is a system that does not coordinate with other systems; it can also be called an island system.
[0060] Metadata: Metadata is data about data, mainly used to describe the attribute information of data.
[0061] With the fast pace of modern life, people often expect to quickly access products that meet their needs. Therefore, telecom operators typically provide personalized recommendations for different user types, enabling users to quickly find products that suit their requirements.
[0062] Currently, operators can send recommendation pages containing different content to different types of users' terminal devices via a backend server, enabling personalized recommendations for different user types. Before sending recommendation pages with different content to different user types, the operator's backend server needs to generate recommendation pages for each user type based on the page recommendation strategy for each user type and the corresponding metadata of the page recommendation strategy.
[0063] For example, taking a user's terminal device as a mobile phone or tablet computer as an example, Figure 1a This is an illustration of a recommendation page displayed on a user's terminal device. For example... Figure 1a As shown, the recommendation page may include, for example, text input boxes and selectable values (e.g., ...). Figure 1a This includes the regions shown, text display areas, recommended content information, etc.
[0064] Existing page recommendation methods are primarily based on a siloed system architecture. In this method, for any type of user, the page recommendation strategy used to generate the recommended page corresponding to that user type, as well as the metadata corresponding to the page recommendation strategy, are all part of the code corresponding to that recommended page.
[0065] Among these, the different types of users can be, for example, users classified according to their age group, resulting in users of different age groups; or users classified according to their zodiac sign, resulting in users of different zodiac signs; or users classified according to their gender, resulting in users of different genders; or users classified according to the length of time they have used the mobile number corresponding to the operator, resulting in users of different levels, etc.
[0066] The aforementioned page recommendation strategy may include at least one of the following: content recommended to target users, recommendation cycle for pushing the recommended page to target users, strategy for determining the recommendation priority of users, screening strategy for determining the target users to recommend the recommended page, strategy for determining the target region, or, push method for pushing the recommended page to target users, etc.
[0067] The metadata corresponding to the above page recommendation strategy may include at least one of the following: data such as page input boxes, page selection boxes, and text to be displayed. For example... Figure 1a The metadata corresponding to the text input boxes, selection controls, selectable values, etc. shown.
[0068] In existing page recommendation methods, the recommendation pages for different types of users are independent of each other, and each has its own independent code. Moreover, as mentioned above, there are many types of users, many recommendation strategies for different users, and a lot of metadata corresponding to each page recommendation strategy. Therefore, for any type of user, developers need to spend a certain amount of time writing page code that includes "the page recommendation strategy corresponding to that type of user, and the metadata corresponding to the page recommendation strategy".
[0069] In other words, using existing page recommendation methods to push recommendation pages to different types of users may require developers to write a lot of code for the recommendation pages, resulting in a large consumption of human resources and slow page recommendation efficiency.
[0070] Considering that existing page recommendation methods suffer from high human resource consumption and low efficiency because developers need to write page code corresponding to different user types, this application provides a method that can automatically generate recommendation pages for different user types. This method avoids wasting human resources, shortens the development cycle, and improves the efficiency of page recommendations for different user types. The executing entity of this page recommendation method can be, for example, the first server in a server cluster. The first server can be any server in the server cluster.
[0071] It should be understood that this application does not limit the application scenarios of the page recommendation method. Optionally, the page recommendation method can be applied, for example, to a scenario where a carrier's server cluster pushes recommendation pages to the terminal devices used by the carrier's users. Alternatively, the page recommendation method can also be applied, for example, to other scenarios such as pushing recommendation pages containing information about target products to users' terminal devices, or pushing recommendation pages containing download links for target applications to users' terminal devices.
[0072] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0073] Figure 1 This application provides a flowchart illustrating a page recommendation method. For example... Figure 1 As shown, the method includes the following steps:
[0074] S101. Receive a page recommendation request triggered by the first user through the first terminal device.
[0075] The aforementioned page recommendation request carries first information to indicate the type of the first user.
[0076] The aforementioned first terminal device can be, for example, a mobile phone, a computer, a tablet computer, or other terminal devices.
[0077] Taking the first server in the operator's server cluster as an example, the aforementioned first user could be a user using the services provided by that operator. The first piece of information carried in the page recommendation request could be, for example, the mobile phone number of that operator used by the first user.
[0078] Optionally, the aforementioned first information may include information about the type of the first user. For example, the first information may include the first user's age, gender, and region. Alternatively, the first information may also include an identifier of the first user that can indicate the type of the first user (e.g., the mobile phone number used by the aforementioned first user from the carrier). After receiving the page recommendation request, the first server in the server cluster can determine the type of the first user based on the identifier of the first user in the first information carried in the page recommendation request.
[0079] Optionally, the first server can be directly connected to the first terminal device to receive page recommendation requests from the first terminal device. Alternatively, the first terminal device can also be connected to a second server in the server cluster, other than the first server. In this implementation, the second server can receive page recommendation requests from the first terminal device and then send them to the first server.
[0080] It should be understood that this application does not limit how the first terminal device responds to a page recommendation request triggered by the first user. For example, the first terminal device may display an interface including controls for triggering a page recommendation request, such as through instant messaging software, mobile payment software, or short video social media software, so that the user can trigger the page recommendation request by clicking the control.
[0081] S102. Based on the type of the first user indicated by the first information, and the mapping relationship between the user type and the page recommendation strategy, obtain the first page recommendation strategy corresponding to the first user.
[0082] The aforementioned first page recommendation strategy is used to generate the first recommendation page. Optionally, the first server may determine one or more first page recommendation strategies corresponding to the first user based on the type of the first user indicated by the first information and the mapping relationship between user types and page recommendation strategies.
[0083] Optionally, the mapping relationship between the user type and the page policy can be, for example, pre-stored in the first server by the technicians corresponding to the server cluster. In this implementation, the technicians corresponding to the server cluster can, for example, store the mapping relationship in the first server through a second terminal device that can be used to receive the mapping relationship.
[0084] For example, the mapping relationship between the above user types and page recommendation strategies can be shown in Table 1 below:
[0085] Table 1
[0086]
[0087] Taking the mapping relationship shown in Table 1 as an example, if the first server determines that the type of the first user indicated by the first information is user type 1, then according to the mapping relationship, the first server can determine that the first page recommendation strategy corresponding to the first user includes page recommendation strategy 11 and page recommendation strategy 12. If the first server determines that the type of the first user indicated by the first information is user type 2, then according to the mapping relationship, the first server can determine that the first page recommendation strategy corresponding to the first user is page recommendation strategy 21.
[0088] S103. Generate the first recommendation page according to the first page recommendation strategy.
[0089] Taking the example that the first server determines, based on the type of the first user and the mapping relationship between the user type and the page recommendation strategy, that there exists a first page recommendation strategy corresponding to the first user, the first server can directly generate the first recommendation page according to the first page recommendation strategy.
[0090] Taking the example of the first server determining that there are multiple first page recommendation strategies corresponding to the first user based on the type of the first user and the mapping relationship between the user type and the page recommendation strategy, the first server may optionally first select one first page recommendation strategy from the multiple first page recommendation strategies, and then generate the first recommendation page according to the selected first page recommendation strategy.
[0091] Alternatively, the first server could first generate recommended pages corresponding to each first-page recommendation strategy. Then, the first server could select one of these recommended pages as the first recommended page.
[0092] S104. Send the access address of the first recommended page to the first terminal device.
[0093] The access address mentioned above can be, for example, a Uniform Resource Locator (URL) address, or an Internet Protocol (IP) address.
[0094] After generating the first recommended page according to the first page recommendation strategy, the first server may also determine the access address of the first recommended page. It should be understood that this application does not limit the implementation method of the first server determining the access address of the first recommended page. For example, the first server may determine the access address of the first recommended page based on the first recommended page and the mapping relationship between the recommended page and the access address.
[0095] Accordingly, the first terminal device can receive the access address of the first recommended page sent by the first server. Then, the first terminal device can display the first recommended page based on the access address, so that the user can view the recommended content included on the first recommended page.
[0096] In this embodiment, the first server can obtain the first page recommendation strategy corresponding to the first user by using the first user type indicated by the first information carried in the page recommendation request, and the mapping relationship between the user type and the page recommendation strategy. Through this method, the first recommended page generated based on the first page recommendation strategy corresponding to the first user meets the user's personalized needs. Compared to existing page recommendation methods that require developers to create recommendation page code for different types of users, this application automatically generates the first recommended page based on the first user type, reducing the waste of human resources and improving the efficiency of recommending different pages to different types of users.
[0097] The following section uses multiple first-page recommendation strategies corresponding to the first user as an example to explain in detail how the first server generates the first recommendation page based on the first-page recommendation strategy. Figure 2 This is a flowchart illustrating a method for generating a first recommendation page provided in this application. Figure 2 As shown, as one possible implementation, the aforementioned step S103 may include the following steps:
[0098] S201. Based on the recommendation strategy of each first page, obtain the metadata corresponding to each recommendation strategy of the first page from the first database.
[0099] The aforementioned metadata is used to generate the recommended page indicated by the recommendation strategy of the corresponding first page.
[0100] The first database mentioned above can be, for example, a Remote Dictionary Server (Redis) database, a MySQL database (a type of relational database management system), an Ehcache database (a type of Java in-process caching framework), a Memcached database (a type of distributed caching system), an SSDB database (a high-performance database that supports rich data structures), or a Codis database (a distributed Redis database), etc.
[0101] Optionally, the first server may, for example, obtain the identifiers of multiple first-page recommendation strategies after determining them. Then, for any given first-page recommendation strategy, the first server may generate a data read statement including the identifier of that first-page recommendation strategy. This data read statement is used to instruct the retrieval of metadata corresponding to that first-page recommendation strategy. The first server may then execute the data read statement on the aforementioned first database to retrieve the metadata corresponding to each first-page recommendation strategy from the first database.
[0102] Alternatively, the aforementioned first-page recommendation strategy may also include identifiers for each piece of metadata corresponding to the first-page recommendation strategy. The first server can obtain the identifiers for the metadata corresponding to the first-page recommendation strategy from the first-page recommendation strategy, and then retrieve the metadata corresponding to the first-page recommendation strategy from the aforementioned first database based on the metadata identifiers.
[0103] S202. Generate the recommendation page corresponding to each first page recommendation strategy based on the metadata corresponding to each first page recommendation strategy.
[0104] In some embodiments, for any first page recommendation strategy, the first server may, after obtaining the metadata corresponding to the first page recommendation strategy, parse and process the metadata corresponding to the first page recommendation strategy to obtain the page display information described by each metadata.
[0105] It should be understood that this application does not limit how the first server parses and processes the metadata corresponding to the recommendation strategy on the first page to obtain the page display information described by each metadata. Optionally, the first server may, for example, determine the page display information described by each metadata by recognizing the string corresponding to each metadata.
[0106] For example, if the first server identifies the string corresponding to metadata as "input", optionally, the first server can determine that the page display information described by the metadata is an input box. That is, the input box needs to be displayed on the recommendation page corresponding to the metadata. Specifically, the position of the input box can be determined, for example, according to the recommendation strategy of the first page corresponding to the metadata.
[0107] Then, the first server can render the page display information obtained from the above parsing according to the preset page rendering rules to obtain the recommended page corresponding to the first page recommendation strategy.
[0108] It should be understood that this application does not limit the aforementioned preset page rendering rules. Furthermore, the preset page rendering rules corresponding to different first-page recommendation strategies can be the same or different. Optionally, the aforementioned preset page rendering rules can also be included in the first-page recommendation strategy.
[0109] S203. Determine the first recommended page from the recommended pages corresponding to each first page recommendation strategy.
[0110] Optionally, the first server may use the first generated recommendation page as the first recommendation page.
[0111] Alternatively, after generating the recommended pages corresponding to each first page recommendation strategy, the first server may randomly select one of the recommended pages corresponding to each first page recommendation strategy as the first recommended page.
[0112] Alternatively, in some embodiments, if the aforementioned page recommendation request is triggered by a first user through the user interface of a first application on a first terminal device, and the page recommendation request also carries the identifier of the first application, then the first server can use the recommended page that matches the first application from the recommended pages corresponding to each first page recommendation strategy as the first recommended page. This implementation method allows the first recommended page to match the first application used by the user, making the first recommended page more aligned with the user's personalized needs, thereby improving the accuracy of page recommendations to the user and ultimately enhancing the user experience.
[0113] In this implementation, the first server may also store, for example, a mapping relationship between application identifiers and first page recommendation strategies. The first server can determine the first page recommendation strategy matching the first application based on the application identifier and the mapping relationship between the application identifier and the first page recommendation strategy. Then, the server can use the recommended page corresponding to the first page recommendation strategy matching the first application as the recommended page matching the first application.
[0114] In this embodiment, based on the metadata corresponding to each first page recommendation strategy obtained from the first database, the recommended pages corresponding to each first page strategy can be automatically generated. Through the above method, the first recommended pages are automatically generated according to the first page recommendation strategy, reducing the waste of human resources and improving the efficiency of recommending different pages to different types of users.
[0115] As another possible implementation, when there are multiple first page recommendation strategies corresponding to the first user, the first server can first determine the target page recommendation strategy from the multiple first page recommendation strategies. Optionally, the first server can randomly determine a target page recommendation strategy from the multiple first page recommendation strategies. Alternatively, referring to the method described in the foregoing embodiments, the first server can also determine the first page recommendation strategy that matches the first application from the multiple first page recommendation strategies as the target page recommendation strategy.
[0116] Then, the first server can retrieve the metadata corresponding to the target page recommendation strategy from the first database according to the target page recommendation strategy. Then, based on the metadata corresponding to the target page recommendation strategy, it generates the first recommended page. Optionally, the specific implementation methods for retrieving the metadata corresponding to the target page recommendation strategy from the first database according to the target page recommendation strategy, and for generating the first recommended page based on the metadata corresponding to the target page recommendation strategy, can refer to the methods described in the foregoing embodiments, and will not be repeated here.
[0117] In this embodiment, by first determining a target page recommendation strategy, then obtaining the metadata corresponding to the target page recommendation strategy, and generating a first recommendation page based on the metadata, the computational load of the first server is reduced, and the efficiency of page recommendation to users is further improved.
[0118] Furthermore, as a possible implementation, the first server can also update the metadata in the first database mentioned above to further improve the accuracy of the information included in the recommendation page generated based on the metadata, thereby further improving the user experience.
[0119] In some embodiments, the first server may first obtain an update request for updating metadata triggered by a second user through a second terminal device. Then, the first server can update the metadata in the first database according to the update request. Optionally, the update request may also include an identifier of the metadata to be updated, and an identifier of the operation to be performed on the metadata to be updated. For example, the operation on the metadata to be updated may be modifying the metadata. Alternatively, updating the metadata in the first database may also involve adding new metadata, or deleting metadata, etc.
[0120] The second user can be the aforementioned technical personnel. The second terminal device can be, for example, a mobile phone, computer, tablet computer, or other terminal device.
[0121] In this implementation, optionally, the first server can receive an update request from the second terminal device. Then, based on the update request, it updates the metadata in the second database. The second database is a backup of the first database. For example, the second database could be a MySQL database, and the first database could be a Redis database.
[0122] Then, the first server can broadcast the update request to second servers in the server cluster (excluding itself) and update the metadata in the first database. The number of second servers can be one or more. Optionally, the second servers can update the metadata in the first database after receiving the broadcast from the first server. In other words, the first server can update the metadata in the first database through the second servers.
[0123] Alternatively, after receiving the above update request, the first server can also directly update the metadata in the first database.
[0124] Furthermore, in some embodiments, after the first server updates the metadata in the first database according to the update request, it can also send an update response to the second terminal device to indicate that the metadata update is complete, thereby prompting the second user that the update is complete and improving the user experience. Accordingly, the second terminal device can receive the update response and then output it. Optionally, the second terminal device can output the update response, for example, through a display device or a voice output device.
[0125] Taking the first terminal device as a mobile phone or tablet computer, and the second terminal device as a computer as an example... Figure 3 This is a schematic diagram illustrating an application scenario of the page recommendation method provided in this application. Based on... Figure 3 The application scenarios shown are as follows: Figure 4 This is a flowchart illustrating a method for updating metadata provided in this application. Figure 4 As shown, the method includes the following steps:
[0126] Step 11: In response to the update request for updating metadata triggered by the second user, the second terminal device sends the update request to the first server.
[0127] The update request mentioned above may include, for example, metadata to be written to the database.
[0128] Accordingly, the first server can receive the update request.
[0129] Step 12: The first server updates the metadata in the MySQL database according to the update request.
[0130] Step 13: The first server broadcasts the above update request to the second server in the server cluster, excluding the first server.
[0131] For example, the first server can broadcast the update request to the second server via RabbitMQ (Rabbit Message Queue).
[0132] Step 14: The second server updates the metadata in the Redis database according to the update request.
[0133] Optionally, before the second server updates the metadata in the Redis database according to the update request, the metadata to be written to the database can be converted into a data format so that the format of the metadata to be written to the database meets the storage format of the Redis database, so that the Redis database can store the metadata to be written to the database.
[0134] Step 15: The second server sends an update response to the second terminal device through the first server, indicating that the metadata update is complete.
[0135] Step 16: The second terminal device outputs the update response.
[0136] In this embodiment, by updating the metadata in the Redis and MySQL databases, the accuracy of the information included in the recommendation pages generated based on the metadata is further improved, thereby enhancing the user experience. Furthermore, storing the metadata in the Redis database improves the efficiency of retrieving metadata from the database, which in turn improves the efficiency of subsequently generating recommendation pages using the metadata from the Redis database, further enhancing the efficiency of recommending pages to different types of users.
[0137] Figure 5 A flowchart illustrating another page recommendation method provided in this application. (For example...) Figure 5 As shown, the method includes the following steps:
[0138] Step 21: In response to the page recommendation request triggered by the first user through the user interface of the first application, the first terminal device sends the page recommendation request to the first server.
[0139] The page recommendation requests mentioned above can all be real-time page recommendation requests. Upon receiving the page recommendation requests, the first server can immediately execute the following steps.
[0140] Step 22: The first server obtains multiple first page recommendation strategies corresponding to the first user based on the type of the first user indicated by the first information and the mapping relationship between the user type and the page recommendation strategy.
[0141] Step 23: The first server retrieves the metadata corresponding to each first page recommendation strategy from the Redis database through a distributed service, based on the recommendation strategy for each first page.
[0142] The aforementioned distributed service can be, for example, a Dubbo (a distributed service framework) distributed service or a Spring Cloud (a distributed microservice framework) distributed service. By having the first server execute this step and the following steps through the distributed service, the first server can ensure its stability even when processing multiple page recommendation requests simultaneously, preventing it from crashing due to large data volumes. In other words, the distributed service enables the first server to handle high-concurrency page recommendation requests.
[0143] For example, Table 2 shows examples of page display information described by different metadata:
[0144] Table 2
[0145] Metadata The page description displays information input Single-line text input box select Drop-down selection control checkbox checkboxes radio radio button textarea Multiline text input box … …
[0146] For example, the data types of the aforementioned metadata can be categorized as numeric, string, list, and time-based. For numeric metadata, the metadata stored in the first database may also include the value range corresponding to the numeric metadata (e.g., the value range of metadata A is greater than 1 and less than 50). For selection control metadata, the first database may also include the selection items (also called enumeration values) corresponding to the selection control metadata. For example, these selection items could be selection items from different locations, or selection items from different zodiac signs, etc.
[0147] Step 24: The first server uses a distributed service to parse and process the metadata corresponding to each first page recommendation strategy, obtains the page display information described by each metadata, and renders the parsed page display information according to preset page rendering rules to obtain the recommendation page corresponding to each first page recommendation strategy.
[0148] Step 25: The first server selects the recommended page that matches the aforementioned first application as the first recommended page.
[0149] Step 26: The first server sends the access address of the first recommended page to the first terminal device.
[0150] The access address of the first recommended page mentioned above can also be referred to as HyperText Markup Language (html) code.
[0151] Step 27: The first terminal device displays the first recommended page based on the access address mentioned above.
[0152] In this embodiment, by using the metadata corresponding to the first page recommendation strategy, recommended pages can be automatically generated, reducing the waste of human resources, shortening the development cycle, and improving the efficiency of recommending different pages to different types of users. Furthermore, by executing the steps of obtaining the metadata corresponding to the first page recommendation strategy and automatically generating recommended pages through a distributed service, the probability of the first server system freezing can be reduced while handling multiple page recommendation requests, ensuring the stability of the first server and further improving the efficiency of page recommendations to users.
[0153] Figure 6 This is a schematic diagram of a page recommendation device provided in this application. The device is applied to the first server in a server cluster, such as... Figure 6 As shown, the device includes: a receiving module 301, a processing module 302, and a transmitting module 303. Among them,
[0154] The receiving module 301 is configured to receive a page recommendation request triggered by a first user through a first terminal device. The page recommendation request carries first information, which indicates the type of the first user.
[0155] Processing module 302 is configured to obtain a first page recommendation strategy corresponding to the first user based on the type of the first user indicated by the first information and the mapping relationship between user type and page recommendation strategy; and generate the first recommended page based on the first page recommendation strategy. The first page recommendation strategy is used to generate the first recommended page.
[0156] The sending module 303 is used to send the access address of the first recommended page to the first terminal device.
[0157] Optionally, taking multiple first-page recommendation strategies corresponding to the first user as an example, processing module 302 is specifically used to: obtain metadata corresponding to each first-page recommendation strategy from the first database; generate a recommendation page corresponding to each first-page recommendation strategy based on the metadata; and determine a first recommendation page from the recommendation pages corresponding to each first-page recommendation strategy. The metadata is used to generate the recommendation page indicated by the corresponding first-page recommendation strategy.
[0158] Optionally, the processing module 302 is specifically used to parse the metadata corresponding to any first page recommendation strategy, obtain the page display information described by each metadata, and render the parsed page display information according to preset page rendering rules to obtain the recommended page corresponding to the first page recommendation strategy.
[0159] Optionally, taking the example where the page recommendation request is triggered by the first user through the user interface of the first application on the first terminal device, and the page recommendation request also carries the identifier of the first application, the processing module 302 is specifically used to select the recommended page that matches the first application from the recommended pages corresponding to each first page recommendation strategy as the first recommended page.
[0160] Optionally, taking multiple first page recommendation strategies corresponding to the first user as an example, the processing module 302 is specifically used to determine a target page recommendation strategy from multiple first page recommendation strategies; obtain the metadata corresponding to the target page recommendation strategy from the first database according to the target page recommendation strategy; and generate the first recommended page according to the metadata corresponding to the target page recommendation strategy.
[0161] Optionally, the receiving module 301 is further configured to acquire an update request triggered by the second user through the second terminal device. The update request is used to update metadata. In this implementation, the device may further include an update module 304, configured to update the metadata in the first database according to the update request.
[0162] Optionally, the receiving module 301 is specifically configured to receive the update request from the second terminal device. In this implementation, the update module 304 is specifically configured to update the metadata in the second database according to the update request; broadcast the update request to the second servers in the server cluster other than the first server, and update the metadata in the first database. The second database is a backup database of the first database.
[0163] Optionally, the sending module 303 is further configured to send an update response to the second terminal device after updating the metadata in the first database according to the update request. The update response indicates that the metadata update is complete.
[0164] The page recommendation device provided in this application is used to execute the aforementioned page recommendation method embodiments. Its implementation principle and technical effect are similar, and will not be described in detail here.
[0165] Figure 7 This is a schematic diagram of a server structure provided for this application. Figure 7 As shown, the server 400 may include at least one processor 401 and a memory 402.
[0166] The memory 402 is used to store programs. Specifically, the program may include program code, which includes computer operation instructions.
[0167] Memory 402 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.
[0168] The processor 401 is used to execute computer execution instructions stored in the memory 402 to implement the page recommendation method described in the foregoing method embodiments. The processor 401 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application.
[0169] Optionally, the server 400 may also include a communication interface 403. In specific implementations, if the communication interface 403, memory 402, and processor 401 are implemented independently, they can be interconnected via a bus to complete communication. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc., but this does not imply that there is only one bus or one type of bus.
[0170] Optionally, in a specific implementation, if the communication interface 403, memory 402 and processor 401 are integrated on a single chip, then the communication interface 403, memory 402 and processor 401 can communicate through an internal interface.
[0171] This application also provides a computer-readable storage medium, which may include various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk. Specifically, the computer-readable storage medium stores program instructions, which are used in the methods described in the above embodiments.
[0172] This application also provides a program product including executable instructions stored in a readable storage medium. At least one processor of a server can read the executable instructions from the readable storage medium, and the at least one processor executes the executable instructions to cause the server to implement the page recommendation methods provided in the various embodiments described above.
[0173] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A page recommendation method, characterized in that, The method is applied to the first server in a server cluster, and the method includes: Receive a page recommendation request triggered by a first user through a first terminal device; the page recommendation request carries first information, which is used to indicate the type of the first user; Based on the type of the first user indicated by the first information, and the mapping relationship between the user type and the page recommendation strategy, a first page recommendation strategy corresponding to the first user is obtained; the first page recommendation strategy is used to generate a first recommendation page; wherein, the first page recommendation strategy corresponding to the first user includes at least two of the following: content recommended to the target user, recommendation cycle for pushing the recommendation page to the target user, strategy for determining the user's recommendation priority, filtering strategy for determining the target user to recommend the recommendation page, strategy for determining the target region, and / or, push method for pushing the recommendation page to the target user; Based on the recommendation strategy of each first page, the metadata corresponding to each first page recommendation strategy is obtained from the first database through a distributed service. The metadata is used to generate the recommendation page indicated by the corresponding first page recommendation strategy. Through distributed services, recommendation pages corresponding to each first-page recommendation strategy are generated based on the metadata corresponding to each first-page recommendation strategy. The first recommended page is determined from the recommended pages corresponding to each first-page recommendation strategy; Send the access address of the first recommended page to the first terminal device.
2. The method according to claim 1, characterized in that, The step of generating a recommended page corresponding to each first page recommendation strategy based on the metadata corresponding to each first page recommendation strategy includes: For any first-page recommendation strategy, the metadata corresponding to the first-page recommendation strategy is parsed and processed to obtain the page display information described by each metadata. According to the preset page rendering rules, the parsed page display information is rendered to obtain the recommended page corresponding to the first page recommendation strategy.
3. The method according to claim 1, characterized in that, The page recommendation request is triggered by the first user through the user interface of the first application on the first terminal device, and the page recommendation request also carries the identifier of the first application; The step of determining the first recommended page from the recommended pages corresponding to each first page recommendation strategy includes: The recommended page that matches the first application among the recommended pages corresponding to each first page recommendation strategy is taken as the first recommended page.
4. The method according to claim 1, characterized in that, There are multiple recommendation strategies for the first page corresponding to the first user; The step of generating the first recommended page according to the first page recommendation strategy includes: Determine the target page recommendation strategy from multiple first-page recommendation strategies; Based on the target page recommendation strategy, obtain the metadata corresponding to the target page recommendation strategy from the first database; The first recommended page is generated based on the metadata corresponding to the target page recommendation strategy.
5. The method according to any one of claims 1-4, characterized in that, The method further includes: Obtain an update request triggered by a second user through a second terminal device, the update request being used to update metadata; Update the metadata in the first database according to the update request.
6. The method according to claim 5, characterized in that, The step of updating the metadata in the first database according to the update request includes: Receive the update request from the second terminal device; The step of updating the metadata in the first database according to the update request includes: According to the update request, update the metadata in the second database; the second database is a backup database of the first database; The update request is broadcast to a second server in the server cluster other than the first server, and the metadata in the first database is updated.
7. The method according to claim 6, characterized in that, After updating the metadata in the first database according to the update request, the method further includes: An update response is sent to the second terminal device, the update response indicating that the metadata update is complete.
8. A page recommendation device, characterized in that, The apparatus is applied to a first server in a server cluster, and the apparatus includes: A receiving module is configured to receive a page recommendation request triggered by a first user through a first terminal device; the page recommendation request carries first information, which is used to indicate the type of the first user; The processing module is configured to: obtain a first page recommendation strategy corresponding to the first user based on the type of the first user indicated by the first information and the mapping relationship between user type and page recommendation strategy; generate a first recommended page based on the first page recommendation strategy; the first page recommendation strategy is used to generate the first recommended page; wherein the first page recommendation strategy corresponding to the first user includes at least two of the following: content recommended to the target user, recommendation cycle for pushing the recommended page to the target user, strategy for determining the user's recommendation priority, filtering strategy for determining the target user to recommend the recommended page, strategy for determining the target region, and / or, push method for pushing the recommended page to the target user; obtain metadata corresponding to each first page recommendation strategy from a first database through a distributed service, the metadata being used to generate the recommended page indicated by the corresponding first page recommendation strategy; generate the recommended page corresponding to each first page recommendation strategy through a distributed service based on the metadata corresponding to each first page recommendation strategy; and determine the first recommended page from the recommended pages corresponding to each first page recommendation strategy. The sending module is used to send the access address of the first recommended page to the first terminal device.
9. A server, characterized in that, include: At least one processor and memory; The memory stores computer-executed instructions; The at least one processor executes computer execution instructions stored in the memory, causing the server to perform the method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions that, when executed by a processor, implement the method described in any one of claims 1-7.
Citation Information
Patent Citations
Page display method and system
CN110020388A
Page generation method and device
CN111461801A