CN114218469A - Resource policy processing method, computing device, and storage medium - Google Patents

Resource policy processing method, computing device, and storage medium Download PDF

Info

Publication number
CN114218469A
CN114218469A CN202111537132.4A CN202111537132A CN114218469A CN 114218469 A CN114218469 A CN 114218469A CN 202111537132 A CN202111537132 A CN 202111537132A CN 114218469 A CN114218469 A CN 114218469A
Authority
CN
China
Prior art keywords
resource
strategy
index
policy
leader node
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111537132.4A
Other languages
Chinese (zh)
Other versions
CN114218469B (en
Inventor
蔡东海
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhangyue Technology Co Ltd
Original Assignee
Zhangyue Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhangyue Technology Co Ltd filed Critical Zhangyue Technology Co Ltd
Priority to CN202111537132.4A priority Critical patent/CN114218469B/en
Publication of CN114218469A publication Critical patent/CN114218469A/en
Application granted granted Critical
Publication of CN114218469B publication Critical patent/CN114218469B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/951Indexing; Web crawling techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/542Event management; Broadcasting; Multicasting; Notifications
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention discloses a resource strategy processing method, computing equipment and a storage medium, wherein the resource strategy processing method is executed based on a leader node and a follower node which are selected in advance, and the method comprises the following steps: monitoring log data related to a resource strategy in an operation database to obtain a log change event; driving a leader node according to the log change event so that the leader node determines a resource strategy, and constructing a resource strategy index according to the resource strategy; receiving a display bit request sent by a client, triggering a resource strategy query service, and distributing the display bit request to a leader node and/or a follower node, so that the leader node and/or the follower node searches a target resource strategy matched with the display bit request according to a resource strategy index. According to the scheme, an event driving technology is introduced, the resource strategy index is constructed in time, and the resource strategy index can be ensured to be adaptive to the current resource strategy.

Description

Resource policy processing method, computing device, and storage medium
Technical Field
The invention relates to the technical field of data processing, in particular to a resource strategy processing method, computing equipment and a storage medium.
Background
Some display positions are arranged in a page of a client such as an e-book reading client, and more and richer resources such as advertisements, activity information and the like can be displayed to a user through the display positions. When a user starts the client or the client does not contain a resource policy, the client sends a display bit request for requesting the resource policy corresponding to the display bit to the server, and the server finds out the corresponding resource policy according to the index and returns the resource policy to the client, so that the client can perform the resource request according to the resource policy to display the corresponding resource in the display bit. However, in an actual application scenario, the resource policy is continuously updated and newly increased along with the change of the service requirement, and the server usually reconstructs the index at regular time, which has a problem that the index is not constructed in time, and a situation that the index is not adapted to the current resource policy is likely to occur.
Disclosure of Invention
In view of the above, the present invention has been made to provide a resource policy processing method, a computing device, and a storage medium that overcome or at least partially solve the above-mentioned problems.
According to an aspect of the present invention, there is provided a resource policy processing method performed based on a leader node and follower nodes selected in advance, the method including:
monitoring log data related to a resource strategy in an operation database to obtain a log change event;
driving a leader node according to the log change event so that the leader node determines a resource strategy, and constructing a resource strategy index according to the resource strategy;
receiving a display bit request sent by a client, triggering a resource strategy query service, and distributing the display bit request to a leader node and/or a follower node, so that the leader node and/or the follower node searches a target resource strategy matched with the display bit request according to a resource strategy index.
According to another aspect of the present invention, there is provided a computing device comprising: the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is used for storing at least one executable instruction, and the executable instruction causes the processor to execute the following operations:
monitoring log data related to a resource strategy in an operation database to obtain a log change event;
driving a leader node according to the log change event so that the leader node determines a resource strategy, and constructing a resource strategy index according to the resource strategy;
receiving a display bit request sent by a client, triggering a resource strategy query service, and distributing the display bit request to a leader node and/or a follower node, so that the leader node and/or the follower node searches a target resource strategy matched with the display bit request according to a resource strategy index.
According to another aspect of the embodiments of the present invention, there is provided a computer storage medium, in which at least one executable instruction is stored, and the executable instruction causes a processor to perform operations corresponding to the resource policy processing method.
According to the technical scheme provided by the invention, the leader node completes construction work aiming at the resource strategy index, and the follower node processes the display position request of the client according to the resource strategy index constructed by the leader node, instead of constructing the index by each processing node, so that the real-time data query amount of the operation database is effectively reduced; and an event-driven technology is introduced, log data related to the resource strategy in the operation database is monitored, and when the log data related to the resource strategy is monitored to be changed, the leader node is driven to carry out index construction, so that the resource strategy index is constructed in time, the resource strategy index is ensured to be adaptive to the current resource strategy, and the index construction mode is optimized.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 is a flowchart illustrating a resource policy processing method according to a first embodiment of the present invention;
FIG. 2a is a flowchart illustrating a resource policy processing method according to a second embodiment of the present invention;
FIG. 2b is a first flowchart of a resource policy processing method;
FIG. 2c is a schematic diagram of a flow architecture of a resource policy processing method;
fig. 3 is a schematic structural diagram of a computing device according to a fourth embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Example one
Fig. 1 is a flowchart illustrating a resource policy processing method according to a first embodiment of the present invention, and as shown in fig. 1, the method includes the following steps:
step S101, monitoring log data related to resource strategies in an operation database to obtain log change events.
The method can be executed by a server, and the server comprises a plurality of processing nodes. In this embodiment, an election mechanism such as Zookeeper may be introduced, and one processing node may be selected from a plurality of processing nodes as a Leader node (Leader node) based on the election mechanism, and other processing nodes may be selected as Follower nodes (Follower nodes), that is, master and slave nodes are elected. The method is performed based on pre-selected leader and follower nodes.
The operation database stores the configured resource strategies, and the resource strategies record the request strategies of the resources corresponding to the display positions and the display strategies displayed in the display positions. The operator can carry out processing such as increasing, deleting, modifying, checking and the like on the resource strategy in the operation database according to the business requirement. It is considered that corresponding log data is generated when resource policies in the operation database are changed. The skilled person can select a suitable database as the operation database according to actual needs. For example, the operational database may employ a MySQL database, and the generated log data is then specifically binlog log data. In order to effectively improve timeliness of index construction, an event driving technology is introduced into a server side, log data related to a resource policy in an operation database is monitored through a capture component, and when the log data related to the resource policy is monitored to be changed, a log change event is obtained.
And step S102, driving the leader node according to the log change event so that the leader node can determine a resource strategy, and constructing a resource strategy index according to the resource strategy.
And if the log change event is obtained, which indicates that the resource strategy in the operation database is changed, driving a leader node to work according to the log change event, determining the resource strategy by the leader node, and constructing a resource strategy index according to the resource strategy. That is, when the resource policy in the operation database changes, the leader node is triggered to construct the resource policy index, so that the resource policy index is ensured to be adapted to the current resource policy.
Step S103, receiving a display bit request sent by the client, triggering a resource policy query service, and distributing the display bit request to the leader node and/or the follower node, so that the leader node and/or the follower node searches a target resource policy matched with the display bit request according to the resource policy index.
When the client wants to obtain the resource policy corresponding to the display bit, a display bit request can be sent to the server. And after receiving the display position request, the server triggers resource strategy query service. The leader node and/or the follower node may query the matched resource policy according to the presentation position request, and in this embodiment, the finally queried resource policy matched with the presentation position request is referred to as a target resource policy. In particular, the show bit request may be distributed to the leader node or to the follower node. After the corresponding node receives the display bit request, the node can search a target resource strategy matched with the display bit request according to the constructed resource strategy index.
By using the resource policy processing method provided by the embodiment, the leader node completes construction work aiming at the resource policy index, and the follower node processes the display position request of the client according to the resource policy index constructed by the leader node, instead of constructing the index by each processing node, so that the real-time data query amount of the operation database is effectively reduced; and an event-driven technology is introduced, log data related to the resource strategy in the operation database is monitored, and when the log data related to the resource strategy is monitored to be changed, the leader node is driven to carry out index construction, so that the resource strategy index is constructed in time, the resource strategy index is ensured to be adaptive to the current resource strategy, and the index construction mode is optimized.
Example two
Fig. 2a is a schematic flowchart illustrating a resource policy processing method according to a second embodiment of the present invention, and as shown in fig. 2a, the method includes the following steps:
step S201, log data related to the resource policy in the operation database is monitored through the capture component to obtain a log change event, and the log change event is written into a message queue in a message mode.
The method can be executed by a server, and the server comprises a plurality of processing nodes. And selecting the leader node from the plurality of processing nodes according to an election mechanism, wherein other processing nodes are used as follower nodes. Specifically, the leader node completes construction work aiming at the resource strategy index, and the follower node processes the display bit request of the client according to the resource strategy index constructed by the leader node and searches for a matched target resource strategy. In addition, the leader node may also process the presentation bit request of the client, which is not limited herein.
The operation database stores the configured resource strategies, and corresponding log data can be generated when the resource strategies in the operation database are changed. In order to timely acquire the change of the resource policy, a capture component is added in the server and used for monitoring log data related to the resource policy in an operation database. The skilled person can select the capturing component according to actual needs, and the capturing component is not limited herein. For example, the Capture component may specifically be a CDC (Change Data Capture) component or the like. When the log data related to the resource policy is monitored to be changed, a log change event is obtained, and the capture component writes the log change event into a message queue in a message mode. The message queue may specifically be a Kafka message queue.
Step S202, the consumers through the message queue consume the messages from the message queue for processing, and drive the leader node, so that the leader node determines a resource strategy according to the processed messages, and constructs a resource strategy index according to the resource strategy.
And the consumers through the message queue consume the messages from the message queue to perform corresponding processing, and then the consumers of the message queue drive the leader node to perform index construction. The resource policy index may include: first index information and second index information. Specifically, the leader node determines a policy identifier of the resource policy and policy content of the resource policy according to the processed message, and constructs first index information between the policy identifier and the policy content, where the policy content refers to specific entity content of the resource policy, and the constructed first index information records a corresponding relationship from the policy identifier to the policy content, which is forward-ranking index information.
In addition, different dimensions are involved in the configuration process of the resource strategies, and different resource strategies need to be configured according to different dimensions, so that the personalized configuration of the resource strategies is realized, the configuration effect of thousands of people is obtained, and different clients correspond to different resource strategies. In order to implement accurate configuration of the resource policy, the leader node further needs to acquire configuration rule information corresponding to preset dimensions, where the preset dimensions may include one or more of the following dimensions: media, presentation position, client version, resource channel, user interaction characteristics. Multiple item values or fields can be contained in a single preset dimension, and different preset dimension identifications can be preset for different item values or fields for quick identification. And according to the configuration rule information, which resource strategies need to be configured correspondingly for each preset dimension identification can be known. The preset dimension can also be set by those skilled in the art to include other dimensions, which are not limited herein.
Specifically, the server may be configured to perform resource policy configuration on clients corresponding to multiple media platforms, for example, may perform resource policy configuration on a client corresponding to the media platform a and a client corresponding to the media platform B. The page displayed by the client includes multiple display positions, and taking the client as an e-book reading client as an example, the multiple display positions may include display positions in an open screen page, a book city page, a bookshelf page, an e-book reading page, and the like, and different resource policies may be configured for the display positions in different pages. In addition, in order to enable the configured resource policy to better conform to the preference of the user on the client side, and the like, in this embodiment, the corresponding resource policy may also be configured according to the user interaction characteristics between the user and the resource, so as to implement personalized resource policy configuration.
After the leader node obtains the configuration rule information corresponding to the preset dimension, second index information between the preset dimension identifier and the strategy identifier can be constructed according to the configuration rule information corresponding to the preset dimension, and the second index information records the corresponding relation from the preset dimension identifier to the strategy identifier list and is inverted index information.
In order to effectively improve the query efficiency of the resource policy, the present embodiment adopts a two-layer cache design of "remote cache + local cache" for the storage of the resource policy index. In particular, the remote cache may employ a Redis cache or the like. After the leader node completes construction of the resource strategy index, the leader node synchronously stores the resource strategy index into the remote cache and the local cache of the leader node, wherein the storage of the resource strategy index into the remote cache is for the convenience of the follower node obtaining the resource strategy index from the remote cache, and the storage of the resource strategy index into the local cache of the leader node is for the convenience of the leader node directly querying according to the resource strategy index stored in the local cache when the leader node queries according to the display bit request of the client. The follower node acquires the resource strategy index from the remote cache and stores the resource strategy index into the local cache of the follower node, so that when the inquiry is carried out according to the display bit request of the client, the inquiry can be directly carried out according to the resource strategy index stored in the local cache of the follower node. Because the consumption time of local cache query is far shorter than that of remote cache query, the embodiment realizes that the resource policy index is stored in the local cache, and the query is directly carried out according to the resource policy index stored in the local cache, so that the time consumed by the query can be effectively reduced, and the query efficiency of the resource policy is improved.
Step S203, receiving a display bit request sent by the client, triggering a resource policy query service, and distributing the display bit request to the leader node and/or the follower node, so that the leader node and/or the follower node searches a target resource policy matched with the display bit request according to the resource policy index.
When the client wants to obtain the resource policy corresponding to the display bit, for example, when the user starts the client or the client does not include the resource policy, the client sends a display bit request to the server. And after receiving the display bit request, the server triggers a resource strategy query service, and distributes the display bit request to the leader node and/or the follower node for processing. Specifically, the server may distribute the show bit request to the leader node and/or the follower node according to the current processing conditions of the leader node and the follower node.
If the leader node receives the display bit request, the leader node may search for a target resource policy matching the display bit request according to a resource policy index stored in a local cache of the leader node. If the follower node receives the display bit request, the follower node can search a target resource strategy matched with the display bit request according to a resource strategy index stored in a remote cache or a local cache of the follower node; wherein, the follower node searches the resource strategy index from the local cache of the follower node preferentially; and if the resource strategy index is not found from the local cache, acquiring the resource strategy index from the remote cache, storing the acquired resource strategy index into the local cache, and searching a target resource strategy matched with the display bit request according to the resource strategy index. In the embodiment, the query is performed through the resource policy index stored in the local cache of the user, instead of the remote cache which needs to be queried each time, so that the time consumed by the query is greatly reduced, and the query efficiency of the resource policy is effectively improved.
Specifically, in the process that the leader node and/or the follower node queries the corresponding target resource policy according to the presentation position request, the dimension identifier and/or the dimension related information for determining the dimension identifier may be extracted from the presentation position request. And if the dimension related information is extracted, determining a dimension identification corresponding to the dimension related information. The dimension related information refers to information related to a preset dimension and used for determining a dimension identifier, and specifically includes but is not limited to: the media name, the page where the display position is located, the client version number, the resource channel name, the user identifier, and the like, where the user identifier may specifically be identification information for identifying the user identity, such as a mobile phone number, a user name, a mailbox, a user account, and the like.
In an optional implementation manner, if the dimension identifier is carried in the presentation bit request, the dimension identifier may be directly extracted from the presentation bit request. In another optional implementation manner, if the display bit request carries dimension related information and does not directly carry a dimension identifier, the dimension related information may be extracted from the display bit request, and then the corresponding dimension identifier is determined according to the dimension related information. In another optional implementation, when the preset dimension includes multiple dimensions, there may also be a dimension identifier of a part of the dimensions carried in the display bit request, and carry dimension related information of other part of the dimensions in the multiple dimensions, so that the dimension identifier of the part of the dimensions can be directly extracted from the display bit request, the dimension related information of other part of the dimensions can be extracted, and then the dimension identifier of other part of the dimensions can be determined according to the dimension related information of other part of the dimensions.
The resource policy index includes first index information and second index information, the first index information records a corresponding relationship from the policy identifier to the policy content, and the second index information records a corresponding relationship from the preset dimension identifier to the policy identifier list. After the dimension identification is obtained, the leader node and/or the follower node can search the strategy identification matched with the dimension identification according to the second index information in the resource strategy index, so that the effective screening of the resource strategy is quickly realized, and the strategy identification of the resource strategy matched with the display bit request of the client side is conveniently searched and obtained from a large number of resource strategies; and then determining the strategy content corresponding to the matched strategy identification according to the first index information in the resource strategy index, thereby obtaining the target resource strategy. Specifically, the target resource policy may include a matching policy identifier and policy content corresponding to the matching policy identifier.
Taking the example that the preset dimensionality comprises media and user interaction characteristics, and the follower node receives the display bit request, the follower node preferentially searches the resource strategy index from the local cache of the follower node; and if the resource strategy index is not found from the local cache, acquiring the resource strategy index from the remote cache, storing the acquired resource strategy index into the local cache, and searching a target resource strategy matched with the display bit request according to the resource strategy index. Specifically, if the display position request includes a media dimension identifier and a user identifier, the follower node may extract the media dimension identifier and the user identifier from the display position request, and then obtain, from the user database, a user interaction feature dimension identifier corresponding to the user identifier according to the user identifier, where the user interaction feature of each user and the user interaction feature dimension identifier are stored in the user database, and the user interaction feature of each user is determined in real time according to user interaction behavior data between each user and the resource. After the dimension identification of the media and the dimension identification of the user interaction feature are obtained, the follower node can search the strategy identification matched with the dimension identification of the media according to the second index information, and further search the strategy identification matched with the dimension identification of the user interaction feature from the strategy identification matched with the dimension identification of the media, so that the strategy identification matched with both the dimension identification of the media and the dimension identification of the user interaction feature is obtained. For example, there are 1000 resource policies in total, 500 policy identifiers matching the dimension identifiers of the media are found through searching, and then 100 policy identifiers matching the dimension identifiers of the user interaction features are further found from the 500 policy identifiers. And then determining the policy content corresponding to the 100 matched policy identifications according to the first index information in the resource policy index, thereby obtaining 100 target resource policies.
Considering that after the follower node stores the resource policy index into the local cache, the leader node may still reconstruct the resource policy index in real time based on the event driving of the capture component according to the change of the resource policy, and store the latest resource policy index into the remote cache, that is, the resource policy index currently stored in the local cache of the follower node may not be the latest resource policy index, and then the follower node needs to update the resource policy index in the local cache. In an optional implementation manner, the follower node may be triggered by the timing task to acquire the current resource policy index from the remote cache, so that the follower node replaces the original resource policy index in the local cache of the follower node with the current resource policy index, thereby updating the resource policy index in the local cache. In another optional implementation manner, after the leader node completes construction of the resource policy index, an index construction notification may be generated, and the index construction notification is sent to the follower node, so that the follower node obtains the current resource policy index from the remote cache according to the index construction notification, and replaces the original resource policy index in the local cache of the follower node with the current resource policy index, thereby updating the resource policy index in the local cache in time.
Considering that the target resource policy should be queried and issued by the server in real time in response to the display position request of the client, in order to further improve the query efficiency of the resource policy, the leader node may perform index construction in an asynchronous manner, and provide the constructed resource policy index for the resource policy query service for use, so that when the display position request of the client is sent to the server in real time, the server can trigger the resource policy query service to query according to the constructed resource policy index.
Fig. 2b is a schematic diagram of a flow architecture of a resource policy processing method, and as shown in fig. 2b, a leader node is selected from a plurality of processing nodes based on a Zookeeper election mechanism. The operation database is a MySQL database, corresponding log data can be generated when a resource strategy in the MySQL database is changed, log data related to the resource strategy in the MySQL database is monitored through the CDC component, and log change events are written into a Kafka message queue in a message mode. And the consumers passing through the Kafka message queue consume the messages from the Kafka message queue for processing, and drive the leader node to carry out index construction. The MySQL database may also specifically store the resource policy in an index manner, and store specific data of the resource policy into a remote cache, such as a Redis cache shown in fig. 2 b. In the process of constructing the resource policy index, the leader node may query the index ID of the MySQL index from the MySQL database only, and obtain the specific data of the resource policy corresponding to the index ID from the Redis cache through the loader. And the leader node stores the constructed resource strategy index into a Redis cache. And the follower node acquires the resource strategy index from the Redis cache and stores the resource strategy index into a local cache corresponding to the follower node.
And step S204, sending the target resource strategy to the client so that the client can make a resource request according to the target resource strategy and display the requested resource in the corresponding display position.
After the target resource strategy is determined, the server side can send the target resource strategy to the client side, the client side can carry out resource request according to the target resource strategy after receiving the target resource strategy, and then the requested resource is displayed in the corresponding display position according to the target resource strategy.
In an actual application scenario, multiple types of resources may be provided, such as interface type resources and SDK type resources, and taking resources as advertisements, the interface type resources may be ADX (ad exchange platform) type resources. The client requests the interface type resource through the interface type resource service provided by the server; and the SDK (software development kit) is installed in the client, and the client's request for the SDK type resource can be made through the SDK installed in the client.
In the prior art, on the service side, the resource policy query service and the interface type resource service are usually deployed in the same monolithic application, that is, the resource policy query service and the interface type resource service are integrated in the same application file. When the flow of the interface type resource service is too large, it is likely that the resource policy query service cannot be normally used, and the client cannot successfully request and display the resource because the client cannot obtain the corresponding target resource policy.
In order to ensure the normal operation of the resource policy query service, in this embodiment, the resource policy query service and the interface type resource service are deployed in different applications, so that the resource policy query service and the interface type resource service are decoupled, and the flow of the interface type resource service does not affect or overwhelm the resource policy query service. In particular, service partitioning may be performed between a resource policy query service and an interface type resource service. In addition, the resource strategy query service has higher importance, and whether the resource is displayed in the display position of the client is determined, so that the priority of the resource strategy query service can be set to be higher than that of the interface type resource service, and the stability of the resource strategy query service is ensured.
In addition, the resource policy may further set a resource type of the resource corresponding to the display bit, for example, specify whether the interface type resource or the SDK type resource is displayed in the display bit. Because the stability of the resource strategy query service is guaranteed, the client can obtain the target resource strategy, and even if the interface type resource service cannot normally provide the service, the client can call the SDK to obtain the SDK type resource according to the target resource strategy to fill the display position, so that the resource can be displayed, and the condition that the resource cannot be successfully displayed in the display position of the client is effectively avoided.
Fig. 2c shows a schematic view of a flow architecture of a resource policy processing method, as shown in fig. 2c, when a server receives a display bit request from a client, a resource policy query service is triggered, and a target resource policy matching the display bit request is searched according to a constructed resource policy index. The index can be constructed in an asynchronous mode in the index construction process. In the index construction process, log data related to a resource strategy in a MySQL database can be monitored through a CDC component to obtain a log change event, and a leader node is driven to carry out index construction; in addition, indexes can be constructed in a data preloading mode, and the leader node constructs the resource strategy indexes according to the preloaded resource strategies. The resource policy query service may also be connected to a Data Management Platform (DMP), which may be used to integrate Data of each party and provide functions of Data analysis, Data Management, Data call, and the like.
Step S205, receiving an interface type resource obtaining request sent by the client, triggering an interface type resource service, obtaining resources from a resource channel end corresponding to the interface type resource service, and returning the resources to the client for displaying.
If the client acquires that the interface type resource needs to be requested according to the target resource strategy, sending an interface type resource acquisition request to the server, wherein the interface type resource acquisition request can comprise: resource channel end information, etc. The content included in the interface type resource obtaining request can be set by those skilled in the art according to actual needs, and is not limited herein. And the server side responds to the interface type resource acquisition request, triggers the interface type resource service, acquires resources from the resource channel side corresponding to the interface type resource service, and returns the resources to the client side for display.
By utilizing the resource strategy processing method provided by the embodiment, an event driving technology is introduced, log data related to the resource strategy in the operation database is monitored through the capture component, and when the log data related to the resource strategy is monitored to be changed, the leader node is driven to carry out index construction, so that the resource strategy index is constructed in time, and the resource strategy index can be ensured to be adaptive to the current resource strategy; the leader node synchronously stores the constructed resource strategy indexes into a remote cache, and the follower node acquires the resource strategy indexes from the remote cache and stores the resource strategy indexes into a local cache of the follower node, so that the resource strategy indexes are stored in the local cache and are directly inquired according to the resource strategy indexes stored in the local cache, the time consumed by inquiry can be effectively reduced, and the inquiry efficiency of the resource strategy is improved; in addition, the resource strategy query service and the interface type resource service are deployed in different applications, so that the decoupling of the resource strategy query service and the interface type resource service is realized, and the stability of the resource strategy query service is ensured.
EXAMPLE III
A third embodiment of the present invention provides a nonvolatile storage medium, where the storage medium stores at least one executable instruction, and the executable instruction may execute the resource policy processing method in any of the above method embodiments.
The executable instructions may be specifically configured to cause the processor to: monitoring log data related to a resource strategy in an operation database to obtain a log change event; driving a leader node according to the log change event so that the leader node determines a resource strategy, and constructing a resource strategy index according to the resource strategy; receiving a display bit request sent by a client, triggering a resource strategy query service, and distributing the display bit request to a leader node and/or a follower node, so that the leader node and/or the follower node searches a target resource strategy matched with the display bit request according to a resource strategy index.
In an alternative embodiment, the executable instructions further cause the processor to: and sending the target resource strategy to the client so that the client can make a resource request according to the target resource strategy and display the requested resource in the corresponding display position.
In an alternative embodiment, the executable instructions further cause the processor to: and monitoring log data related to the resource strategy in the operation database through the capturing component to obtain a log change event, and writing the log change event into a message queue in a message mode.
In an alternative embodiment, the executable instructions further cause the processor to: and the consumer through the message queue consumes the message from the message queue for processing and drives the leader node so that the leader node determines a resource strategy according to the processed message and constructs a resource strategy index according to the resource strategy.
In an alternative embodiment, the resource policy index comprises: first index information and second index information; the executable instructions further cause the processor to: the leader node determines the strategy identification and the strategy content of the resource strategy and constructs first index information between the strategy identification and the strategy content; and constructing second index information between the preset dimension identification and the strategy identification according to the configuration rule information corresponding to the preset dimension.
In an alternative embodiment, the preset dimensions include one or more of the following dimensions: media, presentation position, client version, resource channel, user interaction characteristics.
In an alternative embodiment, the executable instructions further cause the processor to: the leader node and/or the follower node extracts the dimension identification and/or dimension related information used for determining the dimension identification from the display bit request; if the dimension related information is extracted, determining a dimension identification corresponding to the dimension related information; searching a strategy identifier matched with the dimension identifier according to second index information in the resource strategy index; and determining the strategy content corresponding to the matched strategy identification according to the first index information in the resource strategy index to obtain the target resource strategy.
In an alternative embodiment, the executable instructions further cause the processor to: the leader node synchronously stores the resource policy index into the remote cache and into the local cache of the leader node.
In an alternative embodiment, the executable instructions further cause the processor to: and the follower node searches a target resource strategy matched with the display bit request according to the resource strategy index stored in the remote cache or the local cache of the follower node.
In an alternative embodiment, the executable instructions further cause the processor to: the follower node preferentially searches the resource strategy index from the local cache of the follower node; if the resource strategy index is not found from the local cache, acquiring the resource strategy index from the remote cache, and storing the acquired resource strategy index into the local cache; and searching a target resource strategy matched with the display bit request according to the resource strategy index.
In an alternative embodiment, the executable instructions further cause the processor to: and triggering the follower node to acquire the current resource strategy index from the remote cache through the timing task so that the follower node replaces the original resource strategy index in the local cache of the follower node by using the current resource strategy index.
In an alternative embodiment, the executable instructions further cause the processor to: and after the leader node completes construction of the resource strategy index, generating an index construction notice, and sending the index construction notice to the follower node, so that the follower node acquires the current resource strategy index from the remote cache according to the index construction notice, and replaces the original resource strategy index in the local cache of the follower node by using the current resource strategy index.
In an alternative embodiment, the executable instructions further cause the processor to: the resource strategy inquiry service and the interface type resource service are deployed in different applications, and the priority of the resource strategy inquiry service is set to be higher than that of the interface type resource service.
In an alternative embodiment, the executable instructions further cause the processor to: receiving an interface type resource acquisition request sent by a client, triggering an interface type resource service, acquiring resources from a resource channel end corresponding to the interface type resource service, and returning the resources to the client for display.
Example four
Fig. 3 is a schematic structural diagram of a computing device according to a fourth embodiment of the present invention, and the specific embodiment of the present invention does not limit the specific implementation of the computing device.
As shown in fig. 3, the computing device may include: a processor (processor)302, a communication Interface 304, a memory 306, and a communication bus 308.
Wherein:
the processor 302, communication interface 304, and memory 306 communicate with each other via a communication bus 308.
A communication interface 304 for communicating with network elements of other devices, such as clients or other servers.
The processor 302 is configured to execute the program 310, and may specifically perform relevant steps in the foregoing resource policy processing method embodiment.
In particular, program 310 may include program code comprising computer operating instructions.
The processor 302 may be a central processing unit CPU, or an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to implement an embodiment of the present invention. The computing device includes one or more processors, which may be the same type of processor, such as one or more CPUs; or may be different types of processors such as one or more CPUs and one or more ASICs.
And a memory 306 for storing a program 310. Memory 306 may comprise high-speed RAM memory and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
The program 310 may specifically be configured to cause the processor 302 to perform the following operations: monitoring log data related to a resource strategy in an operation database to obtain a log change event; driving a leader node according to the log change event so that the leader node determines a resource strategy, and constructing a resource strategy index according to the resource strategy; receiving a display bit request sent by a client, triggering a resource strategy query service, and distributing the display bit request to a leader node and/or a follower node, so that the leader node and/or the follower node searches a target resource strategy matched with the display bit request according to a resource strategy index.
In an alternative embodiment, program 310 further causes processor 302 to: and sending the target resource strategy to the client so that the client can make a resource request according to the target resource strategy and display the requested resource in the corresponding display position.
In an alternative embodiment, program 310 further causes processor 302 to: and monitoring log data related to the resource strategy in the operation database through the capturing component to obtain a log change event, and writing the log change event into a message queue in a message mode.
In an alternative embodiment, program 310 further causes processor 302 to: and the consumer through the message queue consumes the message from the message queue for processing and drives the leader node so that the leader node determines a resource strategy according to the processed message and constructs a resource strategy index according to the resource strategy.
In an alternative embodiment, the resource policy index comprises: first index information and second index information; program 310 further causes processor 302 to perform the following: the leader node determines the strategy identification and the strategy content of the resource strategy and constructs first index information between the strategy identification and the strategy content; and constructing second index information between the preset dimension identification and the strategy identification according to the configuration rule information corresponding to the preset dimension.
In an alternative embodiment, the preset dimensions include one or more of the following dimensions: media, presentation position, client version, resource channel, user interaction characteristics.
In an alternative embodiment, program 310 further causes processor 302 to: the leader node and/or the follower node extracts the dimension identification and/or dimension related information used for determining the dimension identification from the display bit request; if the dimension related information is extracted, determining a dimension identification corresponding to the dimension related information; searching a strategy identifier matched with the dimension identifier according to second index information in the resource strategy index; and determining the strategy content corresponding to the matched strategy identification according to the first index information in the resource strategy index to obtain the target resource strategy.
In an alternative embodiment, program 310 further causes processor 302 to: the leader node synchronously stores the resource policy index into the remote cache and into the local cache of the leader node.
In an alternative embodiment, program 310 further causes processor 302 to: and the follower node searches a target resource strategy matched with the display bit request according to the resource strategy index stored in the remote cache or the local cache of the follower node.
In an alternative embodiment, program 310 further causes processor 302 to: the follower node preferentially searches the resource strategy index from the local cache of the follower node; if the resource strategy index is not found from the local cache, acquiring the resource strategy index from the remote cache, and storing the acquired resource strategy index into the local cache; and searching a target resource strategy matched with the display bit request according to the resource strategy index.
In an alternative embodiment, program 310 further causes processor 302 to: and triggering the follower node to acquire the current resource strategy index from the remote cache through the timing task so that the follower node replaces the original resource strategy index in the local cache of the follower node by using the current resource strategy index.
In an alternative embodiment, program 310 further causes processor 302 to: and after the leader node completes construction of the resource strategy index, generating an index construction notice, and sending the index construction notice to the follower node, so that the follower node acquires the current resource strategy index from the remote cache according to the index construction notice, and replaces the original resource strategy index in the local cache of the follower node by using the current resource strategy index.
In an alternative embodiment, program 310 further causes processor 302 to: the resource strategy inquiry service and the interface type resource service are deployed in different applications, and the priority of the resource strategy inquiry service is set to be higher than that of the interface type resource service.
In an alternative embodiment, program 310 further causes processor 302 to: receiving an interface type resource acquisition request sent by a client, triggering an interface type resource service, acquiring resources from a resource channel end corresponding to the interface type resource service, and returning the resources to the client for display.
For specific implementation of each step in the program 310, reference may be made to the description corresponding to the corresponding step in the foregoing resource policy processing embodiment, which is not described herein again. It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the above-described device may refer to the corresponding process description in the foregoing method embodiment, and is not described herein again.
According to the scheme provided by the embodiment, the resource strategy index is constructed through the leader node, and not each processing node is used for constructing the index, so that the real-time data query amount of the operation database is effectively reduced; and an event driving technology is introduced, and when the change of log data related to the resource strategy is monitored, the leader node is driven to carry out index construction, so that the resource strategy index is constructed in time, and the resource strategy index can be ensured to be adaptive to the current resource strategy.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the claims, any of the claimed embodiments may be used in any combination.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
The invention discloses: A1. a resource policy processing method, the method being performed based on pre-selected leader and follower nodes, the method comprising:
monitoring log data related to a resource strategy in an operation database to obtain a log change event;
driving the leader node according to the log change event so that the leader node can determine a resource strategy, and constructing a resource strategy index according to the resource strategy;
receiving a display bit request sent by a client, triggering a resource policy query service, and distributing the display bit request to the leader node and/or the follower node, so that the leader node and/or the follower node searches a target resource policy matched with the display bit request according to the resource policy index.
A2. After the finding the target resource policy matching the presentation bit request, the method of A1 further comprises:
and sending the target resource strategy to the client so that the client can make a resource request according to the target resource strategy and display the requested resource in the corresponding display position.
A3. According to the method in a1, the monitoring log data related to resource policies in an operation database to obtain log change events includes:
the method comprises the steps of monitoring log data related to a resource strategy in an operation database through a capture component to obtain a log change event, and writing the log change event into a message queue in a message mode.
A4. The method of a3, wherein the driving the leader node according to the log change event for the leader node to determine a resource policy, and constructing a resource policy index according to the resource policy, comprises:
and the consumer through the message queue consumes the message from the message queue to process the message, and drives the leader node so that the leader node determines a resource strategy according to the processed message, and constructs a resource strategy index according to the resource strategy.
A5. The method of any of A1-A4, the resource policy index comprising: first index information and second index information;
the leader node determines a resource strategy, and constructs a resource strategy index according to the resource strategy, including:
the leader node determines a strategy identifier and strategy content of a resource strategy and constructs first index information between the strategy identifier and the strategy content;
and constructing second index information between the preset dimension identification and the strategy identification according to the configuration rule information corresponding to the preset dimension.
A6. The method of a5, the preset dimensions comprising one or more of the following dimensions:
media, presentation position, client version, resource channel, user interaction characteristics.
A7. The method of A5 or A6, wherein the leader node and/or the follower node looking up a target resource policy matching the presentation bit request according to the resource policy index comprises:
the leader node and/or the follower node extracts dimension identifications and/or dimension related information used for determining the dimension identifications from the presentation bit request; if the dimension related information is extracted, determining a dimension identification corresponding to the dimension related information;
searching a strategy identifier matched with the dimension identifier according to second index information in the resource strategy index;
and determining the strategy content corresponding to the matched strategy identification according to the first index information in the resource strategy index to obtain the target resource strategy.
A8. The method of any of A1-A7, after the leader node determines a resource policy, constructing a resource policy index from the resource policy, the method further comprising:
the leader node synchronously stores the resource policy index into a remote cache and into a local cache of the leader node.
A9. According to the method of A8, the finding, by the follower node, a target resource policy matching the presentation bit request according to the resource policy index includes:
and the follower node searches a target resource strategy matched with the display bit request according to a resource strategy index stored in a remote cache or a local cache of the follower node.
A10. According to the method in a9, the searching, by the follower node, for the target resource policy matching the presentation bit request according to the resource policy index stored in the remote cache or the local cache of the follower node includes:
the follower node preferentially searches the resource policy index from a local cache of the follower node; if the resource policy index is not found from the local cache, acquiring the resource policy index from a remote cache, and storing the acquired resource policy index into the local cache;
and searching a target resource strategy matched with the display bit request according to the resource strategy index.
A11. The method of any one of a9-a10, the method further comprising:
triggering the follower node to acquire the current resource strategy index from the remote cache through a timing task so that the follower node replaces the original resource strategy index in the local cache of the follower node by using the current resource strategy index.
A12. The method of any one of a9-a11, the method further comprising:
and after the leader node completes construction of the resource strategy index, generating an index construction notice, and sending the index construction notice to the follower node, so that the follower node acquires the current resource strategy index from a remote cache according to the index construction notice, and replaces the original resource strategy index in the local cache of the follower node by using the current resource strategy index.
A13. The method of any of A1-A12, prior to the triggering resource policy query services, the method further comprising:
and deploying the resource strategy inquiry service and the interface type resource service in different applications, and setting the priority of the resource strategy inquiry service to be higher than the priority of the interface type resource service.
A14. The method of a13, the method further comprising:
receiving an interface type resource acquisition request sent by a client, triggering the interface type resource service, acquiring resources from a resource channel end corresponding to the interface type resource service, and returning the resources to the client for display.
B15. A computing device, comprising: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is configured to store at least one executable instruction that causes the processor to:
monitoring log data related to a resource strategy in an operation database to obtain a log change event;
driving the leader node according to the log change event so that the leader node can determine a resource strategy, and constructing a resource strategy index according to the resource strategy;
receiving a display bit request sent by a client, triggering a resource policy query service, and distributing the display bit request to a leader node and/or a follower node, so that the leader node and/or the follower node searches a target resource policy matched with the display bit request according to the resource policy index.
B16. The computing device of B15, the executable instructions further cause the processor to:
and sending the target resource strategy to the client so that the client can make a resource request according to the target resource strategy and display the requested resource in the corresponding display position.
B17. The computing device of B15, the executable instructions further cause the processor to:
the method comprises the steps of monitoring log data related to a resource strategy in an operation database through a capture component to obtain a log change event, and writing the log change event into a message queue in a message mode.
B18. The computing device of B17, the executable instructions further cause the processor to:
and the consumer through the message queue consumes the message from the message queue to process the message, and drives the leader node so that the leader node determines a resource strategy according to the processed message, and constructs a resource strategy index according to the resource strategy.
B19. The computing device of any of B15-B18, the resource policy index comprising: first index information and second index information;
the executable instructions further cause the processor to:
the leader node determines a strategy identifier and strategy content of a resource strategy and constructs first index information between the strategy identifier and the strategy content;
and constructing second index information between the preset dimension identification and the strategy identification according to the configuration rule information corresponding to the preset dimension.
B20. The computing device of B19, the preset dimensions comprising one or more of the following dimensions:
media, presentation position, client version, resource channel, user interaction characteristics.
B21. The computing device of B19 or B20, the executable instructions further cause the processor to:
the leader node and/or the follower node extracts dimension identifications and/or dimension related information used for determining the dimension identifications from the presentation bit request; if the dimension related information is extracted, determining a dimension identification corresponding to the dimension related information;
searching a strategy identifier matched with the dimension identifier according to second index information in the resource strategy index;
and determining the strategy content corresponding to the matched strategy identification according to the first index information in the resource strategy index to obtain the target resource strategy.
B22. The computing device of any of B15-B21, the executable instructions further cause the processor to:
the leader node synchronously stores the resource policy index into a remote cache and into a local cache of the leader node.
B23. The computing device of B22, the executable instructions further cause the processor to:
and the follower node searches a target resource strategy matched with the display bit request according to a resource strategy index stored in a remote cache or a local cache of the follower node.
B24. The computing device of B23, the executable instructions further cause the processor to:
the follower node preferentially searches the resource policy index from a local cache of the follower node; if the resource policy index is not found from the local cache, acquiring the resource policy index from a remote cache, and storing the acquired resource policy index into the local cache;
and searching a target resource strategy matched with the display bit request according to the resource strategy index.
B25. The computing device of any of B23-B24, the executable instructions further cause the processor to:
triggering the follower node to acquire the current resource strategy index from the remote cache through a timing task so that the follower node replaces the original resource strategy index in the local cache of the follower node by using the current resource strategy index.
B26. The computing device of any of B23-B25, the executable instructions further cause the processor to:
and after the leader node completes construction of the resource strategy index, generating an index construction notice, and sending the index construction notice to the follower node, so that the follower node acquires the current resource strategy index from a remote cache according to the index construction notice, and replaces the original resource strategy index in the local cache of the follower node by using the current resource strategy index.
B27. The computing device of any of B15-B26, the executable instructions further cause the processor to:
and deploying the resource strategy inquiry service and the interface type resource service in different applications, and setting the priority of the resource strategy inquiry service to be higher than the priority of the interface type resource service.
B28. The computing device of B27, the executable instructions further cause the processor to:
receiving an interface type resource acquisition request sent by a client, triggering the interface type resource service, acquiring resources from a resource channel end corresponding to the interface type resource service, and returning the resources to the client for display.
C29. A computer storage medium having stored therein at least one executable instruction for causing a processor to perform operations corresponding to the resource policy processing method of any one of a1-a 14.

Claims (10)

1. A resource policy processing method, the method being performed based on pre-selected leader and follower nodes, the method comprising:
monitoring log data related to a resource strategy in an operation database to obtain a log change event;
driving the leader node according to the log change event so that the leader node can determine a resource strategy, and constructing a resource strategy index according to the resource strategy;
receiving a display bit request sent by a client, triggering a resource policy query service, and distributing the display bit request to the leader node and/or the follower node, so that the leader node and/or the follower node searches a target resource policy matched with the display bit request according to the resource policy index.
2. The method of claim 1, after the finding a target resource policy that matches the presentation bit request, the method further comprising:
and sending the target resource strategy to the client so that the client can make a resource request according to the target resource strategy and display the requested resource in the corresponding display position.
3. The method of claim 1, wherein the monitoring log data related to the resource policy in the operation database to obtain a log change event comprises:
the method comprises the steps of monitoring log data related to a resource strategy in an operation database through a capture component to obtain a log change event, and writing the log change event into a message queue in a message mode.
4. The method of claim 3, the driving the leader node in accordance with the log change event for the leader node to determine a resource policy, constructing a resource policy index in accordance with the resource policy, comprising:
and the consumer through the message queue consumes the message from the message queue to process the message, and drives the leader node so that the leader node determines a resource strategy according to the processed message, and constructs a resource strategy index according to the resource strategy.
5. The method of any of claims 1-4, the resource policy index comprising: first index information and second index information;
the leader node determines a resource strategy, and constructs a resource strategy index according to the resource strategy, including:
the leader node determines a strategy identifier and strategy content of a resource strategy and constructs first index information between the strategy identifier and the strategy content;
and constructing second index information between the preset dimension identification and the strategy identification according to the configuration rule information corresponding to the preset dimension.
6. The method of claim 5, the preset dimensions comprising one or more of the following dimensions:
media, presentation position, client version, resource channel, user interaction characteristics.
7. The method of claim 5 or 6, the leader node and/or the follower node looking up a target resource policy matching the presentation bit request according to the resource policy index, comprising:
the leader node and/or the follower node extracts dimension identifications and/or dimension related information used for determining the dimension identifications from the presentation bit request; if the dimension related information is extracted, determining a dimension identification corresponding to the dimension related information;
searching a strategy identifier matched with the dimension identifier according to second index information in the resource strategy index;
and determining the strategy content corresponding to the matched strategy identification according to the first index information in the resource strategy index to obtain the target resource strategy.
8. The method of any of claims 1-7, after the leader node determines a resource policy from which to build a resource policy index, the method further comprising:
the leader node synchronously stores the resource policy index into a remote cache and into a local cache of the leader node.
9. A computing device, comprising: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is configured to store at least one executable instruction that causes the processor to:
monitoring log data related to a resource strategy in an operation database to obtain a log change event;
driving the leader node according to the log change event so that the leader node can determine a resource strategy, and constructing a resource strategy index according to the resource strategy;
receiving a display bit request sent by a client, triggering a resource policy query service, and distributing the display bit request to a leader node and/or a follower node, so that the leader node and/or the follower node searches a target resource policy matched with the display bit request according to the resource policy index.
10. A computer storage medium having at least one executable instruction stored therein, the executable instruction causing a processor to perform operations corresponding to the resource policy processing method according to any one of claims 1 to 8.
CN202111537132.4A 2021-12-15 2021-12-15 Resource policy processing method, computing device, and storage medium Active CN114218469B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111537132.4A CN114218469B (en) 2021-12-15 2021-12-15 Resource policy processing method, computing device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111537132.4A CN114218469B (en) 2021-12-15 2021-12-15 Resource policy processing method, computing device, and storage medium

Publications (2)

Publication Number Publication Date
CN114218469A true CN114218469A (en) 2022-03-22
CN114218469B CN114218469B (en) 2022-09-02

Family

ID=80702474

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111537132.4A Active CN114218469B (en) 2021-12-15 2021-12-15 Resource policy processing method, computing device, and storage medium

Country Status (1)

Country Link
CN (1) CN114218469B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE69331599D1 (en) * 1992-12-21 2002-03-28 Sun Microsystems Inc Method and device for a file processor with cache memory
CN102843615A (en) * 2012-09-05 2012-12-26 北京星网锐捷网络技术有限公司 Cache indexing method of online video files and cache server
JP2015525939A (en) * 2013-03-22 2015-09-07 インスパー・エレクトロニック・インフォメーション・インダストリー・コーポレーション・リミテッド Multi-tier cache coherency domain system and method of configuring Share-F state in multi-tier cache coherency domain system
CN107025243A (en) * 2016-02-02 2017-08-08 北京神州泰岳软件股份有限公司 A kind of querying method of resource data, inquiring client terminal and inquiry system
CN109447703A (en) * 2018-10-25 2019-03-08 珠海天燕科技有限公司 A kind of resource exhibition method and device
CN109800222A (en) * 2018-12-11 2019-05-24 中国科学院信息工程研究所 A kind of HBase secondary index adaptive optimization method and system
CN110197075A (en) * 2018-04-11 2019-09-03 腾讯科技(深圳)有限公司 Resource access method, calculates equipment and storage medium at device
CN113326081A (en) * 2021-06-30 2021-08-31 中国平安人寿保险股份有限公司 Static resource processing method and device, computer equipment and storage medium
CN113364877A (en) * 2021-06-11 2021-09-07 北京百度网讯科技有限公司 Data processing method, device, electronic equipment and medium
CN113535777A (en) * 2021-06-24 2021-10-22 上海浦东发展银行股份有限公司 Database query method, device and system

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE69331599D1 (en) * 1992-12-21 2002-03-28 Sun Microsystems Inc Method and device for a file processor with cache memory
CN102843615A (en) * 2012-09-05 2012-12-26 北京星网锐捷网络技术有限公司 Cache indexing method of online video files and cache server
JP2015525939A (en) * 2013-03-22 2015-09-07 インスパー・エレクトロニック・インフォメーション・インダストリー・コーポレーション・リミテッド Multi-tier cache coherency domain system and method of configuring Share-F state in multi-tier cache coherency domain system
CN107025243A (en) * 2016-02-02 2017-08-08 北京神州泰岳软件股份有限公司 A kind of querying method of resource data, inquiring client terminal and inquiry system
CN110197075A (en) * 2018-04-11 2019-09-03 腾讯科技(深圳)有限公司 Resource access method, calculates equipment and storage medium at device
CN109447703A (en) * 2018-10-25 2019-03-08 珠海天燕科技有限公司 A kind of resource exhibition method and device
CN109800222A (en) * 2018-12-11 2019-05-24 中国科学院信息工程研究所 A kind of HBase secondary index adaptive optimization method and system
CN113364877A (en) * 2021-06-11 2021-09-07 北京百度网讯科技有限公司 Data processing method, device, electronic equipment and medium
CN113535777A (en) * 2021-06-24 2021-10-22 上海浦东发展银行股份有限公司 Database query method, device and system
CN113326081A (en) * 2021-06-30 2021-08-31 中国平安人寿保险股份有限公司 Static resource processing method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN114218469B (en) 2022-09-02

Similar Documents

Publication Publication Date Title
US9996565B2 (en) Managing an index of a table of a database
CN108052675B (en) Log management method, system and computer readable storage medium
US9996596B2 (en) Managing a table of a database
CN108513657B (en) Data conversion method and backup server
WO2018077046A1 (en) Method and apparatus for providing information
JP2021515294A (en) Transaction processing in a multi-master distributed data management system
US11410127B2 (en) Visualization of chat task recording, linking messaging, and record keeping
US11367049B2 (en) Method and system for identifying emails and calendar events associated with projects of an enterprise entity
CN103312624A (en) Message queue service system and method
US11336588B2 (en) Metadata driven static determination of controller availability
JP5315128B2 (en) Process request destination management apparatus, process request destination management program, and process request destination management method
CN111913764A (en) Service dependency analysis method, electronic device, and storage medium
US11367052B2 (en) Systems and methods for task assistance
CN114218469B (en) Resource policy processing method, computing device, and storage medium
CN114791915B (en) Data aggregation method and device, computer equipment and storage medium
CN115984022A (en) Unified account checking method and device for distributed payment system
US11537569B2 (en) Merges using key range data structures
CN103186417A (en) Service management method
CN112199426A (en) Interface call management method, device, server and medium under micro-service architecture
CN109815295A (en) Distributed type assemblies data lead-in method and device
US20240111715A1 (en) Attribute based asset discovery for intelligent protection
CN114841791B (en) Budget management and control method, system, device, computer equipment and storage medium
US11514016B2 (en) Paging row-based data stored as objects
US11930076B1 (en) Offload inefficient slicing from clients to the servers
CN114816586B (en) Visible data loading method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant