Method, device, computer device and program product for watermark recommendation
Patent Information
- Application Number
- CN202610982554.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-02
- Publication Date
- 2026-10-30
AI Technical Summary
[0003]目前,平台水印数量日渐增多,用户在大量水印中找到自己需要的水印,会浪费很长时间,在此情况下,如果为用户精准推荐其需要的水印,是目前亟需解决的技术问题
在本申请提供的技术方案中,服务器响应于终端发送的水印获取请求,获取候选水印集合,进而,根据用户所属行业与水印对应的行业,对候选水印集合中的水印进行排序,最后,根据排序后的水印向用户返回推荐水印,这样给用户推荐的水印与用户所属行业更相符,更可能是用户需要的水印。
Smart Images

Figure CN123012240A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, computer equipment, and program product for watermark recommendation. Background Technology
[0002] In enterprise team management scenarios, when employees take work photos through a designated application, the system automatically embeds a watermark on the photos. The watermark can serve as a visual record of the work process and as a trusted data source for subsequent business operations such as attendance and auditing.
[0003] Currently, the number of watermarks on the platform is increasing day by day. It takes users a long time to find the watermark they need among a large number of watermarks. Under such circumstances, how to accurately recommend the watermarks that users need is a technical problem that urgently needs to be solved. Summary of the Invention
[0004] This application provides a method, apparatus, computer device, and program product for watermark recommendation, which can improve the accuracy of watermark recommendation. The technical solution is as follows: Firstly, a method for recommending watermarks is provided, the method comprising: Receive the watermark acquisition request sent by the terminal; In response to the watermark acquisition request, a set of candidate watermarks is obtained; According to the multi-dimensional sorting rules, the watermarks in the candidate watermark set are sorted to obtain a sorted watermark list. The multi-dimensional sorting rules include that the higher the matching degree between the industry corresponding to the watermark and the industry to which the user of the terminal belongs, the higher the watermark is sorted. In the sorted watermark list, a watermark to be recommended is determined, and the relevant information of the watermark to be recommended is sent to the terminal.
[0005] In one possible implementation, the multi-dimensional sorting rule further includes: Watermarks with a pinned tag are ordered before watermarks without a pinned tag; and / or, The higher the description weight value of a watermark, the higher its ranking; and / or, The more recent the update time of the watermark, the higher the watermark will appear in the sort order; and / or, The larger the identifier ID of the watermark, the earlier the watermark appears in the sort order.
[0006] In one possible implementation, the multi-dimensional sorting rule further includes: If neither the first watermark nor the second watermark has a top marker, and the matching degree between the industry corresponding to the first watermark and the industry to which the user belongs to the terminal is higher than the matching degree between the industry corresponding to the second watermark and the industry to which the user belongs to the terminal, then the first watermark is ranked higher than the second watermark. If neither the first watermark nor the second watermark has a top marker, the matching degree between the industry corresponding to the first watermark and the industry to which the user belongs to the terminal is equal to the matching degree between the industry corresponding to the second watermark and the industry to which the user belongs to the terminal, and the description weight value corresponding to the first watermark is greater than the description weight value corresponding to the second watermark, then the first watermark is ranked higher than the second watermark. If neither the first watermark nor the second watermark has a top mark, the matching degree between the industry corresponding to the first watermark and the industry to which the user belongs to the terminal is equal to the matching degree between the industry corresponding to the second watermark and the industry to which the user belongs to the terminal, the description weight value corresponding to the first watermark is equal to the description weight value corresponding to the second watermark, and the update time corresponding to the first watermark is closer than the update time corresponding to the second watermark, then the first watermark is ranked higher than the second watermark. If neither the first watermark nor the second watermark has a top-of-the-line marker, the matching degree between the industry corresponding to the first watermark and the industry to which the user belongs to the terminal is equal to the matching degree between the industry corresponding to the second watermark and the industry to which the user belongs to the terminal, the description weight value corresponding to the first watermark is equal to the description weight value corresponding to the second watermark, the update time corresponding to the first watermark is the same as the update time corresponding to the second watermark, and the watermark ID corresponding to the first watermark is greater than the watermark ID corresponding to the second watermark, then the first watermark is ranked higher than the second watermark.
[0007] In one possible implementation, the method for calculating the matching degree between the industry corresponding to the watermark and the industry to which the user belongs corresponding to the terminal includes: If the industry corresponding to the watermark is the same as the industry to which the user corresponding to the terminal belongs, then the matching degree between the industry corresponding to the watermark and the industry to which the user corresponding to the terminal belongs is the first value. If the industry corresponding to the watermark is different from the industry of the user corresponding to the terminal, and the industry corresponding to the watermark is a general industry, then the matching degree between the industry corresponding to the watermark and the industry of the user corresponding to the terminal is the second value: If the industry corresponding to the watermark is different from the industry to which the user belongs, and the industry corresponding to the watermark is not a general industry, then the matching degree between the industry corresponding to the watermark and the industry to which the user belongs is a third value, where the first value is greater than the second value, and the second value is greater than the third value.
[0008] In one possible implementation, the watermark acquisition request carries client parameters of the watermark application installed on the terminal, and before sorting the watermarks in the candidate watermark set according to multi-dimensional sorting rules, the method further includes: Based on the client parameters, the watermarks in the candidate watermark set are filtered out, wherein the filtered watermarks are those that are incompatible with the watermark application installed on the terminal.
[0009] In one possible implementation, the client parameters include a watermark rendering protocol version and a client version. The step of filtering watermarks in the candidate watermark set based on the client parameters includes: For each watermark in the candidate watermark set, if the watermark rendering protocol version is not in the range of watermark rendering protocol versions compatible with the watermark, then the watermark is filtered. If the client version is not within the range of client versions compatible with the watermark, and the watermark does not have an upgrade requirement, then the watermark will be filtered.
[0010] In one possible implementation, the method further includes: The watermarks already displayed in the watermarking applications installed on the terminal are identified and used as the watermark exclusion set. The step of determining the watermark to be recommended in the sorted watermark list includes: Watermarks from the watermark exclusion set are excluded from the sorted watermark list, and from the remaining watermarks, a specified number of the highest-ranked watermarks are selected as watermarks to be recommended.
[0011] In one possible implementation, obtaining the candidate watermark set includes: The system sequentially queries the local memory cache, remote cache, and persistent database until it obtains the complete set of candidate watermarks.
[0012] Secondly, a watermark recommendation device is provided, characterized in that the device comprises: The receiving module is used to receive watermark acquisition requests sent by the terminal; The acquisition module is used to acquire a set of candidate watermarks in response to the watermark acquisition request; The sorting module is used to sort the watermarks in the candidate watermark set according to multi-dimensional sorting rules to obtain a sorted watermark list. The multi-dimensional sorting rules include that the higher the matching degree between the industry corresponding to the watermark and the industry to which the user of the terminal belongs, the higher the watermark will be sorted. The recommendation module is used to determine the watermark to be recommended from the sorted watermark list and send the relevant information of the watermark to be recommended to the terminal.
[0013] In one possible implementation, the multi-dimensional sorting rule further includes: Watermarks with a pinned tag are ordered before watermarks without a pinned tag; and / or, The higher the description weight value of a watermark, the higher its ranking; and / or, The more recent the update time of the watermark, the higher the watermark will appear in the sort order; and / or, The larger the identifier ID of the watermark, the earlier the watermark appears in the sort order.
[0014] In one possible implementation, the multi-dimensional sorting rule further includes: If neither the first watermark nor the second watermark has a top marker, and the matching degree between the industry corresponding to the first watermark and the industry to which the user belongs to the terminal is higher than the matching degree between the industry corresponding to the second watermark and the industry to which the user belongs to the terminal, then the first watermark is ranked higher than the second watermark. If neither the first watermark nor the second watermark has a top marker, the matching degree between the industry corresponding to the first watermark and the industry to which the user belongs to the terminal is equal to the matching degree between the industry corresponding to the second watermark and the industry to which the user belongs to the terminal, and the description weight value corresponding to the first watermark is greater than the description weight value corresponding to the second watermark, then the first watermark is ranked higher than the second watermark. If neither the first watermark nor the second watermark has a top mark, the matching degree between the industry corresponding to the first watermark and the industry to which the user belongs to the terminal is equal to the matching degree between the industry corresponding to the second watermark and the industry to which the user belongs to the terminal, the description weight value corresponding to the first watermark is equal to the description weight value corresponding to the second watermark, and the update time corresponding to the first watermark is closer to the update time corresponding to the second watermark, then the first watermark is ranked higher than the second watermark. If neither the first watermark nor the second watermark has a top-of-the-line marker, the matching degree between the industry corresponding to the first watermark and the industry to which the user belongs to the terminal is equal to the matching degree between the industry corresponding to the second watermark and the industry to which the user belongs to the terminal, the description weight value corresponding to the first watermark is equal to the description weight value corresponding to the second watermark, the update time corresponding to the first watermark is the same as the update time corresponding to the first watermark, and the watermark ID corresponding to the first watermark is greater than the watermark ID corresponding to the second watermark, then the first watermark is ranked higher than the second watermark.
[0015] In one possible implementation, the method for calculating the matching degree between the industry corresponding to the watermark and the industry to which the user belongs corresponding to the terminal includes: If the industry corresponding to the watermark is the same as the industry to which the user corresponding to the terminal belongs, then the matching degree between the industry corresponding to the watermark and the industry to which the user corresponding to the terminal belongs is the first value. If the industry corresponding to the watermark is different from the industry of the user corresponding to the terminal, and the industry corresponding to the watermark is a general industry, then the matching degree between the industry corresponding to the watermark and the industry of the user corresponding to the terminal is the second value: If the industry corresponding to the watermark is different from the industry to which the user belongs, and the industry corresponding to the watermark is not a general industry, then the matching degree between the industry corresponding to the watermark and the industry to which the user belongs is a third value, where the first value is greater than the second value, and the second value is greater than the third value.
[0016] In one possible implementation, the watermark acquisition request carries client parameters of the watermarking application installed on the terminal, and the device further includes a filtering module for: Based on the client parameters, the watermarks in the candidate watermark set are filtered out, wherein the filtered watermarks are those that are incompatible with the watermark application installed on the terminal.
[0017] In one possible implementation, the client parameters include the watermark rendering protocol version and the client version, and the filtering module is used for: For each watermark in the candidate watermark set, if the watermark rendering protocol version is not in the range of watermark rendering protocol versions compatible with the watermark, then the watermark is filtered. If the client version is not within the range of client versions compatible with the watermark, and the watermark does not have an upgrade requirement, then the watermark will be filtered.
[0018] In one possible implementation, the recommendation module is used to: The watermarks already displayed in the watermarking applications installed on the terminal are identified and used as the watermark exclusion set. Watermarks from the watermark exclusion set are excluded from the sorted watermark list, and from the remaining watermarks, a specified number of the highest-ranked watermarks are selected as watermarks to be recommended.
[0019] In one possible implementation, the acquisition module is configured to: The system sequentially queries the local memory cache, remote cache, and persistent database until it obtains the complete set of candidate watermarks.
[0020] Thirdly, a computer device is provided, the computer device including a processor and a memory, the memory storing at least one instruction, the instruction being loaded and executed by the processor to perform the operations performed as described in the first aspect above and any possible implementation of the watermarking recommendation method of the first aspect.
[0021] Fourthly, a computer-readable storage medium is provided, wherein at least one instruction is stored therein, the instruction being loaded and executed by a processor to perform the operations performed as described in the first aspect above and any possible implementation of the watermarking recommendation method described in the first aspect.
[0022] Fifthly, a computer program product is provided, the computer program product storing at least one instruction, the instruction being loaded and executed by a processor to perform the operations performed as described in the first aspect above and any possible implementation of the watermarking recommendation method described in the first aspect.
[0023] The beneficial effects of the technical solution provided in this application are: In the technical solution provided in this application, the server responds to the watermark acquisition request sent by the terminal, obtains a set of candidate watermarks, and then sorts the watermarks in the candidate watermark set according to the industry of the user and the industry corresponding to the watermark. Finally, the server returns a recommended watermark to the user according to the sorted watermarks. In this way, the recommended watermark is more consistent with the user's industry and is more likely to be the watermark that the user needs. Attached Figure Description
[0024] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0025] Figure 1 This is a flowchart of a watermark recommendation method provided in an embodiment of this application; Figure 2 This is a flowchart of a watermark recommendation method provided in an embodiment of this application; Figure 3 This is a flowchart of a watermark recommendation method provided in an embodiment of this application; Figure 4 This is a schematic diagram of a watermarking device structure provided in an embodiment of this application; Figure 5 This is a schematic diagram of the structure of a terminal provided in an embodiment of this application; Figure 6 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0026] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0027] In enterprise team management scenarios, when employees take work photos using a designated application, the system automatically embeds watermarks into the photos. These watermarks serve as a visual record of the work process and also as a reliable data source for subsequent attendance, auditing, and other business processes. Currently, the number of watermarks on the platform is increasing daily, and users waste a lot of time searching for the watermark they need. Therefore, accurately recommending the watermarks that users require is a pressing technical problem that needs to be solved.
[0028] Based on this, this application provides a watermark recommendation method. This method can be implemented by a computer device, which can be a server, specifically a single server or a server cluster. The server can be the backend server of a watermark application, and the terminal can have a watermark application (also called a client) installed. In this method, the server responds to a watermark acquisition request sent by the terminal, obtains a set of candidate watermarks, and then sorts the watermarks in the candidate watermark set according to the user's industry and the industry corresponding to the watermark. Finally, it returns recommended watermarks to the user based on the sorted watermarks. This way, the recommended watermarks are more consistent with the user's industry and are more likely to be the watermarks the user needs.
[0029] The watermarking method recommended in this application will be described below with reference to the accompanying drawings. See also: Figure 1 The processing of this method may include the following steps: Step 101: Receive the watermark acquisition request sent by the terminal.
[0030] After a user launches the watermark application and enters the watermark recommendation page, the terminal can send a watermark retrieval request to the server. In this case, it can request the full watermark.
[0031] Alternatively, on the watermark recommendation page, if a user clicks the watermark addition option, it triggers the terminal to send a watermark retrieval request to the server, in which case it may request the full watermark.
[0032] Alternatively, on the watermark recommendation page, if a user clicks the watermark addition option and selects a target tag, the terminal will send a watermark retrieval request to the server. In this case, the request could be for a watermark with the target tag. Tags could include daily reports, inspections, check-ins, etc.
[0033] Alternatively, users can directly enter the target keyword in the watermark search bar, in which case the watermark will be requested to match the target keyword.
[0034] When requesting a full watermark, the watermark retrieval request may include all or part of the following information: last update timestamp (lastUpdateTime), watermark exclusion set (exids), and client parameters. The watermark exclusion set contains the watermark IDs of watermarks already displayed by the watermarking application. Client parameters may include: watermark rendering protocol version (wmVersion), the client version of the aforementioned watermarking application (cVer), the user's primary industry (fIndustry), the target platform type (platform), and the number of requests (size). The user's primary industry refers to the industry that the user account logged into the aforementioned watermarking application entered during registration. Primary industries can include construction, property management, manufacturing, etc. The target platform type refers to the terminal's operating system.
[0035] When requesting a watermark corresponding to a target tag, the watermark retrieval request can carry the target tag in addition to the information mentioned above.
[0036] When requesting a watermark corresponding to a target keyword, the watermark retrieval request can carry the target keyword in addition to the information mentioned above.
[0037] Then, the server receives the watermark retrieval request sent by the terminal.
[0038] Step 102: In response to the watermark acquisition request, obtain the candidate watermark set.
[0039] After receiving a watermark retrieval request from the terminal, the server further obtains a set of candidate watermarks.
[0040] The set of candidate watermarks can also be different for different watermark acquisition requests.
[0041] When a watermark retrieval request is used to obtain the full watermark, the candidate watermark set may include the watermark ID of the full watermark provided by the official source.
[0042] When a watermark retrieval request is used to request the watermark corresponding to a target label, the candidate watermark set can include the watermark IDs of all watermarks corresponding to that target label.
[0043] When a watermark retrieval request is used to request the watermark corresponding to a target keyword, the candidate watermark set can include the watermark IDs of all watermarks that match the target keyword.
[0044] The watermark IDs in the candidate watermark set can be arranged according to a preset sorting.
[0045] The server compares lastUpdateTime with the locally recorded maximum update time (MaxUpdateTime). If lastUpdateTime >= MaxUpdateTime, the server directly returns MaxUpdateTime to the terminal, terminates the subsequent process, and the terminal reuses the locally cached watermark.
[0046] If lastUpdateTime < MaxUpdateTime, the subsequent processing continues.
[0047] The method for obtaining the above MaxUpdateTime may be as follows: MaxUpdateTime is used to represent the timestamp of the latest update of watermark-related information in the watermark database, wherein the watermark database may be MySQL (a relational database management system).
[0048] The server takes a specified duration (for example, 120 seconds) as a period, and calls a data access layer function (for example, dao.GetOfficialWmMaxUpdateTime) to query the latest change time of the full amount of watermark metadata from the wm_archive table in MySQL, as MaxUpdateTime.
[0049] In a possible implementation, in order to avoid server avalanche caused by a large number of watermark applications installed on terminals requesting watermarks at the same time, the server may use a rate limiting mechanism to process watermark acquisition requests. Correspondingly, the processing may be as follows: The server calls an increment operation (Increment, INCR) command, which acts on a rate limiting count key formatted by the current minute. The key name format of the rate limiting count key may be wm:official:rate:limit:YYYYMMDDHHMM, which indicates that it is an official watermark request rate limit, corresponding to the YYYY year, MM month, DD day, HH hour and MM minute, with precision to the minute.
[0050] For example, the key name of the rate limiting count key is wm:official:rate:limit:202606281504.
[0051] After receiving a watermark acquisition request sent by a terminal, the server obtains the cumulative request count (currentCount) within the current minute window through the aforementioned current limiting count key. If currentCount >= the preset maximum request threshold per minute (maxRequestsPerMinute), the timestamp returned to the terminal is forcibly set to the old value (lastUpdateTime) carried in the watermark acquisition request sent by the terminal. The cumulative request count herein refers to the number of watermark acquisition requests received by the server from each corresponding terminal where lastUpdateTime < MaxUpdateTime.
[0052] If currentCount < maxRequestsPerMinute, the locally recorded MaxUpdateTime is marked as the effective time of the watermark acquisition request, and the aforementioned step 102 is continued to be executed.
[0053] In a possible implementation, to improve the acquisition efficiency of the candidate watermark list, a three-level cache mechanism is adopted in the embodiments of this application to cache the watermark list. Correspondingly, when acquiring watermarks, the three-level cache may be used to acquire the candidate watermark set. As Figure 2 described, the processing may be as follows: First-level cache (server local memory cache): The server directly queries the full amount of official watermarks (or watermarks corresponding to a target tag, or watermarks matching a target keyword) in the in-process local cache. If a hit is made, the candidate watermark set is returned directly, where the candidate watermark set includes the watermark IDs of the full amount of official watermarks (or the watermark IDs of all watermarks corresponding to the target tag, or the watermark IDs of all watermarks matching the target keyword).
[0054] Second-level cache (Remote Dictionary Server (Redis) cache): If the server does not hit in the local cache, the Cache Get with Loader (CGet) method provided by Redis is called to acquire the candidate watermark set in Redis. If the candidate watermark set is still not acquired, the encapsulated getter source callback closure in the method is triggered.
[0055] Third-level cache (MySQL persistent storage): The getter source callback closure executes a MySQL query to acquire the candidate watermark set, and the MySQL query result is backfilled to both Redis and the local cache of the server at the same time.
[0056] In a possible implementation, during the initialization phase, the server may start the following three independent asynchronous scheduled refresh coroutines: The tasks include the Official Watermark ID List Task (OfficialWmList), the Official Watermark Dictionary Task (OfficialWaterMarkDict), and the Watermark Label Inverted Index Task (WaterMarkLabelDict).
[0057] Each of these three coroutines executes the following refresh logic at a fixed interval of a specified duration (e.g., 60 seconds): OfficialWmList: Calls the watermark list refresh function (RefreshWmList()) every 60 seconds to load the full list of official watermark IDs from MySQL and cache it in the local process so that the candidate watermark list can be quickly obtained in step 102 above.
[0058] OfficialWaterMarkDict: Calls the watermark dictionary refresh function (RefreshWmDict()) every 60 seconds. It loads a mapping dictionary from MySQL with the watermark ID as the key and the complete watermark metadata (such as differences in watermark rendering protocol versions, client version ranges across multiple platforms, description weight values, keywords used to describe the watermark, etc.) as values for subsequent sorting and version determination.
[0059] WaterMarkLabelDict: Every 60 seconds, the `RefreshLabelDict()` function is called to refresh the label dictionary, retrieving the association between all official watermark IDs and labels from MySQL. Specifically, the list of all official watermark IDs is split into multiple sub-batches of 500 IDs each, and concurrent queries are initiated to MySQL using a wait group (`sync.WaitGroup`). After the query is completed, an inverted hash table is built locally, with the label ID as the key and the list of watermark IDs corresponding to that label as the value. Watermarks that are not associated with any labels after the query are uniformly classified into the catch label "Other Labels (WMLabelOther)" to ensure the integrity of the label view. The target label carried in the watermark retrieval request mentioned above can refer to the label ID of the target label.
[0060] In one possible implementation, if the backend server of the watermarking application adopts a distributed architecture, the architecture includes multiple service nodes. Each service node registers a Redis publish / subscribe (Pub / Sub) listener when it starts up, subscribes to the dedicated channel "Official Watermark Change Notification Key (WmOfficialWmChangeSubKey)", and enters a continuous blocking listening state.
[0061] When an administrator performs watermark removal / removal, pinning / adjustment, or weight modification in MySQL via the backend, the backend operation interface will send a change notification to the dedicated channel.
[0062] After the service node detects the change notification, it triggers the three refresh functions mentioned above (RefreshWmList(), RefreshWmDict(), and RefreshLabelDict()). Among them, the refresh of RefreshLabelDict() can be delayed by a specified time (e.g., 1 second) compared to the other two refresh functions to avoid inconsistencies between the inverted hash table and the watermark ID list.
[0063] In this embodiment, the 60-second periodic refresh and the publish / subscribe instant push are redundant. The periodic refresh is a backup for notifications that may be lost, and the publish / subscribe compensates for the minute-level delay of the periodic refresh. Together, they ensure that changes to the watermark data can be quickly synchronized to all service nodes, and the refreshes of each service node do not block each other.
[0064] Step 103: Sort the watermarks in the candidate watermark set according to the multi-dimensional sorting rules to obtain the sorted watermark list.
[0065] Multi-dimensional sorting rules may include: watermarks with a top-pinning mark are sorted before watermarks without a top-pinning mark, and / or, the higher the description weight value of the watermark, the higher the watermark is sorted, and / or, the more recent the update time of the watermark, the higher the watermark is sorted, and / or, the larger the watermark ID of the watermark, the higher the watermark is sorted.
[0066] Specifically, such as Figure 3 As shown, the sorting rules can be as follows: If neither the first watermark nor the second watermark has a top-of-the-line mark, and the matching degree between the industry corresponding to the first watermark and the industry to which the user belongs is higher than that between the industry corresponding to the second watermark and the industry to which the user belongs, then the first watermark will be ranked higher than the second watermark. If neither the first watermark nor the second watermark has a top-of-the-line mark, the matching degree between the industry corresponding to the first watermark and the industry to which the user belongs is equal to the matching degree between the industry corresponding to the second watermark and the industry to which the user belongs, and the description weight value corresponding to the first watermark is greater than the description weight value corresponding to the second watermark, then the first watermark is ranked higher than the second watermark. If neither the first watermark nor the second watermark has a top mark, the matching degree between the industry corresponding to the first watermark and the industry to which the user belongs is equal to the matching degree between the industry corresponding to the second watermark and the industry to which the user belongs is equal to the matching degree between the industry corresponding to the second watermark and the industry to which the user belongs is equal to the description weight value corresponding to the second watermark, and the update time corresponding to the first watermark is closer to the update time corresponding to the second watermark, then the first watermark is ranked higher than the second watermark. If neither the first watermark nor the second watermark has a top-of-the-line marker, the matching degree between the industry corresponding to the first watermark and the industry corresponding to the user of the terminal is equal to the matching degree between the industry corresponding to the second watermark and the industry corresponding to the user of the terminal, the description weight value corresponding to the first watermark is equal to the description weight value corresponding to the second watermark, the update time corresponding to the first watermark is the same as the update time corresponding to the second watermark, and the watermark ID corresponding to the first watermark is greater than the watermark ID corresponding to the second watermark, then the first watermark is ranked higher than the second watermark.
[0067] In one possible implementation, the above industry matching degree can be calculated as follows: If the industry corresponding to the watermark is the same as the industry of the user corresponding to the terminal, then the matching degree between the industry corresponding to the watermark and the industry corresponding to the user of the terminal is the first value. If the industry corresponding to the watermark is different from the industry corresponding to the user of the terminal, and the industry corresponding to the watermark is a general industry, then the matching degree between the industry corresponding to the watermark and the industry corresponding to the user of the terminal is the second value. If the industry corresponding to the watermark is different from the industry corresponding to the user of the terminal, and the industry corresponding to the watermark is not a general industry, then the matching degree between the industry corresponding to the watermark and the industry corresponding to the user of the terminal is the third value. The first value is greater than the second value, and the second value is greater than the third value.
[0068] In one possible implementation, the candidate watermark list may contain watermarks incompatible with the watermarking application installed on the terminal. Version filtering can remove these watermarks. Then, step 103 above is performed to sort the watermarks, resulting in a sorted watermark list. The version filtering process can be as follows: Based on client parameters, watermarks in the candidate watermark set are filtered out, with those that are incompatible with the watermarking application installed on the terminal being removed. Specifically, the processing can be as follows: For each watermark in the candidate watermark set, if the watermark rendering protocol version is not within the range of compatible watermark rendering protocol versions, the watermark is filtered. If the client version is not within the range of compatible client versions, and the watermark does not have an upgrade-pending marker, the watermark is filtered. For example: For any watermark, compare the watermark rendering protocol version (wmVersion) carried in the watermark acquisition request with the watermark rendering protocol version interval compatible with the watermark [(start version) BeginVersion, (end version) EndVersion). If wmVersion<BeginVersion, the watermark is filtered out. If wmVersion>=EndVersion, the watermark is filtered out.
[0069] Obtain the multi-platform client version interval corresponding to the watermark, wherein the structure of the multi-platform client version interval can be [{Platform, Min, Max}, ...]. Match the target platform of the terminal that sends the watermark acquisition request, and extract the minimum version (Min) and maximum version (Max) corresponding to the watermark under the target platform.
[0070] If cVer<Min and the watermark does not have a to-be-upgraded flag, the watermark is filtered out.
[0071] If wmVersion is within [BeginVersion, EndVersion), cVer<Min, and the watermark is configured with a to-be-upgraded flag (for example, NeedCheckUpgradeOld == 1), the watermark is not filtered out. If the watermark is subsequently taken as a to-be-recommended watermark, the NeedCheckUpgradeNew status of the watermark is marked as true, and when returning the relevant information of the watermark to the terminal, the minimum client version number of the watermark application supported by the watermark (SupportMinVersion == Min) is attached, so that the watermark application can pop up a window to prompt the user to upgrade.
[0072] Step 104: Determine to-be-recommended watermarks in the sorted watermark list, and send relevant information of the to-be-recommended watermarks to the terminal.
[0073] The embodiments of the present application may use exclusion set pagination, and accordingly, the processing may be as follows: The watermark acquisition request may carry the watermark IDs of the watermarks that have been displayed in the watermark application installed on the terminal, that is, the watermark exclusion set (exids). The watermarks in exids are excluded from the sorted watermark list, and a specified number (for example, 10) of watermarks with the highest ranking are obtained from the remaining watermarks as the to-be-recommended watermarks. Further, relevant information of the to-be-recommended watermarks is acquired and returned to the terminal, and the relevant information may include relevant configuration information that enables the watermarks to be normally used in the watermark application.
[0074] Specifically, the processing may be as follows: The `exids` sent by the terminal are converted into a hash table using a hash table conversion tool (e.g., `tools.ConvertMap`). Then, the watermark IDs in the sorted watermark list are checked sequentially from front to back. If the current watermark ID is in the hash table, it is skipped; otherwise, it is added as a watermark to be recommended in the list of watermarks to be recommended. The iteration terminates when the length of the list of watermarks to be recommended reaches `size`.
[0075] After the traversal is complete, calculate hasMore. Specifically, if the actual number of watermarks to be recommended is equal to size and there are still untraversed watermarks in the list of recommended watermarks, then hasMore is 1; otherwise, it is 0.
[0076] In one possible implementation, after all watermarks to be recommended are identified, a watermark filling function (e.g., FillWatermarkLabels) is called to retrieve all tag information associated with the watermark ID of the watermark to be recommended from the inverted hash table in the local process, fill the tag field of the watermark, and return it to the terminal as relevant watermark information.
[0077] In one possible implementation, when the watermark acquisition request is for the watermark corresponding to the target label, the server retrieves the list of watermark IDs under the target label from the inverted index hash table (labelWmDict) in the local process as a candidate watermark set, and then performs the aforementioned version filtering, multi-dimensional sorting, and other processing.
[0078] In one possible implementation, in the technical solution provided by this application embodiment, when requesting the watermark corresponding to the target tag (or target keyword), after the first round of executing step 102 above, through version filtering, the number of remaining watermarks in the candidate watermark set may already be less than the number (size) of watermarks requested by the user. In this case, this application embodiment also supports multi-round filtering and completion, and the corresponding processing can be as follows: During the first round of querying, when executing step 102 above to obtain the candidate watermark set, it can first determine that the added priority flag (SearchAddFirst) in the watermark acquisition request is 1. Then, when querying the candidate watermark set, it can prioritize obtaining the watermark corresponding to the target tag (or target keyword) from the watermarks already added by the user account. If all the watermarks already added by the user account have been traversed, it can continue to query the watermark corresponding to the target tag (or target keyword) in the above three-level cache.
[0079] The version filtering process described above is applied to the first round of query results. The watermark IDs of the remaining watermarks after version filtering are added to the candidate watermark set, and the watermark IDs added to the candidate watermark set are also added to the candidate watermark set.
[0080] In addition, the query result, regardless of whether it is filtered out by the version, shall be added to the temporary exclusion set.
[0081] If the number of watermark IDs in the current candidate watermark set is less than the requested number of watermarks (size), and the number of results returned by the original database query in this round is greater than or equal to size, the process proceeds to the next round of query.
[0082] Each round of query carries the updated temporary exclusion set, so that when querying the watermarks corresponding to the target tag (or target keyword), the watermarks in the temporary exclusion set will be skipped, to ensure that the watermarks already added to the candidate watermark set will not be acquired again in this round.
[0083] After each round of query, it is determined whether the last watermark ID added to the candidate watermark set in this round is a watermark already added by the user account. If yes, SearchAddFirst remains 1, to ensure that the next round of query still preferentially searches for the watermarks already added by the user account. If not, SearchAddFirst is set to 0, so that in the next round of query, the query is directly performed in the official full amount of watermarks according to the three-level cache described above.
[0084] After each round of query is completed and all version-filtered query results are added to the candidate watermark set, the query loop is terminated if the number of watermark IDs in the current candidate watermark set is greater than or equal to size, or the number of watermark IDs in the query result of this round is less than size, or the number of query loops is greater than or equal to 3.
[0085] After terminating the query loop, the final candidate watermark set is subjected to step 103 and subsequent processing.
[0086] In a possible implementation, the embodiments of the present application further provide a method for recommending watermark hot words, and correspondingly, the processing may be as follows: The server maintains a primary industry memory mapping table (FIndustryMap) within the process. For each primary industry, the memory mapping table includes the following three fields: Secondary industry configuration list (ConfList): The secondary industry configuration list includes the exclusive hot word list of all secondary industries under the primary industry.
[0087] General hot word list (KwList): The default hot word list of the primary industry.
[0088] Watermark recommendation name list (RWmNameList): The watermark names of the top 10 most frequently used watermarks under the primary industry.
[0089] The server also maintains an incremental synchronization watermark, which records the last successful refresh of the first-level industry hot word memory mapping table (UpdateTime).
[0090] The refresh mechanism for the memory mapping table of primary industry hot keywords can be as follows: The server starts a separate timed coroutine that calls the refresh configuration list function (RefreshConfigList) every specified interval (e.g., 5 minutes). This function first retrieves the incremental synchronization watermark currently stored in memory.
[0091] When the server starts for the first time, the incremental synchronization watermark is equal to 0. The function to obtain incremental hot word configurations (GetNewSKwList) is called, with the incremental synchronization watermark being 0. Since the update time of all hot word configuration data is greater than 0, this incremental hot word configuration function returns the full set of hot word configuration data, including each hot word configuration data.
[0092] The above-mentioned secondary industry configuration list, general hot keyword list, and watermark recommended name list are populated based on the full set of hot keyword configuration data. After the population process is complete, the internal incremental synchronization watermark is updated to the current timestamp.
[0093] Subsequently, every 5 minutes, the function to obtain incremental hot word configuration (GetNewSKwList) is called, passing in the incremental synchronization water level of the current record, in order to obtain the hot word configuration data that has changed since the incremental synchronization water level of the current record from the watermark database.
[0094] The system iterates through the acquired hot keyword configuration data, extracts the primary industry to which each hot keyword configuration data belongs, and places it into a temporary list. The `RemoveDuplicateString` function is then executed on this list to obtain a list of primary industry names that have changed since the current record's incremental synchronization level.
[0095] Then, the function `GetNewSKwListByFIndustry` is called to retrieve hot keyword configurations in batches by primary industry, passing in the list of primary industry names that have changed. This function retrieves the latest full set of hot keyword configuration data for each primary industry in the list of changed primary industry names from the database.
[0096] Retrieve the list of recommended watermark names for each primary industry from the list of primary industry names that have changed, which is maintained by the process, and assign it to the list of recommended watermark names in the latest full set of hot word configuration data for that primary industry, which is retrieved from the database.
[0097] The latest full set of hot word configuration data for the first-level industry after assignment processing is stored in the memory mapping table of that first-level industry in the process, overwriting the old hot word configuration data in the memory mapping table of that first-level industry.
[0098] After the coverage is complete, the recorded incremental synchronization watermark will be updated to the current timestamp.
[0099] The process for recommending hot keywords with watermarks can be as follows: When registering, users can select their primary industry (FIndustry) and secondary industry (SIndustry). The primary industry can be a broad industry category, while the secondary industry is a sub-category within that category. For example, for the primary industry of construction, the corresponding secondary industries could include residential construction, roads and bridges, and decoration and renovation. For the primary industry of manufacturing, the corresponding secondary industries could include automobile manufacturing, electronic assembly, and food processing.
[0100] The server prioritizes matching the user's secondary industry. If the server finds the corresponding secondary industry configuration list in the memory mapping table of each primary industry in the process, and the number of hot words in the secondary industry configuration list is greater than or equal to a specified number (for example, the specified number is 10), then the server directly retrieves the specified number of hot words from the secondary industry configuration list as recommended hot words and returns them to the terminal for display.
[0101] If no secondary industry configuration list is found for the corresponding secondary industry, or if the number of hot words in the secondary industry configuration list is less than the specified number, then the query will be downgraded to the general hot word list for the primary industry to which the user belongs.
[0102] If a list of general hot words corresponding to the primary industry is found, and the number of hot words in the list is greater than or equal to the specified number, then the specified number of hot words will be directly retrieved from the list and used as recommended hot words, which will then be returned to the terminal for display.
[0103] If no general hot word list corresponding to the primary industry is found, or if the number of hot words in the general hot word list is less than the specified number, then the watermark recommendation name list corresponding to the primary industry to which the user belongs is queried. A certain number of watermark names are obtained from this watermark recommendation name list as recommended hot words. The sum of "certain number" and the number of hot words found in the general hot word list is the specified number. This ensures that the watermark application can display at least 10 recommended hot words.
[0104] All of the above-mentioned optional technical solutions can be combined in any way to form the optional embodiments of this application, and will not be described in detail here.
[0105] Based on the same technical concept, embodiments of this application also provide a watermark recommendation device, which can be applied to computer devices, such as... Figure 4 As shown, the device includes a receiving module 410, an acquiring module 420, a sorting module 430, and a recommending module 440, wherein: The receiving module 410 is used to receive a watermark acquisition request sent by the terminal; The acquisition module 420 is used to acquire a set of candidate watermarks in response to the watermark acquisition request; The sorting module 430 is used to sort the watermarks in the candidate watermark set according to the multi-dimensional sorting rules to obtain a sorted watermark list. The multi-dimensional sorting rules include that the higher the matching degree between the industry corresponding to the watermark and the industry to which the user belongs to the terminal belongs, the higher the watermark will be sorted. The recommendation module 440 is used to determine the watermark to be recommended from the sorted watermark list and send the relevant information of the watermark to be recommended to the terminal.
[0106] In one possible implementation, the multi-dimensional sorting rule further includes: Watermarks with a pinned tag are ordered before watermarks without a pinned tag; and / or, The higher the description weight value of a watermark, the higher its ranking; and / or, The more recent the update time of the watermark, the higher the watermark will appear in the sort order; and / or, The larger the identifier ID of the watermark, the earlier the watermark appears in the sort order.
[0107] In one possible implementation, the multi-dimensional sorting rule further includes: If neither the first watermark nor the second watermark has a top marker, and the matching degree between the industry corresponding to the first watermark and the industry to which the user belongs to the terminal is higher than the matching degree between the industry corresponding to the second watermark and the industry to which the user belongs to the terminal, then the first watermark is ranked higher than the second watermark. If neither the first watermark nor the second watermark has a top marker, the matching degree between the industry corresponding to the first watermark and the industry to which the user belongs to the terminal is equal to the matching degree between the industry corresponding to the second watermark and the industry to which the user belongs to the terminal, and the description weight value corresponding to the first watermark is greater than the description weight value corresponding to the second watermark, then the first watermark is ranked higher than the second watermark. If neither the first watermark nor the second watermark has a top mark, the matching degree between the industry corresponding to the first watermark and the industry to which the user belongs to the terminal is equal to the matching degree between the industry corresponding to the second watermark and the industry to which the user belongs to the terminal, the description weight value corresponding to the first watermark is equal to the description weight value corresponding to the second watermark, and the update time corresponding to the first watermark is closer than the update time corresponding to the second watermark, then the first watermark is ranked higher than the second watermark. If neither the first watermark nor the second watermark has a top-of-the-line marker, the matching degree between the industry corresponding to the first watermark and the industry to which the user belongs to the terminal is equal to the matching degree between the industry corresponding to the second watermark and the industry to which the user belongs to the terminal, the description weight value corresponding to the first watermark is equal to the description weight value corresponding to the second watermark, the update time corresponding to the first watermark is the same as the update time corresponding to the first watermark, and the watermark ID corresponding to the first watermark is greater than the watermark ID corresponding to the second watermark, then the first watermark is ranked higher than the second watermark.
[0108] In one possible implementation, the method for calculating the matching degree between the industry corresponding to the watermark and the industry to which the user belongs corresponding to the terminal includes: If the industry corresponding to the watermark is the same as the industry to which the user corresponding to the terminal belongs, then the matching degree between the industry corresponding to the watermark and the industry to which the user corresponding to the terminal belongs is the first value. If the industry corresponding to the watermark is different from the industry of the user corresponding to the terminal, and the industry corresponding to the watermark is a general industry, then the matching degree between the industry corresponding to the watermark and the industry of the user corresponding to the terminal is the second value: If the industry corresponding to the watermark is different from the industry to which the user belongs, and the industry corresponding to the watermark is not a general industry, then the matching degree between the industry corresponding to the watermark and the industry to which the user belongs is a third value, where the first value is greater than the second value, and the second value is greater than the third value.
[0109] In one possible implementation, the watermark acquisition request carries client parameters of the watermarking application installed on the terminal, and the device further includes a filtering module for: Based on the client parameters, the watermarks in the candidate watermark set are filtered out, wherein the filtered watermarks are those that are incompatible with the watermark application installed on the terminal.
[0110] In one possible implementation, the client parameters include the watermark rendering protocol version and the client version, and the filtering module is used for: For each watermark in the candidate watermark set, if the watermark rendering protocol version is not in the range of watermark rendering protocol versions compatible with the watermark, then the watermark is filtered. If the client version is not within the range of client versions compatible with the watermark, and the watermark does not have an upgrade requirement, then the watermark will be filtered.
[0111] In one possible implementation, the recommendation module 440 is used to: The watermarks already displayed in the watermarking applications installed on the terminal are identified and used as the watermark exclusion set. Watermarks from the watermark exclusion set are excluded from the sorted watermark list, and from the remaining watermarks, a specified number of the highest-ranked watermarks are selected as watermarks to be recommended.
[0112] In one possible implementation, the acquisition module 420 is used for: The system sequentially queries the local memory cache, remote cache, and persistent database until it obtains the complete set of candidate watermarks.
[0113] In the technical solution provided in this application embodiment, the server responds to the watermark acquisition request sent by the terminal, obtains a set of candidate watermarks, and then sorts the watermarks in the candidate watermark set according to the industry to which the user belongs and the industry corresponding to the watermark. Finally, the server returns a recommended watermark to the user according to the sorted watermarks. In this way, the watermark recommended to the user is more consistent with the user's industry and is more likely to be the watermark that the user needs.
[0114] It should be noted that the watermark recommendation device provided in the above embodiments is only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the computer device can be divided into different functional modules to complete all or part of the functions described above. In addition, the watermark recommendation device and the watermark recommendation method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.
[0115] Figure 5This illustration shows a structural block diagram of a terminal 800 provided in an exemplary embodiment of this application. The terminal 800 may be a portable mobile terminal, such as a smartphone, tablet computer, MP3 player (Moving Picture Experts Group Audio Layer III), MP4 player (Moving Picture Experts Group Audio Layer IV), laptop computer, or desktop computer. The terminal 800 may also be referred to as a user device, portable terminal, laptop terminal, desktop terminal, or other names.
[0116] Typically, terminal 800 includes a processor 801 and a memory 802.
[0117] Processor 801 may include one or more processing cores, such as a quad-core processor or an octa-core processor. Processor 801 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). Processor 801 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 801 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, processor 801 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.
[0118] Memory 802 may include one or more computer-readable storage media, which may be non-transitory. Memory 802 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in memory 802 is used to store at least one instruction, which is executed by processor 801 to implement the watermarking recommendation method provided in the method embodiments of this application.
[0119] In some embodiments, the terminal 800 may also optionally include a peripheral device interface 803 and at least one peripheral device. The processor 801, memory 802, and peripheral device interface 803 can be connected via a bus or signal line. Each peripheral device can be connected to the peripheral device interface 803 via a bus, signal line, or circuit board. Specifically, the peripheral device includes at least one of the following: a radio frequency circuit 804, a display screen 805, a camera assembly 806, an audio circuit 807, a positioning assembly 808, and a power supply 809.
[0120] Peripheral device interface 803 can be used to connect at least one I / O (Input / Output) related peripheral device to processor 801 and memory 802. In some embodiments, processor 801, memory 802 and peripheral device interface 803 are integrated on the same chip or circuit board; in some other embodiments, any one or two of processor 801, memory 802 and peripheral device interface 803 can be implemented on separate chips or circuit boards, which is not limited in this embodiment.
[0121] The radio frequency (RF) circuit 804 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The RF circuit 804 communicates with communication networks and other communication devices via electromagnetic signals. The RF circuit 804 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals back into electrical signals. Optionally, the RF circuit 804 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, etc. The RF circuit 804 can communicate with other terminals through at least one wireless communication protocol. This wireless communication protocol includes, but is not limited to: the World Wide Web, metropolitan area networks, intranets, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and / or WiFi (Wireless Fidelity) networks. In some embodiments, the RF circuit 804 may also include circuitry related to NFC (Near Field Communication), which is not limited in this application.
[0122] Display screen 805 is used to display a UI (User Interface). This UI may include graphics, text, icons, videos, and any combination thereof. When display screen 805 is a touch display screen, it also has the ability to collect touch signals on or above its surface. These touch signals can be input as control signals to processor 801 for processing. In this case, display screen 805 can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, there may be one display screen 805, disposed on the front panel of terminal 800; in other embodiments, there may be at least two display screens, disposed on different surfaces of terminal 800 or in a folded design; in other embodiments, display screen 805 may be a flexible display screen, disposed on a curved or folded surface of terminal 800. Furthermore, display screen 805 may be configured as a non-rectangular irregular shape, i.e., a non-rectangular screen. Display screen 805 may be made of materials such as LCD (Liquid Crystal Display) or OLED (Organic Light-Emitting Diode).
[0123] The camera assembly 806 is used to acquire images or videos. Optionally, the camera assembly 806 includes a front-facing camera and a rear-facing camera. Typically, the front-facing camera is located on the front panel of the terminal, and the rear-facing camera is located on the back of the terminal. In some embodiments, there are at least two rear-facing cameras, which are any one of a main camera, a depth-sensing camera, a wide-angle camera, and a telephoto camera, to achieve background blurring by fusion of the main camera and the depth-sensing camera, panoramic shooting by fusion of the main camera and the wide-angle camera, VR (Virtual Reality) shooting, or other fusion shooting functions. In some embodiments, the camera assembly 806 may also include a flash. The flash can be a single-color temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm-light flash and a cool-light flash, which can be used for light compensation at different color temperatures.
[0124] The audio circuit 807 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, converting the sound waves into electrical signals that are input to the processor 801 for processing, or input to the radio frequency circuit 804 to achieve voice communication. For stereo sound acquisition or noise reduction purposes, multiple microphones may be used, each located at a different part of the terminal 800. The microphone may also be an array microphone or an omnidirectional microphone. The speaker is used to convert the electrical signals from the processor 801 or the radio frequency circuit 804 into sound waves. The speaker may be a conventional diaphragm speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can convert electrical signals not only into audible sound waves but also into inaudible sound waves for purposes such as distance measurement. In some embodiments, the audio circuit 807 may also include a headphone jack.
[0125] The positioning component 808 is used to determine the current geographical location of the positioning terminal 800 in order to enable navigation or LBS (Location Based Service). The positioning component 808 can be a positioning component based on GPS (Global Positioning System), BeiDou system, or Galileo system.
[0126] Power supply 809 is used to supply power to the various components in terminal 800. Power supply 809 can be AC power, DC power, a disposable battery, or a rechargeable battery. When power supply 809 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery that is charged via a wired line, and a wireless rechargeable battery is a battery that is charged via a wireless coil. The rechargeable battery can also be used to support fast charging technology.
[0127] In some embodiments, the terminal 800 further includes one or more sensors 810. The one or more sensors 810 include, but are not limited to: an accelerometer 811, a gyroscope 812, a pressure sensor 813, a fingerprint sensor 814, an optical sensor 815, and a proximity sensor 816.
[0128] Accelerometer 811 can detect the magnitude of acceleration on the three coordinate axes of a coordinate system established by terminal 800. For example, accelerometer 811 can be used to detect the components of gravitational acceleration on the three coordinate axes. Processor 801 can control display screen 805 to display the user interface in either a landscape or portrait view based on the gravitational acceleration signal acquired by accelerometer 811. Accelerometer 811 can also be used for games or for acquiring user motion data.
[0129] The gyroscope sensor 812 can detect the orientation and rotation angle of the terminal 800. The gyroscope sensor 812, in conjunction with the accelerometer sensor 811, can collect 3D motion data from the user on the terminal 800. Based on the data collected by the gyroscope sensor 812, the processor 801 can perform the following functions: motion sensing (e.g., changing the UI based on the user's tilt), image stabilization during shooting, game control, and inertial navigation.
[0130] The pressure sensor 813 can be disposed on the side bezel of the terminal 800 and / or on the lower layer of the display screen 805. When the pressure sensor 813 is disposed on the side bezel of the terminal 800, it can detect the user's grip signal on the terminal 800, and the processor 801 can perform left / right hand recognition or quick operation based on the grip signal collected by the pressure sensor 813. When the pressure sensor 813 is disposed on the lower layer of the display screen 805, the processor 801 can control the operable controls on the UI interface based on the user's pressure operation on the display screen 805. The operable controls include at least one of button controls, scroll bar controls, icon controls, and menu controls.
[0131] The fingerprint sensor 814 is used to collect the user's fingerprint. The processor 801 identifies the user's identity based on the fingerprint collected by the fingerprint sensor 814, or the fingerprint sensor 814 identifies the user's identity based on the collected fingerprint. When the user's identity is identified as trusted, the processor 801 authorizes the user to perform relevant sensitive operations, including unlocking the screen, viewing encrypted information, downloading software, making payments, and changing settings. The fingerprint sensor 814 can be located on the front, back, or side of the terminal 800. When the terminal 800 has a physical button or manufacturer logo, the fingerprint sensor 814 can be integrated with the physical button or manufacturer logo.
[0132] An optical sensor 815 is used to collect ambient light intensity. In one embodiment, the processor 801 can control the display brightness of the display screen 805 based on the ambient light intensity collected by the optical sensor 815. Specifically, when the ambient light intensity is high, the display brightness of the display screen 805 is increased; when the ambient light intensity is low, the display brightness of the display screen 805 is decreased. In another embodiment, the processor 801 can also dynamically adjust the shooting parameters of the camera assembly 806 based on the ambient light intensity collected by the optical sensor 815.
[0133] The proximity sensor 816, also known as a distance sensor, is typically located on the front panel of the terminal 800. The proximity sensor 816 is used to detect the distance between the user and the front of the terminal 800. In one embodiment, when the proximity sensor 816 detects that the distance between the user and the front of the terminal 800 is gradually decreasing, the processor 801 controls the display screen 805 to switch from a screen-on state to a screen-off state; when the proximity sensor 816 detects that the distance between the user and the front of the terminal 800 is gradually increasing, the processor 801 controls the display screen 805 to switch from a screen-off state to a screen-on state.
[0134] Those skilled in the art will understand that Figure 5 The structure shown does not constitute a limitation on terminal 800 and may include more or fewer components than shown, or combine certain components, or use different component arrangements.
[0135] This application embodiment also provides a computer device 1100, which can be the computer device mentioned in the above embodiments. For example... Figure 6 As shown, the computer device 1100 includes a bus 1102, a processor 1104, a memory 1106, and a communication interface 1108. The processor 1104, the memory 1106, and the communication interface 1108 communicate with each other via the bus 1102. It should be understood that this application does not limit the number of processors and memories in the computer device 1100.
[0136] Bus 1102 can be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Buses can be divided into address buses, data buses, control buses, etc. For ease of representation, Figure 6 The bus 1104 may be represented by a single line, but this does not mean that there is only one bus or one type of bus. The bus 1104 may include a path for transmitting information between various components of the computer device 1100 (e.g., memory 1106, processor 1104, communication interface 1108).
[0137] The processor 1104 may include any one or more processors such as CPU (central processing unit), GPU (graphics processing unit), or DSP (digital signal processor).
[0138] The memory 1106 may include volatile memory, such as RAM (random access memory). The memory 1106 may also include non-volatile memory, such as ROM (read-only memory), flash memory, HDD (hard disk drive), or SSD (solid state drive).
[0139] The memory 1106 stores executable program code, which the processor 1104 executes to implement the recommended watermarking method.
[0140] The communication interface 1108 is used to enable communication between the computer device 1100 and other devices or communication networks.
[0141] In an exemplary embodiment, a computer-readable storage medium is also provided, such as a memory including instructions executable by a processor in a computer device to perform the watermarking method recommended in the above embodiments. This computer-readable storage medium may be non-transitory. For example, the computer-readable storage medium may be ROM (Read-Only Memory), RAM (Random Access Memory), CD-ROM (CompactDisc Read-Only Memory), magnetic tape, floppy disk, and optical data storage devices, etc.
[0142] It should be noted that all information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.), and signals (including but not limited to signals transmitted between user computer devices and other devices) involved in this application have been authorized by the user or fully authorized by all parties, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, all images and faces involved in this application were obtained with full authorization.
[0143] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0144] It should be understood that "multiple" as used herein refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. Furthermore, the step numbers described herein are merely illustrative of one possible execution order. In some other embodiments, the steps may not be executed in numerical order, such as two steps with different numbers being executed simultaneously, or two steps with different numbers being executed in the reverse order of the illustration. This application does not limit this.
[0145] The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A method for recommending watermarks, characterized in that, The method includes: Receive the watermark acquisition request sent by the terminal; In response to the watermark acquisition request, a set of candidate watermarks is obtained; According to the multi-dimensional sorting rules, the watermarks in the candidate watermark set are sorted to obtain a sorted watermark list. The multi-dimensional sorting rules include that the higher the matching degree between the industry corresponding to the watermark and the industry to which the user of the terminal belongs, the higher the watermark is sorted. In the sorted watermark list, a watermark to be recommended is determined, and the relevant information of the watermark to be recommended is sent to the terminal.
2. The method according to claim 1, characterized in that, The multi-dimensional sorting rules also include: Watermarks with a pinned tag are ordered before watermarks without a pinned tag; and / or, The higher the description weight value of a watermark, the higher its ranking; and / or, The more recent the update time of the watermark, the higher the watermark will appear in the sort order; and / or, The larger the watermark identifier ID, the higher the watermark appears in the order.
3. The method according to claim 2, characterized in that, The multi-dimensional sorting rules also include: If neither the first watermark nor the second watermark has a top marker, and the matching degree between the industry corresponding to the first watermark and the industry to which the user belongs to the terminal is higher than the matching degree between the industry corresponding to the second watermark and the industry to which the user belongs to the terminal, then the first watermark is ranked higher than the second watermark. If neither the first watermark nor the second watermark has a top marker, the matching degree between the industry corresponding to the first watermark and the industry to which the user belongs to the terminal is equal to the matching degree between the industry corresponding to the second watermark and the industry to which the user belongs to the terminal, and the description weight value corresponding to the first watermark is greater than the description weight value corresponding to the second watermark, then the first watermark is ranked higher than the second watermark. If neither the first watermark nor the second watermark has a top mark, the matching degree between the industry corresponding to the first watermark and the industry to which the user belongs to the terminal is equal to the matching degree between the industry corresponding to the second watermark and the industry to which the user belongs to the terminal, the description weight value corresponding to the first watermark is equal to the description weight value corresponding to the second watermark, and the update time corresponding to the first watermark is closer than the update time corresponding to the second watermark, then the first watermark is ranked higher than the second watermark. If neither the first watermark nor the second watermark has a top-of-the-line marker, the matching degree between the industry corresponding to the first watermark and the industry to which the user belongs to the terminal is equal to the matching degree between the industry corresponding to the second watermark and the industry to which the user belongs to the terminal, the description weight value corresponding to the first watermark is equal to the description weight value corresponding to the second watermark, the update time corresponding to the first watermark is the same as the update time corresponding to the second watermark, and the watermark ID corresponding to the first watermark is greater than the watermark ID corresponding to the second watermark, then the first watermark is ranked higher than the second watermark.
4. The method according to claim 1, characterized in that, The method for calculating the matching degree between the industry corresponding to the watermark and the industry to which the user belongs corresponding to the terminal includes: If the industry corresponding to the watermark is the same as the industry to which the user corresponding to the terminal belongs, then the matching degree between the industry corresponding to the watermark and the industry to which the user corresponding to the terminal belongs is the first value. If the industry corresponding to the watermark is different from the industry of the user corresponding to the terminal, and the industry corresponding to the watermark is a general industry, then the matching degree between the industry corresponding to the watermark and the industry of the user corresponding to the terminal is the second value: If the industry corresponding to the watermark is different from the industry to which the user belongs, and the industry corresponding to the watermark is not a general industry, then the matching degree between the industry corresponding to the watermark and the industry to which the user belongs is a third value, where the first value is greater than the second value, and the second value is greater than the third value.
5. The method according to claim 1, characterized in that, The watermark acquisition request carries client parameters of the watermark application installed on the terminal. Before sorting the watermarks in the candidate watermark set according to multi-dimensional sorting rules, the method further includes: Based on the client parameters, the watermarks in the candidate watermark set are filtered out, wherein the filtered watermarks are those that are incompatible with the watermark application installed on the terminal.
6. The method according to claim 5, characterized in that, The client parameters include the watermark rendering protocol version and the client version. The filtering of watermarks in the candidate watermark set based on the client parameters includes: For each watermark in the candidate watermark set, if the watermark rendering protocol version is not in the range of watermark rendering protocol versions compatible with the watermark, then the watermark is filtered. If the client version is not within the range of client versions compatible with the watermark, and the watermark does not have an upgrade requirement, then the watermark will be filtered.
7. The method according to claim 1, characterized in that, The method further includes: The watermarks already displayed in the watermarking applications installed on the terminal are identified and used as the watermark exclusion set. The step of determining the watermark to be recommended in the sorted watermark list includes: Watermarks from the watermark exclusion set are excluded from the sorted watermark list, and from the remaining watermarks, a specified number of the highest-ranked watermarks are selected as watermarks to be recommended.
8. The method according to claim 1, characterized in that, The process of obtaining the candidate watermark set includes: The system sequentially queries the local memory cache, remote cache, and persistent database until it obtains the complete set of candidate watermarks.
9. A device for recommending watermarks, characterized in that, The device includes: The receiving module is used to receive watermark acquisition requests sent by the terminal; The acquisition module is used to acquire a set of candidate watermarks in response to the watermark acquisition request; The sorting module is used to sort the watermarks in the candidate watermark set according to multi-dimensional sorting rules to obtain a sorted watermark list. The multi-dimensional sorting rules include that the higher the matching degree between the industry corresponding to the watermark and the industry to which the user of the terminal belongs, the higher the watermark will be sorted. The recommendation module is used to determine the watermark to be recommended from the sorted watermark list and send the relevant information of the watermark to be recommended to the terminal.
10. The apparatus according to claim 9, characterized in that, The multi-dimensional sorting rules also include: Watermarks with a pinned tag are ordered before watermarks without a pinned tag; and / or, The higher the description weight value of a watermark, the higher its ranking; and / or, The more recent the update time of the watermark, the higher the watermark will appear in the sort order; and / or, The larger the identifier ID of the watermark, the earlier the watermark appears in the sort order.
11. The apparatus according to claim 9, characterized in that, The method for calculating the matching degree between the industry corresponding to the watermark and the industry to which the user belongs corresponding to the terminal includes: If the industry corresponding to the watermark is the same as the industry to which the user corresponding to the terminal belongs, then the matching degree between the industry corresponding to the watermark and the industry to which the user corresponding to the terminal belongs is the first value. If the industry corresponding to the watermark is different from the industry of the user corresponding to the terminal, and the industry corresponding to the watermark is a general industry, then the matching degree between the industry corresponding to the watermark and the industry of the user corresponding to the terminal is the second value: If the industry corresponding to the watermark is different from the industry to which the user belongs, and the industry corresponding to the watermark is not a general industry, then the matching degree between the industry corresponding to the watermark and the industry to which the user belongs is a third value, where the first value is greater than the second value, and the second value is greater than the third value.
12. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing at least one instruction that is loaded and executed by the processor to perform the operation performed by the watermarking recommended method as described in any one of claims 1-8.
13. A computer program product, characterized in that, The computer program product stores at least one instruction, which is loaded and executed by a processor to perform the operation of the watermarking recommended method as described in any one of claims 1-8.