Page data processing method, device, electronic device and storage medium
By receiving the client's tag request and obtaining the target tag from the cache, the problem of low operating efficiency caused by the client controlling the tag display strategy in the existing technology is solved, and the client can quickly enter the live broadcast room and improve the operating efficiency.
Patent Information
- Application Number
- CN202210199516.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-01
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2042-03-01
Smart Images

Figure CN114595254B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing technology, and in particular to a page data processing method, device, electronic device, computer-readable storage medium, and computer program product. Background Art
[0002] With the development of Internet technology, various network applications have gained popularity. For example, users (audience users) can watch multimedia resources shared by other users (host users) through live broadcast applications. Usually, the resource display page of the live broadcast application will display corresponding tag information when displaying the multimedia resources shared by each host user, so as to attract audience users to enter the live broadcast room of the corresponding host user, so that the host user can obtain more traffic and attention.
[0003] In the related art, tags are usually configured by developers in the configuration center, and the corresponding business controls the display strategy. However, every time a tag is replaced, the developer needs to re-modify the configuration and the display strategy of the corresponding business, which leads to high pressure on tag development, and the control of the display strategy by the business will affect the operating efficiency of the business. Summary of the invention
[0004] The present disclosure provides a page data processing method, device, electronic device, computer-readable storage medium, and computer program product to at least solve the problem in the related art that the display strategy of tags is controlled by the client, resulting in low operating efficiency. The technical solution of the present disclosure is as follows:
[0005] According to a first aspect of an embodiment of the present disclosure, a page data processing method is provided, including:
[0006] Receiving a tag request from a client, obtaining an account identifier of a first requesting account, an account identifier of a second requesting account corresponding to the page content, and target category information carried in the tag request, wherein the tag request is generated based on a refresh operation of the first requesting account on the page;
[0007] Acquire a target tag matching the account identifier of the first requesting account, the account identifier of the second requesting account, and the target category information from a cache;
[0008] The target tag is returned to the client, where the target tag is used to instruct the client to display the target tag in a page displayed to the first requesting account.
[0009] In one embodiment, the cache stores a first correspondence between a tag and an account identifier of a first account, and a second correspondence between an account identifier of a second account and a tag in a bitmap compression manner; obtaining a target tag that matches the account identifier of the first request account, the account identifier of the second request account, and the target category information from the cache includes: obtaining a first tag that matches the account identifier of the second request account according to the second correspondence; filtering a second tag that matches the account identifier of the first request account from the first tag according to the first correspondence; obtaining configuration information of the second tag, the configuration information of the tag including category information of the second tag; and filtering a third tag that matches the target category information from the second tag according to the configuration information of the second tag as the target tag.
[0010] In one of the embodiments, the configuration information of the tag also includes the priority of the tag; the method further includes: when there are multiple third tags, obtaining the priority of each of the third tags; and taking the third tag with the highest priority as the target tag.
[0011] In one embodiment, obtaining the configuration information of the second tag includes: querying the configuration information of the second tag from the local cache; when the configuration information of the second tag is not queried from the local cache, querying the configuration information of the second tag from the distributed cache system; when the configuration information of the second tag is not queried from the distributed cache system, obtaining the configuration information of the second tag from a database; and storing the obtained configuration information of the second tag in the distributed cache system.
[0012] In one of the embodiments, the method further includes: when the cache update time arrives, obtaining a tag set whose tag status is online from a database, wherein the tag set includes a plurality of tags; and updating the cache according to the plurality of tags in the tag set.
[0013] In one embodiment, each tag has a corresponding tag identifier and configuration information, and the configuration information also includes a first account category identifier corresponding to the tag; updating the cache according to several tags in the tag set includes: establishing a first association relationship between the tag identifier of the tag and the first account category identifier according to the configuration information of each tag; obtaining several first accounts matching the first account category identifier and the account identifier of each first account from a database; updating the first corresponding relationship in the cache according to the tag identifier corresponding to the first association relationship and the account identifier of each first account matching the first account category identifier.
[0014] In one embodiment, the configuration information also includes a second account category identifier corresponding to the tag; the cache also includes a third correspondence between the tag stored in a bitmap compression manner and the account identifier of the second account; updating the cache according to several tags in the tag set also includes: establishing a second association relationship between the tag identifier of the tag and the second account category identifier according to the configuration information of each tag; obtaining several second accounts matching the second account category identifier and the account identifier of each second account from the database as a first data set; obtaining the account identifier of the second account corresponding to the tag from the cache as a second data set according to the third correspondence; obtaining a difference set between the second data set and the first data set, and updating the second correspondence relationship and the third correspondence relationship in the cache according to the difference set.
[0015] In one embodiment, the difference set is the account identifier of the second account that belongs to the second data set but does not belong to the first data set; updating the second correspondence and the third correspondence in the cache according to the difference set includes: deleting the account identifier of the second account corresponding to the difference set from the cached second correspondence to obtain an updated second correspondence; deleting the account identifier of the second account corresponding to the difference set from the cached third correspondence to obtain an updated third correspondence.
[0016] In one of the embodiments, before obtaining a tag set whose tag status is online from a database, the method further includes: receiving a request to create a tag, the creation request including a tag identifier and corresponding configuration information of the tag; when the creation request is verified, storing the tag identifier and configuration information of the corresponding tag in the database, and marking the status of the tag as pending review.
[0017] In one of the embodiments, after storing the tag identifier and configuration information of the corresponding tag in the database, the method further includes: receiving a withdrawal request for the tag in a pending review state, the withdrawal request including the tag identifier of the tag; and updating the state of the tag to withdrawn.
[0018] In one of the embodiments, after storing the tag identifier and configuration information of the corresponding tag in the database, the method further includes: receiving a review request for the tag, the review request including the tag identifier of the tag and the corresponding review result; when the review result is passed, obtaining the configuration information of the tag after review; when the reviewed configuration information is verified to be passed, updating the configuration information of the corresponding tag in the database according to the reviewed configuration information, and updating the status of the tag to be online; when the review result is failed, updating the status of the tag to rejected.
[0019] In one of the embodiments, the configuration information includes the effective time of the corresponding tag; after the status of the tag is updated to be online, the method further includes: when the first task time arrives, obtaining the configuration information of the tag in the database whose status is to be online; when the effective time of the tag in the configuration information is greater than the first task time, updating the status of the corresponding tag to be online.
[0020] In one of the embodiments, the method further includes: when the first task time arrives, obtaining configuration information of the tags in the database whose status is pending review; when the effective time of the tag in the configuration information is greater than the first task time, updating the status of the corresponding tag to offline.
[0021] In one of the embodiments, the configuration information also includes the expiration time of the corresponding tag; the method also includes: when the first task time arrives, obtaining the configuration information of the tag whose status is online in the database; when the expiration time of the tag in the configuration information is greater than the first task time, updating the status of the corresponding tag to offline.
[0022] In one of the embodiments, the method further includes: receiving an offline request for a tag to be online or online, the offline request carrying a tag identifier of the tag; and updating the state of the corresponding tag to offline according to the offline request.
[0023] In one of the embodiments, the method further includes: when the second task time arrives, obtaining the configuration information of the label in the database whose status is pending review; when the difference between the second task time and the effective time of the label in the configuration information is less than the set time threshold, sending a review notification of the label to the target review object, and the review notification is used to instruct the target review object to review the label.
[0024] According to a second aspect of an embodiment of the present disclosure, a page data processing device is provided, including:
[0025] a tag request receiving module, configured to receive a tag request from a client, and obtain an account identifier of a first requesting account carried in the tag request, an account identifier of a second requesting account corresponding to the page content, and target category information, wherein the tag request is generated based on a refresh operation of the first requesting account on the page;
[0026] a target tag acquisition module, configured to execute acquisition from a cache of a target tag matching the account identifier of the first requesting account, the account identifier of the second requesting account, and the target category information;
[0027] The target tag returning module is configured to execute returning the target tag to the client, where the target tag is used to instruct the client to display the target tag in a page displayed to the first requesting account.
[0028] In one of the embodiments, the cache stores a first correspondence between a tag and an account identifier of a first account, and a second correspondence between an account identifier of a second account and a tag in a bitmap compression manner; the target tag acquisition module includes: a first tag acquisition unit, configured to acquire a first tag matching the account identifier of the second request account according to the second correspondence; a second tag acquisition unit, configured to filter a second tag matching the account identifier of the first request account from the first tag according to the first correspondence; a configuration information acquisition unit, configured to acquire configuration information of the second tag, the configuration information of the tag including category information of the second tag; and a target tag determination unit, configured to filter a third tag matching the target category information from the second tag according to the configuration information of the second tag as the target tag.
[0029] In one of the embodiments, the configuration information of the tag also includes the priority of the tag; the target tag determination unit is further configured to execute: when there are multiple third tags, obtain the priority of each of the third tags; and use the third tag with the highest priority as the target tag.
[0030] In one of the embodiments, the configuration information acquisition unit is configured to perform: querying the configuration information of the second tag from the local cache; when the configuration information of the second tag is not queried from the local cache, querying the configuration information of the second tag from the distributed cache system; when the configuration information of the second tag is not queried from the distributed cache system, acquiring the configuration information of the second tag from the database; and storing the acquired configuration information of the second tag in the distributed cache system.
[0031] In one of the embodiments, the device also includes a cache update module, which includes: a tag set acquisition unit, configured to execute, when the cache update time arrives, obtaining a tag set with a tag status of an online state from a database, wherein the tag set includes several tags; an update unit, configured to execute an update of the cache according to several tags in the tag set.
[0032] In one embodiment, each tag has a corresponding tag identifier and configuration information, and the configuration information also includes a first account category identifier corresponding to the tag; the update unit is configured to execute: establishing a first association relationship between the tag identifier of the tag and the first account category identifier according to the configuration information of each tag; obtaining from a database a number of first accounts matching the first account category identifier and the account identifier of each first account; and updating the first corresponding relationship in the cache according to the tag identifier corresponding to the first association relationship and the account identifier of each first account matching the first account category identifier.
[0033] In one embodiment, the configuration information also includes a second account category identifier corresponding to the tag; the cache also includes a third correspondence between the tag and the account identifier of the second account stored in a bitmap compression manner; the update unit is further configured to execute: establishing a second association relationship between the tag identifier of the tag and the second account category identifier according to the configuration information of each tag; obtaining from the database a number of second accounts matching the second account category identifier and the account identifier of each second account as a first data set; obtaining from the cache the account identifier of the second account corresponding to the tag according to the third correspondence as a second data set; obtaining a difference set between the second data set and the first data set, and updating the second correspondence relationship and the third correspondence relationship in the cache according to the difference set.
[0034] In one of the embodiments, the difference set is the account identifier of the second account that belongs to the second data set but does not belong to the first data set; the updating unit is further configured to execute: deleting the account identifier of the second account corresponding to the difference set from the cached second correspondence relationship to obtain an updated second correspondence relationship; deleting the account identifier of the second account corresponding to the difference set from the cached third correspondence relationship to obtain an updated third correspondence relationship.
[0035] In one of the embodiments, the device also includes a label creation module, which is configured to execute: receiving a label creation request, the creation request including a label identifier and corresponding configuration information of the label; when the creation request is verified, storing the label identifier and configuration information of the corresponding label in a database, and marking the status of the label as pending review.
[0036] In one of the embodiments, the device further comprises a label status updating module, configured to execute: receiving a withdrawal request for a label in a pending review state, the withdrawal request comprising a label identifier of the label; and updating the status of the label to withdrawn.
[0037] In one of the embodiments, the label status update module is further configured to execute: receiving a review request for a label, the review request including a label identifier of the label and a corresponding review result; when the review result is a passed review, obtaining configuration information of the label after review; when the reviewed configuration information is verified to be passed, updating the configuration information of the corresponding label in the database according to the reviewed configuration information, and updating the status of the label to be online; when the review result is a failed review, updating the status of the label to rejected.
[0038] In one of the embodiments, the configuration information includes the effective time of the corresponding tag; the tag status update module is also configured to execute: when the first task time arrives, obtain the configuration information of the tag in the database whose status is to be online; when the effective time of the tag in the configuration information is greater than the first task time, update the status of the corresponding tag to online.
[0039] In one of the embodiments, the label status update module is further configured to execute: when the first task time arrives, obtain the configuration information of the label in the database whose status is pending review; when the effective time of the label in the configuration information is less than the first task time, update the status of the corresponding label to offline.
[0040] In one of the embodiments, the configuration information also includes the expiration time of the corresponding tag; the tag status update module is also configured to execute: when the first task time arrives, obtain the configuration information of the tag with an online status in the database; when the expiration time of the tag in the configuration information is greater than the first task time, update the status of the corresponding tag to offline.
[0041] In one embodiment, the tag status update module is further configured to execute: receiving an offline request for a tag to be online or online, the offline request carrying a tag identifier of the tag; and updating the status of the corresponding tag to offline according to the offline request.
[0042] In one of the embodiments, the device also includes a notification module, which is configured to execute: when the second task time arrives, obtain the configuration information of the label in the database whose status is pending review; when the difference between the second task time and the effective time of the label in the configuration information is less than the set time threshold, send a review notification of the label to the target review object, and the review notification is used to instruct the target review object to review the label.
[0043] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the page data processing method as described in the first aspect above.
[0044] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device can execute the page data processing method described in the first aspect above.
[0045] According to a fifth aspect of an embodiment of the present disclosure, a computer program product is provided, wherein the computer program product includes instructions, and when the instructions are executed by a processor of an electronic device, the electronic device is enabled to execute the page data processing method as described in the first aspect above.
[0046] The technical solution provided by the embodiment of the present disclosure brings at least the following beneficial effects: by receiving the tag request from the client, and obtaining the target tag matching the account identifier of the first requesting account, the account identifier of the second requesting account and the target category information in the tag request from the cache, and then returning the target tag to the client, the first requesting account can quickly enter the live broadcast room of the corresponding anchor user based on the displayed target tag, and obtain more traffic and attention for the anchor user. In addition, since the tag display strategy and the process of determining the target tag in this embodiment are controlled by the server, the operating efficiency of the client can be improved.
[0047] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.
[0049] Figure 1A The diagram is an application environment diagram of a page data processing method according to an exemplary embodiment.
[0050] Figure 1B The diagram is a schematic diagram of a resource display page according to an exemplary embodiment.
[0051] Figure 2 The figure is a flow chart of a method for processing page data according to an exemplary embodiment.
[0052] Figure 3 The figure is a flowchart of the step of obtaining a target tag according to an exemplary embodiment.
[0053] Figure 4 The figure is a flowchart showing the steps of obtaining configuration information of a second tag according to an exemplary embodiment.
[0054] Figure 5 The figure is a schematic diagram of a process of updating a cache according to an exemplary embodiment.
[0055] Figure 6 The figure is a schematic diagram of a process of updating a cache according to another exemplary embodiment.
[0056] Figure 7 The figure is a schematic diagram of a process of updating a cache according to yet another exemplary embodiment.
[0057] Figure 8 The figure is a schematic diagram of a process of creating a label according to an exemplary embodiment.
[0058] Fig. 9 The figure is a schematic diagram showing a flow chart of tag status management according to an exemplary embodiment.
[0059] Fig.10 The figure is a schematic diagram showing a process of sending a review notification according to an exemplary embodiment.
[0060] Fig.11 The invention is a block diagram of a device for processing page data according to an exemplary embodiment.
[0061] Fig.12 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0062] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.
[0063] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0064] It should also be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data for analysis, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties.
[0065] The page data processing method provided by the present disclosure can be applied to Figure 1A In the application environment shown. Among them, the terminal 110 interacts with the server 120 through the network. The data storage system can store the data that the server 120 needs to process. The data storage system can be integrated on the server 120, or it can be placed on the cloud or other network servers. Specifically, the terminal 110 can be but is not limited to various personal computers, laptops, smart phones, tablets, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 120 can be implemented with an independent server or a server cluster consisting of multiple servers, and can also be implemented based on an RPC (Remote Procedure Call) service.
[0066] In this embodiment, the terminal 110 is installed with a client of an application, wherein the application may be any of a short video application, a live broadcast application, etc. The server 120 is a backend server corresponding to the client of the application. Taking the live broadcast application as an example, the audience user can watch the multimedia resources shared by the anchor user through the live broadcast application, and the resource display page of the live broadcast application can display corresponding tag information (such as the name of the multimedia resources shared by each anchor user) when displaying the multimedia resources shared by each anchor user. Figure 1B As shown in the figure, it is a corresponding resource display page. When displaying the multimedia resources shared by each anchor user on this page, the corresponding tag information can be displayed at any position on the page) to attract audience users to enter the live broadcast room of the corresponding anchor user. Specifically, the tag information can be the entrance to the live broadcast room of the corresponding anchor user, or the link address involved in the live broadcast multimedia resources, etc.
[0067] In this embodiment, the client generates a tag request based on the refresh operation of the resource display page by the viewer user, and sends the tag request to the server. The tag request carries the account ID of the first request account (i.e., the viewer user), the account ID of the second request account (i.e., the anchor user) corresponding to the page content (the multimedia resources shared by the anchor user), and the target category information. The server receives the tag request from the client, obtains the target tag that matches the account ID of the first request account, the account ID of the second request account, and the target category information from the cache, and then returns the target tag to the client. The target tag is used to instruct the client to display the target tag in the page displayed to the first request account, so that the viewer user can quickly enter the corresponding anchor user's live broadcast room based on the displayed target tag, and obtain more traffic and attention for the anchor user.
[0068] Figure 2 is a flow chart of a page data processing method according to an exemplary embodiment. Figure 2 As shown, taking the method applied to the server in FIG. 1 as an example, the method includes the following steps.
[0069] In step S210, a tag request from a client is received.
[0070] Usually, when an audience user opens a live broadcast application, the live broadcast application will refresh and display a resource display page, which displays multimedia resources shared by the anchor user. When the audience user is not interested in the multimedia resources displayed in the resource display page, the displayed resource display page can also be refreshed to update the multimedia resources displayed in the resource display page. In addition, when displaying the multimedia resources shared by each anchor user, the resource display page can also display corresponding tag information, so that the audience user can quickly enter the live broadcast room of the corresponding anchor user based on the displayed tag information, and obtain more traffic and attention for the anchor user. In traditional technology, tags are configured by developers, and the display strategy of tags is controlled by the corresponding business, which leads to high pressure on tag development, and the control of display strategy by the business will affect the operating efficiency of the business.
[0071] Based on this, in this embodiment, the display strategy of the label is sent to the server for processing, thereby improving the operating efficiency of the business. In this embodiment, when the client detects the refresh operation of the viewer user on the resource display page, the client generates a corresponding label request and sends the label request to the server. Among them, the label request carries the account identifier of the first request account, the account identifier of the second request account corresponding to the page content, and the target category information. Specifically, the first request account is the viewer user of the current request, the page content is the multimedia resources shared by the anchor user displayed in the current request page, the second request account is the anchor user who shares the currently displayed multimedia resources, and the target category information is the category information of the label displayed in the multimedia resources, including but not limited to the major categories of labels and the display style of labels. The account identifier is an identifier used to distinguish different users. For example, it can be a unique identification code of the user. Among them, the major category of the label can be determined based on the business scenario of the label, for example, it is an operational business or other type of business, etc., and the display style of the label can be determined based on the display scenario of the client, such as whether it is a single-column display scenario or a double-column display scenario, as well as the specific display style in the single-column display scenario or the specific display style in the double-column display scenario.
[0072] In step S220, a target tag matching the account identifier of the first requesting account, the account identifier of the second requesting account, and the target category information is obtained from the cache.
[0073] Among them, the target tag is a specific tag displayed when the resource display page displays multimedia resources, and the tag usually has a corresponding display strategy, for example, which tags can be displayed in the multimedia resources shared by which anchor users, which audience users can see which tags, which types of tags can be displayed in which business scenarios, etc. The corresponding display strategy of the tag is stored in the cache. Therefore, when the server receives the tag request from the client, it can obtain the target tag that matches the account ID of the first request account, the account ID of the second request account, and the target category information based on the display strategy stored in the cache.
[0074] In step S230, the target tag is returned to the client.
[0075] Specifically, by returning the target tag obtained above to the client, the client is instructed to display the target tag in the page displayed to the first requesting account, so that the first requesting account can quickly enter the live broadcast room of the corresponding anchor user based on the displayed target tag, thereby obtaining more traffic and attention for the anchor user.
[0076] In the above-mentioned page data processing method, by receiving the tag request from the client, and obtaining the target tag matching the account identifier of the first request account, the account identifier of the second request account and the target category information in the tag request from the cache, and then returning the target tag to the client, the first request account can quickly enter the live broadcast room of the corresponding anchor user based on the displayed target tag, and obtain more traffic and attention for the anchor user. In addition, since the tag display strategy and the process of determining the target tag in this embodiment are controlled by the server, the operating efficiency of the client can be improved.
[0077] In an exemplary embodiment, since the display strategy corresponding to the tag is stored in the cache, for example, which tags can be displayed in the multimedia resources shared by which anchor users, which tags can be seen by which audience users, and which types of tags can be displayed in which business scenarios. For the live broadcast scene, the number of anchor users and audience users is huge, ranging from hundreds of thousands to millions or tens of millions. If the corresponding relationship between anchor users and tags and the corresponding relationship between audience users and tags are directly stored, the data storage space and reading efficiency will be greatly affected. Since the tag will be accessed by the user first, when the QPS (Queries-per-second) of accessing the tag is large, the high availability and performance of the service are also difficult to guarantee. Based on this, this embodiment stores the display strategy corresponding to the tag in the cache in a bitmap compression manner (Roaring Bitmaps), thereby greatly saving the storage space of the data, improving the reading efficiency of the data, and being conducive to ensuring the high availability and performance of the service. Specifically, the cache stores the first corresponding relationship between the tag and the account identifier of the first account and the second corresponding relationship between the account identifier of the second account and the tag in a bitmap compression manner. Among them, the first account refers to the audience user, and the second account refers to the anchor user.
[0078] If Figure 3 As shown, in step S220, obtaining a target tag matching the account identifier of the first requesting account, the account identifier of the second requesting account, and the target category information from the cache may specifically include:
[0079] In step S310, a first tag matching the account identifier of the second requesting account is acquired according to the second corresponding relationship.
[0080] Since the second correspondence stores the correspondence between the account ID of the second account and the tag, that is, the display strategy of which tags can be displayed in the multimedia resources shared by which anchor users. For different anchor users, the tags that can be displayed in the multimedia resources they share may be different. Therefore, after obtaining the tag request, the server can preliminarily screen which tags can be displayed for the multimedia resources displayed on the page according to the second correspondence in the cache. That is, based on the account ID of the second request account that shares the multimedia resource, the tags that match it are screened in the second correspondence. In this embodiment, for the convenience of explanation, the tag that matches the account ID of the anchor user obtained by screening in this step is defined as the first tag.
[0081] In step S320, a second tag matching the account identifier of the first requesting account is filtered from the first tags according to the first corresponding relationship.
[0082] Since the first correspondence stores the correspondence between the tag and the account identifier of the first account, that is, which tags can be seen by which audience users. Different audience users may see different tags for multimedia resources shared by the same anchor user. Therefore, after performing the above preliminary screening, the server further screens the tags that the requested audience user can see from the above first tags according to the first correspondence in the cache.
[0083] Specifically, the server can first filter the corresponding relationship between the first tag and the account identifier of the first account from the first corresponding relationship based on the first tag, and then filter the tag matching the account identifier of the first requesting account in the corresponding relationship. In this embodiment, for the convenience of explanation, the tag that matches the account identifier of the viewer user finally filtered in this step is defined as the second tag.
[0084] In step S330, the configuration information of the second tag is obtained.
[0085] Among them, the configuration information of the tag includes the category information of the second tag, including but not limited to the major categories of tags and the display style of tags. In addition, because the types of tags that can be displayed in different business scenarios are also different, and the tag request carries the target type information of the tags that can be displayed in the current scenario. Therefore, in this embodiment, based on the second tag obtained by the above screening, the configuration information of the second tag can be obtained. Then, the target tag is determined based on the subsequent steps.
[0086] In step S340, a third tag matching the target category information is filtered out from the second tags according to the configuration information of the second tags as the target tag.
[0087] Specifically, based on the target type information of the tags that can be displayed in the current scene, and according to the configuration information of the second tag, a third tag matching the target category information is filtered from the second tags as the target tag.
[0088] In the above embodiment, the first tag matching the account identifier of the second request account is obtained according to the second correspondence, the second tag matching the account identifier of the first request account is screened from the first tag according to the first correspondence, and the configuration information of the second tag is obtained, and the third tag matching the target category information is screened from the second tag according to the configuration information of the second tag as the target tag. Since the first correspondence and the second correspondence are display strategies pre-stored in the cache in a bitmap manner, the server can quickly determine the target tag from the cache based on the received tag request to improve data processing efficiency.
[0089] In an exemplary embodiment, the configuration information of the tag may also include the priority of the tag. When there are multiple third tags obtained in step S340, the priority of each third tag is further obtained, and the third tag with the highest priority is used as the target tag. The priority is a parameter that determines the priority level of each tag display. When the parameter is larger, the corresponding display priority level is higher, and when the parameter is smaller, the corresponding display priority level is lower.
[0090] Specifically, when there are multiple third tags obtained as above, the priority of each third tag is further obtained, and the multiple third tags are sorted from large to small or from small to large based on the priority, and the third tag with the highest priority (i.e., the first or the last in the sorting) is used as the target tag. This embodiment uses the third tag with the highest priority as the target tag, thereby realizing a strategy of displaying and controlling tags based on priority, thereby improving the flexibility of tag display.
[0091] In an exemplary embodiment, it is understood that in Figure 3 In the illustrated embodiment, when the first tag is not found after filtering, or the first tag is found but the second tag is not found, or the second tag is found but the third tag is not found, the server returns an empty tag to the client. At this time, the client will not display the tag in the page displayed to the first requesting account. Thus, different pages are displayed to different audience users in different business scenarios to achieve personalized display of pages.
[0092] In an exemplary embodiment, in order to ensure high availability and performance of the service, a multi-level access mechanism may be used to obtain the configuration information of the second tag. Figure 4 As shown, in step S330, obtaining the configuration information of the second tag may specifically include:
[0093] In step S332, configuration information of the second tag is queried from the local cache.
[0094] Since the local cache has the characteristic of fast access speed, when the configuration information of a tag needs to be queried, it can be searched from the local cache first. Specifically, the configuration information of the second tag is queried from the local cache. If the configuration information of the second tag is found, the configuration information of the second tag obtained by the query is directly called for processing, and the subsequent process ends.
[0095] In step S334, when the configuration information of the second tag is not found from the local cache, the configuration information of the second tag is found from the distributed cache system.
[0096] If the configuration information of the second tag is not found in the local cache, that is, the local cache is penetrated, the configuration information of the second tag is found in the distributed cache system. If the configuration information of the second tag is found, the configuration information of the second tag obtained by the query is directly called for processing, and the subsequent process ends.
[0097] In step S336, when the configuration information of the second tag is not found from the distributed cache system, the configuration information of the second tag is obtained from the database.
[0098] If the configuration information of the second tag is not queried from the distributed cache system, that is, when the distributed cache system is penetrated, the cache setter is called to query the configuration information of the second tag from the database, and process based on the configuration information of the second tag obtained by the query.
[0099] In step S338, the acquired configuration information of the second tag is stored in the distributed cache system.
[0100] Specifically, based on the configuration information of the second tag obtained by the above query, the configuration information of the second tag obtained by the query can also be stored in the distributed cache system through the cache setter for use in processing subsequent tag requests, thereby reducing access to the database.
[0101] In the above embodiment, when obtaining the configuration information of the second tag, the configuration information of the second tag is queried from the local cache. When the configuration information of the second tag is not queried from the local cache, the configuration information of the second tag is queried from the distributed cache system. When the configuration information of the second tag is not queried from the distributed cache system, the configuration information of the second tag is obtained from the database, and the obtained configuration information of the second tag is stored in the distributed cache system. The configuration information of the second tag is obtained by adopting a multi-level access mechanism to ensure high availability and performance of the service.
[0102] In an exemplary embodiment, in order to save data storage space and improve data reading efficiency, the display strategy corresponding to the tag is stored in the cache in a bitmap compression manner. However, for live broadcast scenarios in the network, the display strategy often changes. Based on this, in order to ensure the correctness of the display strategy stored in the cache, this embodiment can update the cache through a scheduled task. Figure 5 As shown, the above method may further include the following steps:
[0103] In step S510, when the cache update time arrives, a tag set whose tag status is online is obtained from the database.
[0104] The cache update time refers to the task start time of the scheduled task for updating the cache. For example, if the scheduled task for updating the cache is started every half hour, then based on the initial time of the scheduled task, the scheduled task is started every half hour when the cache update time arrives.
[0105] The tag status is a specific form that reflects the life cycle of the tag, for example, including but not limited to the pending review state, the pending online state, the online state, the offline state, the withdrawn state, and the rejected state. However, in the entire process of the tag life cycle, only the tags in the online state can be used normally. Therefore, in this embodiment, when the cache update time arrives, a tag set with the tag state of the online state is obtained from the database, wherein the tag set includes several tags in the online state. That is, the tags that can be used normally are obtained from the database, and then the cache is updated through subsequent steps.
[0106] In step S520, the cache is updated according to a number of tags in the tag set.
[0107] Each tag has a corresponding tag identifier and configuration information, and the configuration information includes the anchor group that can be displayed corresponding to the tag and the audience group that can see the tag. Specifically, the anchor group and the audience group are user categories divided based on the user characteristics of the anchor user and the user characteristics of the audience user, respectively. Therefore, the anchor group and the audience group can be mapped to specific anchor users and audience users, respectively.
[0108] Therefore, in this embodiment, based on the several tags of online status obtained as mentioned above, as well as the tag identifier of each tag and the anchor user and audience user corresponding to each tag, the cache can be updated, that is, the first corresponding relationship between the tag and the account identifier of the first account in the cache is updated, and the second corresponding relationship between the account identifier of the second account and the tag is updated.
[0109] In the above embodiment, when the cache update time arrives, a tag set with an online tag state is obtained from the database, and the cache is updated according to several tags in the tag set, thereby ensuring the correctness of the display strategy stored in the cache.
[0110] In an exemplary embodiment, each tag has a corresponding tag identifier and configuration information, wherein the configuration information also includes a second account category identifier corresponding to the tag; the cache also includes a third correspondence between the tag and the account identifier of the second account stored in a bitmap compression manner. Figure 6 As shown, in step S520, the cache is updated according to several tags in the tag set, which may specifically include:
[0111] In step S610, a second association relationship between the tag identifier of the tag and the second account category identifier is established according to the configuration information of each tag.
[0112] Among them, the second account category identifier refers to the anchor group identifier. Since the number of anchor users is huge, they can be packaged and classified based on the characteristics of the anchor users. For example, anchor users can be classified based on the business type of the live broadcast business performed by the anchor users, such as food, fashion, shopping, etc. And each type of anchor group is identified to facilitate the distinction between different types of anchor groups. Of course, anchor users can also be classified based on other methods, and this embodiment does not limit this.
[0113] In this embodiment, based on the above-obtained several labels of online status, and the label identifier and configuration information corresponding to each label, a second association relationship between the label identifier of each label and the second account category identifier can be established. For example, if the obtained several labels of online status include label A, label B and label C, if the configuration information corresponding to label A records that the second account category identifier is anchor groups X1, X2 and Y1, the configuration information corresponding to label B records that the second account category identifier is anchor groups X2, Y1 and Y2, and the configuration information corresponding to label C records that the second account category identifier is anchor group Y2. Then the second association relationship between the label identifier of each label and the second account category identifier established includes: the association relationship between label A and anchor groups X1, X2 and Y1, the association relationship between label B and anchor groups X2, Y1 and Y2, and the association relationship between label C and anchor group Y2. Among them, A, B and C are corresponding label identifiers, and X1, X2, Y1 and Y2 are corresponding second account category identifiers.
[0114] In step S620, a plurality of second accounts matching the second account category identifier and the account identifier of each second account are obtained from the database as a first data set.
[0115] Since the second account category identifier is an anchor group identifier obtained by packaging and classifying based on the characteristics of the anchor user, a specific anchor user can be mapped based on the anchor group identifier.
[0116] Specifically, according to the second account category identifier involved in the above-mentioned second association relationship, several second accounts matching the second account category identifier and the account identifier of each second account are obtained from the database, that is, the account identifiers of all second accounts involved in the tag that is currently online are obtained and used as the first data set, which is new data for updating the cache.
[0117] In step S630, the account identifier of the second account corresponding to the tag is obtained from the cache according to the third corresponding relationship as the second data set.
[0118] Since the third correspondence stores the correspondence between the tag and the account identifier of the second account, the account identifier of the second account corresponding to the tag in the third correspondence is obtained from the cache. That is, the account identifiers of all second accounts involved in the third correspondence are obtained from the cache and used as the second data set. Since the second data set is obtained from the original cache, it is old data that needs to be updated.
[0119] In step S640, a difference set between the second data set and the first data set is obtained, and the second corresponding relationship and the third corresponding relationship in the cache are updated according to the difference set.
[0120] In live broadcast scenarios, the anchor group often changes. For example, 100,000 anchor users are deleted from a certain anchor group. Therefore, it is necessary to synchronize such changes in near real time when processing page data. That is, to shield the corresponding tags for the multimedia resources shared by these 100,000 anchors in near real time.
[0121] Based on this, in this embodiment, the difference set between the second data set and the first data set is obtained, and the second correspondence and the third correspondence in the cache are updated according to the difference set. Among them, the difference set between the second data set and the first data set refers to the set composed of all elements belonging to the second data set but not belonging to the first data set, that is, the account identifier of the second account belonging to the second data set but not belonging to the first data set. The second correspondence and the third correspondence in the cache are updated according to the difference set, and the account identifier of the second account corresponding to the difference set can be deleted from the second correspondence in the cache to update the second correspondence, thereby obtaining an updated second correspondence; and the account identifier of the second account corresponding to the difference set can be deleted from the third correspondence in the cache to update the third correspondence, thereby obtaining an updated third correspondence, so as to achieve timely deletion of the anchor user who has been deleted from the anchor group from the cache.
[0122] In the above embodiment, a second association relationship between the tag identifier of the tag and the second account category identifier is established according to the configuration information of each tag, and a plurality of second accounts matching the second account category identifier and the account identifier of each second account are obtained from the database as the first data set, and the account identifier of the second account corresponding to the tag is obtained from the cache according to the third corresponding relationship as the second data set, and the difference set between the second data set and the first data set is obtained, and the second corresponding relationship and the third corresponding relationship in the cache are updated according to the difference set. In this way, the cache is updated to ensure the correctness of the display strategy stored in the cache.
[0123] In an exemplary embodiment, the configuration information of each tag also includes the first account category identifier corresponding to the tag. Figure 7 As shown, in step S520, the cache is updated according to several tags in the tag set, which may specifically include:
[0124] In step S710, a first association relationship between a tag identifier of a tag and a first account category identifier is established according to configuration information of each tag.
[0125] The first account category identifier refers to the audience group identifier. Similarly, this embodiment can package and classify based on the characteristics of the audience user. For example, the audience users can be classified based on the level or activity level of the audience users, and each type of audience group can be identified to facilitate the distinction between different types of audience groups. Of course, the audience users can also be classified based on other methods, such as whitelists, etc., which are not limited in this embodiment.
[0126] In this embodiment, based on the above-obtained multiple online status tags, and the tag identifier and configuration information corresponding to each tag, a first association relationship between the tag identifier of each tag and the first account category identifier can be established. The specific principle is basically the same as the above embodiment, and this embodiment will not be repeated.
[0127] In step S720, a plurality of first accounts matching the first account category identifier and an account identifier of each first account are obtained from a database.
[0128] Since the first account category identifier is an audience group identifier obtained by packaging and classifying based on the characteristics of the audience user, it can be mapped to a specific audience user based on the audience group identifier.
[0129] Specifically, according to the first account category identifier involved in the above-mentioned first association relationship, several first accounts matching the first account category identifier and the account identifier of each first account can be obtained from the database, that is, the account identifiers of all first accounts involved in the tag that is currently online are obtained, that is, new data for updating the cache is obtained.
[0130] In step S730, the first corresponding relationship in the cache is updated according to the tag identifier corresponding to the first association relationship and the account identifier of each first account matching the first account category identifier.
[0131] Since the first correspondence stores the correspondence between the tag and the account identifier of the first account, the first correspondence in the cache can be updated according to the tag that is currently online and the account identifiers of all first accounts involved in the tag that is currently online in the first association relationship. For example, the tag that is currently online and the account identifiers of the first accounts involved in each tag can be obtained, and each tag and the account identifier of the first account involved can be stored in the cache as a new first correspondence.
[0132] In the above embodiment, a first association relationship between the tag identifier of the tag and the first account category identifier is established according to the configuration information of each tag, a plurality of first accounts matching the first account category identifier and the account identifier of each first account are obtained from the database, and the first corresponding relationship in the cache is updated according to the tag identifier corresponding to the first association relationship and the account identifier of each first account matching the first account category identifier, thereby realizing the update of the cache and ensuring the correctness of the display strategy stored in the cache.
[0133] In an exemplary embodiment, due to the huge number of users in the anchor group and the audience group, it takes a long time to obtain the user identification of the corresponding group and update the cache. Based on this, in this embodiment, in order to improve the cache efficiency, the processing of steps S620 to S640 and steps S720 to S730 can be executed in multiple threads of the thread pool.
[0134] For example, when obtaining the account identifier of the first account, different threads can be used to obtain the account identifier of the first account under the first account category identifier based on different first account category identifiers. Similarly, when obtaining the account identifier of the second account, different threads can be used to obtain the account identifier of the second account under the second account category identifier based on different second account category identifiers. And each thread is executed in parallel, which greatly saves the time of obtaining the user identifier of the corresponding group and updating the cache, which is conducive to improving the cache efficiency.
[0135] In an exemplary embodiment, if Figure 8 As shown, in step S510, before obtaining the tag set whose tag status is online from the database, the above method may further include:
[0136] In step S810 , a request to create a tag is received.
[0137] The tag creation request refers to a request to create a tag, and specifically, the creation request includes the tag identifier of the tag and the corresponding configuration information. The tag identifier is a mark used to distinguish different tags, and the configuration information may be the description information of the tag, including but not limited to the state of the tag, the category information of the tag, the group identifier of the anchors who can display the tag (i.e., the second account category identifier), the group identifier of the audience who can see the tag (i.e., the first account category identifier), etc.
[0138] In step S820, when the creation request is verified, the tag identification and configuration information of the corresponding tag are stored in the database, and the status of the tag is marked as pending review.
[0139] Specifically, when there is a need to create a tag, a tag creation request can be initiated to the server. When the server receives the tag creation request, it performs parameter verification based on the creation request. The specific verification logic can be pre-set. For example, the tag identifier can be verified based on the tag identifier rule, and the integrity of each parameter in the configuration information can also be verified.
[0140] When the server passes the verification of the creation request, it stores the tag identification and configuration information of the corresponding tag in the database and marks the status of the tag as pending review (such as Fig. 9 As shown in the figure, after the label is successfully created, the corresponding label status is pending for review). At the same time, the corresponding reviewer can also be notified to review, for example, a review notification is sent to the reviewer through instant messaging.
[0141] In the above embodiment, a request to create a label is received and the creation request is verified. When the creation request is verified, the label identification and configuration information of the corresponding label are stored in a database, and the status of the label is marked as pending review, thereby realizing the creation of the label and effective management of the label status.
[0142] In an exemplary embodiment, in step S820, after the tag identification and configuration information of the corresponding tag are stored in the database, the method may further include: receiving a withdrawal request for the tag in the pending review state, updating the state of the tag to be withdrawn (e.g. Fig. 9As shown, when a tag to be reviewed is withdrawn, the corresponding tag status is updated to withdrawn). The withdrawal request is a request to withdraw the review of the tag, and the withdrawal request carries the tag identifier of the tag to be withdrawn. In this embodiment, when the server receives a withdrawal request for a tag in the pending review state, the status of the corresponding tag is updated to withdrawn based on the tag identifier carried in the withdrawal request, thereby achieving effective management of the tag status.
[0143] In an exemplary embodiment, in step S820, after the label identification and configuration information of the corresponding label are stored in the database, the above method may further include: receiving an audit request for the label to be audited, wherein the audit request refers to a request for auditing the label to be audited, and the audit request may include the label identification of the label to be audited and the corresponding audit result. When the audit result is that the audit is passed, the configuration information of the label after the audit is obtained, and the audited configuration information is verified. When the audited configuration information is verified to be passed, the configuration information of the corresponding label in the database is updated according to the audited configuration information, and the status of the label is updated to be online. Since the auditor can modify the configuration information of the label when auditing the label, when the audit result is that the audit is passed, it is necessary to obtain the configuration information of the label after the audit and verify it again. Only after the verification is passed, the database is updated. When the audit result is that the audit is not passed, the status of the label is updated to be rejected (such as Fig. 9 As shown, when the label to be reviewed passes the review, the corresponding label status is updated to pending; and when the label fails the review, the corresponding label status is updated to rejected). This embodiment separates the review and creation of labels, thereby achieving effective management of labels and label status.
[0144] In an exemplary embodiment, the configuration information may also include the effective time of the corresponding tag. After the above-mentioned update tag status is to be online, it may also include: when the first task time arrives, obtain the configuration information of the tag in the database with the status of to be online, and when the effective time of the tag in the configuration information is greater than the first task time, update the status of the corresponding tag to online.
[0145] Specifically, the life cycle of a tag can also be managed based on the effective time of the tag, that is, the tag status is automatically updated based on the effective time of the tag. The first task time is the start time of the scheduled task for automatically updating the tag status. For example, if the scheduled task for automatically updating the tag status is started every half hour, then based on the initial time of the scheduled task, the scheduled task is started every half hour, that is, the first task time arrives every half hour.
[0146] In this embodiment, when the first task time arrives, that is, when the start time of the scheduled task for automatically updating the tag status arrives, the configuration information of the tag in the database whose status is to be online is obtained. When the effective time of the tag in the configuration information is greater than the first task time, that is, when the first task time arrives, the tag has entered the effective time, then the status of the corresponding tag is updated to online (such as Fig. 9 As shown in FIG. 1 , when the effective time of the tag to be put online arrives, the corresponding tag status is updated to online), that is, the tag is automatically put online. This makes the online control of tags more flexible and can effectively manage the tag status.
[0147] In an exemplary embodiment, the method further includes: when the first task time arrives, obtaining configuration information of tags in the database whose status is pending review, and when the effective time of the tag in the configuration information is greater than the first task time, updating the status of the corresponding tag to offline.
[0148] Specifically, when the effective time of the tag in the configuration information is greater than the first task time, it means that the tag has entered the effective time. However, since the status of the tag is pending review, it means that the tag has not been reviewed yet, that is, the tag has expired and has not been reviewed. Therefore, the status of the corresponding tag is updated to offline (such as Fig. 9 As shown in FIG. 1 , when the effective time of the tag to be reviewed arrives but the tag has not been reviewed yet, the corresponding tag status is updated to offline). This enables effective management of the tag status.
[0149] In an exemplary embodiment, the configuration information may also include the expiration time of the corresponding tag. Then the method may also include: when the first task time arrives, obtaining the configuration information of the tag whose status is online in the database; when the expiration time of the tag in the configuration information is greater than the first task time, updating the status of the corresponding tag to offline.
[0150] Specifically, the life cycle of a tag can also be managed based on the expiration time of the tag, that is, the tag status is automatically updated based on the expiration time of the tag. In this embodiment, when the first task time arrives, that is, when the start time of the scheduled task for automatically updating the tag status arrives, the configuration information of the tag in the database with the status online is obtained. When the effective time of the tag in the configuration information is greater than the first task time, that is, when the first task time arrives, the tag has entered the expiration time, then the status of the corresponding tag is updated to offline (such as Fig. 9 As shown in the figure, when the expiration time of the online tag is reached, the corresponding tag status is updated to offline), that is, the tag is automatically offline controlled. This makes the offline control of the tag more flexible and can effectively manage the tag status.
[0151] In an exemplary embodiment, the method may further include: receiving an offline request for a tag to be online or online, and updating the state of the corresponding tag to offline according to the offline request. The offline request refers to a request to offline a tag, and the offline request carries a tag identifier corresponding to the tag to be offline. Usually, the offline request is generated by manual intervention.
[0152] Specifically, when a tag among the tags to be online needs to be offlined, a corresponding offline request can be initiated, and the tag identifier of the tag to be offline is carried in the request, such as Fig. 9 As shown, the server can update the status of the corresponding tag to offline based on the tag identifier carried in the offline request. Similarly, when it is necessary to offline a tag among the online tags, the method is similar, and this embodiment will not be repeated.
[0153] The above embodiment receives an offline request for a tag to be online or online, and updates the status of the corresponding tag to offline according to the offline request, thereby realizing flexible control of the tag and effectively managing the tag status.
[0154] In an exemplary embodiment, after the status of the corresponding tag is updated to offline, the offline reason of the corresponding tag can also be recorded. Fig. 9 As shown in the figure, since there are multiple update paths for the offline status of a tag, in order to facilitate subsequent data analysis, when a tag's status is updated to offline, its offline reason can be recorded at the same time, for example, whether it is offline when the expiration time is reached, offline due to expired and unreviewed, offline due to manual intervention in the waiting-to-go-online stage, or offline due to manual intervention in the online stage. This improves the integrity of data records.
[0155] In an exemplary embodiment, if Fig.10 As shown, the above method may also include: when the second task time arrives, obtaining the configuration information of the tag in the database whose status is to be reviewed; when the difference between the effective time of the tag in the configuration information and the second task time is less than the set time threshold, sending a review notification of the tag to the target review object. The review notification is used to instruct the target review object to review the tag.
[0156] Among them, the second task time is the start time of the scheduled task of sending the audit notification to the target audit object again. Since the creation and audit of the label are separate, it is usually audited by the label administrator (i.e., the target audit object). In order to realize the full online management of the label, it is necessary to consider the scenario that the administrator forgets to audit. In this embodiment, when the label is successfully created, the server sends the audit notification to the administrator for the first time. When the label in the pending audit state is less than the set time threshold from the effective time of the label (i.e., the condition of the second notification is met), the audit notification can be sent to the administrator again. For example, if the set time threshold is 1 hour, when the second task time arrives, the configuration information of the label in the database with the status of pending audit is obtained. When the difference between the second task time and the effective time of a certain label is less than 1 hour, it means that the label should be effective and online in less than 1 hour. However, the label has not been audited at this time. Therefore, the audit notification of the label can be sent to the administrator again to remind the administrator to audit the label. Thereby avoiding the scenario where the administrator forgets to audit and realizing the full online management of the label.
[0157] It should be understood that although Figure 1A-Figure 10 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1A-Figure 10 At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.
[0158] It can be understood that the same / similar parts between the various embodiments of the above method in this specification can refer to each other, and each embodiment focuses on the differences from other embodiments. For related points, please refer to the description of other method embodiments.
[0159] Fig.11 is a block diagram of a page data processing device according to an exemplary embodiment. Fig.11 The device includes a tag request receiving module 1102 , a target tag acquiring module 1104 and a target tag returning module 1106 .
[0160] The tag request receiving module 1102 is configured to receive a tag request from a client, and obtain an account identifier of a first requesting account, an account identifier of a second requesting account corresponding to the page content, and target category information carried in the tag request, wherein the tag request is generated based on a refresh operation of the first requesting account on the page;
[0161] The target tag acquisition module 1104 is configured to execute acquisition of a target tag matching the account identifier of the first requesting account, the account identifier of the second requesting account, and the target category information from a cache;
[0162] The target tag returning module 1106 is configured to return the target tag to the client, where the target tag is used to instruct the client to display the target tag in the page displayed to the first requesting account.
[0163] In an exemplary embodiment, the cache stores a first correspondence between a tag and an account identifier of a first account, and a second correspondence between an account identifier of a second account and a tag in a bitmap compression manner; the target tag acquisition module includes: a first tag acquisition unit, configured to acquire a first tag matching the account identifier of the second request account according to the second correspondence; a second tag acquisition unit, configured to filter a second tag matching the account identifier of the first request account from the first tag according to the first correspondence; a configuration information acquisition unit, configured to acquire configuration information of the second tag, the configuration information of the tag including category information of the second tag; a target tag determination unit, configured to filter a third tag matching the target category information from the second tag according to the configuration information of the second tag as the target tag.
[0164] In an exemplary embodiment, the configuration information of the tag also includes the priority of the tag; the target tag determination unit is also configured to execute: when there are multiple third tags, obtain the priority of each third tag; and use the third tag with the highest priority as the target tag.
[0165] In an exemplary embodiment, the configuration information acquisition unit is configured to perform: querying the configuration information of the second tag from the local cache; when the configuration information of the second tag is not queried from the local cache, querying the configuration information of the second tag from the distributed cache system; when the configuration information of the second tag is not queried from the distributed cache system, acquiring the configuration information of the second tag from the database; and storing the acquired configuration information of the second tag in the distributed cache system.
[0166] In an exemplary embodiment, the device also includes a cache update module, which includes: a tag set acquisition unit, configured to execute when the cache update time arrives, to obtain a tag set with a tag status of online from a database, wherein the tag set includes several tags; an update unit, configured to execute an update of the cache according to several tags in the tag set.
[0167] In an exemplary embodiment, each tag has a corresponding tag identifier and configuration information, and the configuration information also includes a first account category identifier corresponding to the tag; the update unit is configured to perform: establishing a first association relationship between the tag identifier of the tag and the first account category identifier according to the configuration information of each tag; obtaining from a database a number of first accounts matching the first account category identifier and the account identifier of each first account; and updating the first corresponding relationship in the cache according to the tag identifier corresponding to the first association relationship and the account identifier of each first account matching the first account category identifier.
[0168] In an exemplary embodiment, the configuration information also includes a second account category identifier corresponding to the tag; the cache also includes a third correspondence between the tag and the account identifier of the second account stored in a bitmap compression manner; the update unit is also configured to execute: establishing a second association relationship between the tag identifier of the tag and the second account category identifier according to the configuration information of each tag; obtaining from the database a number of second accounts matching the second account category identifier and the account identifier of each second account as a first data set; obtaining from the cache the account identifier of the second account corresponding to the tag according to the third correspondence as a second data set; obtaining a difference set between the second data set and the first data set, and updating the second correspondence relationship and the third correspondence relationship in the cache according to the difference set.
[0169] In an exemplary embodiment, the difference set is the account identifier of the second account that belongs to the second data set but does not belong to the first data set; the updating unit is further configured to execute: deleting the account identifier of the second account corresponding to the difference set from the cached second correspondence to obtain an updated second correspondence; deleting the account identifier of the second account corresponding to the difference set from the cached third correspondence to obtain an updated third correspondence.
[0170] In an exemplary embodiment, the device also includes a label creation module, which is configured to execute: receiving a request to create a label, the creation request including a label identifier and corresponding configuration information of the label; when the creation request is verified, storing the label identifier and configuration information of the corresponding label in a database, and marking the status of the label as pending review.
[0171] In an exemplary embodiment, the device further comprises a label status updating module configured to execute: receiving a withdrawal request for a label in a pending review state, the withdrawal request comprising a label identifier of the label; and updating the status of the label to withdrawn.
[0172] In an exemplary embodiment, the label status update module is further configured to execute: receiving a review request for a label, the review request including a label identifier of the label and a corresponding review result; when the review result is a passed review, obtaining configuration information of the label after review; when the reviewed configuration information is verified to be passed, updating the configuration information of the corresponding label in the database according to the reviewed configuration information, and updating the status of the label to be online; when the review result is a failed review, updating the status of the label to rejected.
[0173] In an exemplary embodiment, the configuration information includes the effective time of the corresponding tag; the tag status update module is also configured to execute: when the first task time arrives, obtain the configuration information of the tag in the database whose status is to be online; when the effective time of the tag in the configuration information is greater than the first task time, update the status of the corresponding tag to online.
[0174] In an exemplary embodiment, the label status update module is also configured to execute: when the first task time arrives, obtain the configuration information of the label in the database whose status is pending review; when the effective time of the label in the configuration information is greater than the first task time, update the status of the corresponding label to offline.
[0175] In an exemplary embodiment, the configuration information also includes the expiration time of the corresponding tag; the tag status update module is also configured to execute: when the first task time arrives, obtain the configuration information of the tag with an online status in the database; when the expiration time of the tag in the configuration information is greater than the first task time, update the status of the corresponding tag to offline.
[0176] In an exemplary embodiment, the tag status update module is further configured to execute: receiving an offline request for a tag to be online or online, the offline request carrying a tag identifier of the tag; and updating the status of the corresponding tag to offline according to the offline request.
[0177] In an exemplary embodiment, the device also includes a notification module, which is configured to execute: when the second task time arrives, obtain the configuration information of the label in the database whose status is pending review; when the difference between the second task time and the effective time of the label in the configuration information is less than the set time threshold, send a review notification of the label to the target review object, and the review notification is used to instruct the target review object to review the label.
[0178] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0179] Fig.12 is a block diagram of an electronic device S00 for page data processing according to an exemplary embodiment. For example, the electronic device S00 may be a server. Fig.12 The electronic device S00 includes a processing component S20, which further includes one or more processors, and a memory resource represented by a memory S22 for storing instructions executable by the processing component S20, such as an application. The application stored in the memory S22 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component S20 is configured to execute the instructions to perform the above method.
[0180] The electronic device S00 may further include: a power supply component S24 configured to perform power management of the electronic device S00, a wired or wireless network interface S26 configured to connect the electronic device S00 to a network, and an input / output (I / O) interface S28. The electronic device S00 may operate based on an operating system stored in the memory S22, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD or the like.
[0181] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory S22 including instructions, and the above instructions can be executed by a processor of the electronic device S00 to complete the above method. The storage medium can be a computer-readable storage medium, for example, the computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0182] In an exemplary embodiment, a computer program product is further provided. The computer program product includes instructions. The instructions can be executed by a processor of the electronic device S00 to complete the above method.
[0183] It should be noted that the above-mentioned devices, electronic devices, computer-readable storage media, computer program products, etc. may also include other implementation methods according to the description of the method embodiments. The specific implementation methods can refer to the description of the relevant method embodiments, which will not be described one by one here.
[0184] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.
[0185] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A page data processing method, It is characterized in that The method comprises: Receiving a tag request from a client, obtaining an account identifier of a first requesting account, an account identifier of a second requesting account corresponding to the page content, and target category information carried in the tag request, wherein the tag request is generated based on a refresh operation of the first requesting account on the page; Acquire a target tag matching the account identifier of the first requesting account, the account identifier of the second requesting account, and the target category information from a cache; Returning the target tag to the client, where the target tag is used to instruct the client to display the target tag in a page displayed to the first requesting account; The cache stores a first correspondence between the tag and the account identifier of the first account, and a second correspondence between the account identifier of the second account and the tag in a bitmap compression manner; the step of obtaining a target tag that matches the account identifier of the first request account, the account identifier of the second request account, and the target category information from the cache includes: obtaining a first tag that matches the account identifier of the second request account according to the second correspondence; filtering a second tag that matches the account identifier of the first request account from the first tag according to the first correspondence; obtaining configuration information of the second tag, the configuration information of the tag including category information of the second tag; and filtering a third tag that matches the target category information from the second tag according to the configuration information of the second tag as the target tag.
2. The method according to claim 1, It is characterized in that The configuration information of the tag also includes the priority of the tag; and the method further includes: When there are multiple third tags, obtaining the priority of each third tag; The third tag with the highest priority is used as the target tag.
3. The method according to claim 1, It is characterized in that The acquiring the configuration information of the second tag includes: Query the configuration information of the second tag from the local cache; When the configuration information of the second tag is not found from the local cache, querying the configuration information of the second tag from the distributed cache system; When the configuration information of the second tag is not found from the distributed cache system, acquiring the configuration information of the second tag from a database; and, The acquired configuration information of the second tag is stored in the distributed cache system.
4. The method according to claim 1, It is characterized in that The method further comprises: When the cache update time arrives, a tag set whose tag status is online is obtained from the database, wherein the tag set includes a plurality of tags; The cache is updated according to a plurality of tags in the tag set.
5. The method according to claim 4, It is characterized in that Each tag has a corresponding tag identifier and configuration information, and the configuration information also includes a first account category identifier corresponding to the tag; The updating of the cache according to the plurality of tags in the tag set includes: Establishing a first association relationship between a tag identifier of each tag and a first account category identifier according to configuration information of the tag; Acquire from a database a plurality of first accounts matching the first account category identifier and an account identifier of each first account; The first corresponding relationship in the cache is updated according to the tag identifier corresponding to the first association relationship and the account identifier of each first account matching the first account category identifier.
6. The method according to claim 5, It is characterized in that The configuration information also includes a second account category identifier corresponding to the tag; the cache also includes a third correspondence between the tag and the account identifier of the second account stored in a bitmap compression manner; The updating of the cache according to the plurality of tags in the tag set further includes: Establishing a second association relationship between the tag identifier of each tag and the second account category identifier according to the configuration information of the tag; Acquire from a database a plurality of second accounts matching the second account category identifier and an account identifier of each second account as a first data set; According to the third corresponding relationship, an account identifier of a second account corresponding to the tag is obtained from the cache as a second data set; A difference set between the second data set and the first data set is obtained, and the second corresponding relationship and the third corresponding relationship in the cache are updated according to the difference set.
7. The method according to claim 6, It is characterized in that The difference set is an account identifier of a second account that belongs to the second data set but does not belong to the first data set; The updating the second correspondence relationship and the third correspondence relationship in the cache according to the difference set includes: Deleting the account identifier of the second account corresponding to the difference set from the cached second corresponding relationship to obtain an updated second corresponding relationship; The account identifier of the second account corresponding to the difference set is deleted from the cached third corresponding relationship to obtain an updated third corresponding relationship.
8. The method according to claim 4, It is characterized in that Before acquiring the tag set whose tag status is online from the database, the method further includes: receiving a request for creating a tag, the request comprising a tag identifier of the tag and corresponding configuration information; When the creation request is verified to be passed, the tag identification and configuration information of the corresponding tag are stored in the database, and the status of the tag is marked as pending for review.
9. The method according to claim 8, It is characterized in that After storing the tag identification and configuration information of the corresponding tag in the database, the method further includes: receiving a withdrawal request for a tag in a pending review state, the withdrawal request including a tag identifier of the tag; Updates the status of the tag to withdrawn.
10. The method according to claim 8, It is characterized in that After storing the tag identification and configuration information of the corresponding tag in the database, the method further includes: Receiving a review request for a tag, the review request including a tag identifier of the tag and a corresponding review result; When the audit result is passed, obtaining configuration information of the tag after audit; When the audited configuration information passes the inspection, the configuration information of the corresponding tag in the database is updated according to the audited configuration information, and the status of the tag is updated to be online; When the audit result is failure to pass, the status of the label is updated to rejected.
11. The method according to claim 10, It is characterized in that The configuration information includes the effective time of the corresponding tag; after the state of the tag is updated to be online, the method further includes: When the first task time arrives, obtain configuration information of tags in the database whose status is to be put online; When the effective time of the tag in the configuration information is greater than the first task time, the state of the corresponding tag is updated to online.
12. The method according to claim 11, It is characterized in that The method further comprises: When the first task time arrives, obtain configuration information of tags in the database whose status is pending review; When the effective time of the tag in the configuration information is greater than the first task time, the state of the corresponding tag is updated to offline.
13. The method according to claim 11, It is characterized in that The configuration information also includes the expiration time of the corresponding tag; the method also includes: When the first task time arrives, obtain configuration information of tags in the database that are in an online state; When the expiration time of the tag in the configuration information is greater than the first task time, the state of the corresponding tag is updated to offline.
14. The method according to claim 11, It is characterized in that The method further comprises: receiving an offline request for a tag to be online or to be online, wherein the offline request carries a tag identifier of the tag; The status of the corresponding tag is updated to offline according to the offline request.
15. The method according to claim 11, It is characterized in that The method further comprises: When the second task time arrives, obtain configuration information of tags in the database whose status is pending review; When the difference between the effective time of the tag in the second task time arrival configuration information is less than the set time threshold, a review notification for the tag is sent to the target review object, and the review notification is used to instruct the target review object to review the tag.
16. A page data processing device, It is characterized in that include: a tag request receiving module, configured to receive a tag request from a client, and obtain an account identifier of a first requesting account carried in the tag request, an account identifier of a second requesting account corresponding to the page content, and target category information, wherein the tag request is generated based on a refresh operation of the first requesting account on the page; a target tag acquisition module, configured to execute acquisition from a cache of a target tag matching the account identifier of the first requesting account, the account identifier of the second requesting account, and the target category information; a target tag returning module, configured to execute returning the target tag to the client, wherein the target tag is used to instruct the client to display the target tag in a page displayed to the first requesting account; The cache stores a first correspondence between the tag and the account identifier of the first account, and a second correspondence between the account identifier of the second account and the tag in a bitmap compression manner; The target tag acquisition module includes: A first label acquisition unit is configured to acquire, according to the second corresponding relationship, a first label matching the account identifier of the second requesting account; A second tag acquisition unit is configured to perform filtering, according to the first corresponding relationship, from the first tags to obtain a second tag that matches the account identifier of the first requesting account; a configuration information acquiring unit, configured to acquire configuration information of the second tag, wherein the configuration information of the tag includes category information of the second tag; The target tag determining unit is configured to perform filtering of a third tag matching the target category information from the second tags according to the configuration information of the second tags as the target tag.
17. The device according to claim 16, It is characterized in that The configuration information of the tag also includes the priority of the tag; the target tag determination unit is further configured to execute: When there are multiple third tags, the priority of each third tag is obtained; and the third tag with the highest priority is used as the target tag.
18. The device according to claim 16, It is characterized in that The configuration information acquisition unit is configured to execute: Query the configuration information of the second tag from the local cache; When the configuration information of the second tag is not found from the local cache, querying the configuration information of the second tag from the distributed cache system; When the configuration information of the second tag is not found from the distributed cache system, acquiring the configuration information of the second tag from a database; as well as, The acquired configuration information of the second tag is stored in the distributed cache system.
19. The device according to claim 16, It is characterized in that The device also includes a cache update module, and the cache update module includes: A tag set acquisition unit is configured to acquire a tag set whose tag state is online from a database when a cache update time arrives, wherein the tag set includes a plurality of tags; An updating unit is configured to update the cache according to a plurality of tags in the tag set.
20. The device according to claim 19, It is characterized in that Each tag has a corresponding tag identifier and configuration information, wherein the configuration information further includes a first account category identifier corresponding to the tag; the updating unit is configured to execute: Establishing a first association relationship between a tag identifier of each tag and a first account category identifier according to configuration information of the tag; Acquire from a database a plurality of first accounts matching the first account category identifier and an account identifier of each first account; The first corresponding relationship in the cache is updated according to the tag identifier corresponding to the first association relationship and the account identifier of each first account matching the first account category identifier.
21. The device according to claim 20, It is characterized in that The configuration information further includes a second account category identifier corresponding to the tag; the cache further includes a third correspondence between the tag and the account identifier of the second account stored in a bitmap compression manner; and the updating unit is further configured to execute: Establishing a second association relationship between the tag identifier of each tag and the second account category identifier according to the configuration information of the tag; Acquire from a database a plurality of second accounts matching the second account category identifier and an account identifier of each second account as a first data set; According to the third corresponding relationship, an account identifier of a second account corresponding to the tag is obtained from the cache as a second data set; A difference set between the second data set and the first data set is obtained, and the second corresponding relationship and the third corresponding relationship in the cache are updated according to the difference set.
22. The device according to claim 21, It is characterized in that The difference set is an account identifier of a second account that belongs to the second data set but does not belong to the first data set; the updating unit is further configured to execute: Deleting the account identifier of the second account corresponding to the difference set from the cached second corresponding relationship to obtain an updated second corresponding relationship; The account identifier of the second account corresponding to the difference set is deleted from the cached third corresponding relationship to obtain an updated third corresponding relationship.
23. The device according to claim 19, It is characterized in that The apparatus further comprises a label creation module configured to execute: receiving a request for creating a tag, the request comprising a tag identifier of the tag and corresponding configuration information; When the creation request is verified to be passed, the tag identification and configuration information of the corresponding tag are stored in the database, and the status of the tag is marked as pending for review.
24. The device according to claim 23, It is characterized in that The apparatus further comprises a tag status updating module configured to execute: A withdrawal request for a tag in a pending review state is received, the withdrawal request including a tag identifier of the tag; and the state of the tag is updated to withdrawn.
25. The device according to claim 24, It is characterized in that The tag status update module is further configured to execute: Receiving a review request for a tag, the review request including a tag identifier of the tag and a corresponding review result; When the audit result is passed, obtaining configuration information of the tag after audit; When the audited configuration information passes the inspection, the configuration information of the corresponding tag in the database is updated according to the audited configuration information, and the status of the tag is updated to be online; When the audit result is failure to pass, the status of the label is updated to rejected.
26. The device according to claim 25, It is characterized in that The configuration information includes the effective time of the corresponding label; the label status update module is further configured to execute: When the first task time arrives, obtain configuration information of tags in the database whose status is to be put online; When the effective time of the tag in the configuration information is greater than the first task time, the state of the corresponding tag is updated to online.
27. The device according to claim 26, It is characterized in that The tag status update module is further configured to execute: When the first task time arrives, obtain configuration information of tags in the database whose status is pending review; When the effective time of the tag in the configuration information is less than the first task time, the state of the corresponding tag is updated to offline.
28. The device according to claim 26, It is characterized in that The configuration information also includes the expiration time of the corresponding label; the label status update module is further configured to execute: When the first task time arrives, obtain configuration information of tags in the database that are in an online state; When the expiration time of the tag in the configuration information is greater than the first task time, the state of the corresponding tag is updated to offline.
29. The device according to claim 26, It is characterized in that The tag status update module is further configured to execute: A delisting request for a tag to be online or online is received, wherein the delisting request carries a tag identifier of the tag; and a state of the corresponding tag is updated to be offline according to the delisting request.
30. The device according to claim 26, It is characterized in that The apparatus further comprises a notification module configured to execute: When the second task time arrives, obtain configuration information of tags in the database whose status is pending review; When the difference between the effective time of the tag in the second task time arrival configuration information is less than the set time threshold, a review notification for the tag is sent to the target review object, and the review notification is used to instruct the target review object to review the tag.
31. An electronic device, It is characterized in that include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the page data processing method as claimed in any one of claims 1 to 15.
32. A computer-readable storage medium, It is characterized in that When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the page data processing method as claimed in any one of claims 1 to 15.
33. A computer program product, comprising instructions: It is characterized in that When the instruction is executed by a processor of an electronic device, the electronic device is enabled to execute the page data processing method as described in any one of claims 1 to 15.
Citation Information
Patent Citations
Information display method, device and system, electronic equipment and storage medium
CN111638832A
Page display method and device, storage medium and electronic equipment
CN112307240A
