A page generation method and device, electronic equipment and storage medium
By obtaining target data type and tag type from video platforms for filtering and generating search results pages, the problem of inflexible and poor reusability of search results page generation is solved, enabling flexible adaptation to the needs of different scenarios.
Patent Information
- Application Number
- CN202310596024.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-24
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2043-05-24
AI Technical Summary
In existing technologies, the generation of search results pages on video platforms is not flexible enough and has poor reusability. It requires manual adjustment of the code to adapt to different scenarios, which makes the generation difficult.
By responding to search commands, the system retrieves the target data type and target tag type from a preset database, deletes mismatched data, performs queries, generates a search results page, and filters data based on the target data type and tag type to adapt to the needs of different scenarios.
It improves the flexibility and reusability of search result page generation, eliminating the need to adjust the code for data search and page generation, and adapting to the needs of different business scenarios.
Smart Images

Figure CN116720015B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to a page generation method, apparatus, electronic device, and storage medium. Background Technology
[0002] With the development of video platforms, the number of videos stored on servers is increasing. To facilitate user browsing, video platforms provide search functions, distributing the video content that users need to users through the search results page.
[0003] It's understandable that the content complexity of a video platform's search results page is far greater than that of other pages. In addition to integrating content from different channels, there is also some unique content. Furthermore, depending on the scenario, some search results need to be flexibly adjusted for up or down. Therefore, generating search results pages is quite difficult.
[0004] Currently, depending on the specific scenario, developers typically need to intervene and manually adjust the code of the search results page to adjust the upper and lower limits of search results in different scenarios. This results in the code being intrusive to the business logic, making the generation of search results pages inflexible and lacking in reusability. Summary of the Invention
[0005] To address the aforementioned technical problems, this application discloses a page generation method, apparatus, electronic device, and storage medium, to at least resolve the issues of insufficient flexibility and poor reusability in the generation of search results pages in related technologies. The technical solution disclosed herein is as follows:
[0006] In a first aspect, this application discloses a page generation method, the method comprising:
[0007] In response to the received search command, the target data type and target tag type are retrieved from the preset database;
[0008] Delete the pending data whose data type is the target data type and / or whose tag type is the target tag type, and query the remaining pending data based on the search instruction to obtain the data to be displayed;
[0009] The search results page corresponding to the search command is generated and pushed based on the data to be displayed.
[0010] Optionally, the data to be deleted is of the target data type and the tag type is the target tag type, and the remaining data to be processed is queried based on the search instruction to obtain the data to be displayed, including:
[0011] Delete the pending data whose data type is the target data type to obtain candidate data;
[0012] According to the search instruction, the candidate data is queried to obtain the query data;
[0013] Delete the query data whose tag type is the target tag type to obtain the data to be displayed.
[0014] Optionally, the search results page includes at least one display area, and before retrieving the target data type and target tag type from a preset database in response to a received search instruction, the method further includes:
[0015] Obtain at least one target key-value pair corresponding to each display area and store it in a preset database; the key of the target key-value pair represents the target data type corresponding to the display area, and the value of the target key-value pair represents the target tag type corresponding to the display area.
[0016] Optionally, after retrieving the target data type and target tag type from a preset database in response to a received search instruction, the method further includes:
[0017] Obtain the data types and tag types to be blocked in the current scene;
[0018] If the data type to be blocked matches the target data type, and the tag type to be blocked matches the target tag type, the following steps are performed: deleting the data to be processed whose data type is the target data type and / or whose tag type is the target tag type, and querying the remaining data to be processed based on the search instruction to obtain the data to be displayed.
[0019] Optionally, if the data type to be blocked does not match the target data type, or the tag type to be blocked does not match the target tag type, the method further includes:
[0020] Update the target data type according to the data type to be blocked, or update the target tag type according to the tag type to be blocked, delete the pending data whose data type is the updated target data type and / or whose tag type is the updated target tag type, and query the remaining pending data based on the search instruction to obtain the data to be displayed.
[0021] Optionally, updating the target data type according to the data type to be masked includes:
[0022] Within a first preset time period, the data type to be blocked is used as a new target data type, or the data type to be blocked is added to the target data type as a new target data type;
[0023] The step of updating the target tag type according to the tag type to be blocked includes:
[0024] Within a second preset time period, the tag type to be blocked is used as a new target tag type, or the tag type to be blocked is added to the target tag type as a new target tag type.
[0025] Optionally, before obtaining the data type to be blocked and the tag type to be blocked in the current scene, the method further includes:
[0026] In response to user operation commands, determine the data type to be blocked and the tag type to be blocked in the current scene, and store the data type to be blocked and the tag type to be blocked in a high-speed storage medium;
[0027] The process of obtaining the data type to be blocked and the tag type to be blocked in the current scene includes:
[0028] Obtain the data type to be blocked and the tag type to be blocked from the high-speed storage medium.
[0029] Secondly, embodiments of the present invention provide a page generation apparatus, comprising:
[0030] The acquisition module is used to retrieve the target data type and target tag type from a preset database in response to the received search command;
[0031] The query module is used to delete pending data whose data type is the target data type and / or whose tag type is the target tag type, and to query the remaining pending data based on the search instruction to obtain the data to be displayed;
[0032] The generation module is used to generate and push the search results page corresponding to the search instruction based on the data to be displayed.
[0033] Thirdly, embodiments of the present invention provide an electronic device, including:
[0034] processor;
[0035] Memory used to store the processor's executable instructions;
[0036] The processor is configured to execute the instructions to implement the page generation method described in any of the preceding claims.
[0037] Fourthly, embodiments of the present invention provide a computer-readable storage medium, wherein when the instructions in the computer-readable storage medium are executed by a processor of a page generation electronic device, the page generation electronic device is able to perform the page generation method described above.
[0038] Compared with the prior art, this application has the following advantages:
[0039] In response to a received search command, the system retrieves the target data type and target tag type from a preset database; deletes pending data whose data type is the target data type and / or whose tag type is the target tag type, and queries the remaining pending data based on the search command to obtain the data to be displayed; and generates and pushes the search results page corresponding to the search command based on the data to be displayed.
[0040] In this way, filtering is performed based on the target data type and target tag type, and the search is performed on the filtered data to be processed to generate a search results page. For different scenarios, only the target data type and target tag type to be filtered need to be adjusted, without adjusting the data search and page generation code, thereby improving the flexibility and reusability of generating search results pages. Attached Figure Description
[0041] Figure 1 This is a flowchart of one of the page generation methods described in this application;
[0042] Figure 2 This is a logical diagram of a page generation method according to this application;
[0043] Figure 3 This is a structural block diagram of a page generation device according to this application;
[0044] Figure 4 This is a schematic diagram of an electronic device according to this application;
[0045] Figure 5 This is a block diagram of a device for page generation according to this application. Detailed Implementation
[0046] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0047] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0048] Reference Figure 1The flowchart illustrates a page generation method according to this application, which may specifically include the following steps:
[0049] In step S11, in response to the received search instruction, the target data type and target tag type are obtained from the preset database.
[0050] Typically, video platforms offer search functionality, distributing video content to users through search results pages. The content displayed on video platform search results pages is far more complex than on other pages. Furthermore, the content displayed on these pages needs to be filtered for different scenarios and times, and some search results may need to be flexibly adjusted for inclusion or exclusion.
[0051] In related technologies, the above adjustments often require developers to modify the relevant code. Therefore, generating search results pages is quite difficult, and a method that can reduce developer intervention is needed to improve the flexibility and reusability of search results page generation.
[0052] In this step, the search command is generated in response to a user's action. For example, the user could enter a search term in the search bar, click the search button, or perform a preset action, etc., and the specifics are not limited. Upon receiving the search command, a corresponding search results page can be generated to display the search results to the user.
[0053] In this application, at least one search result may be displayed simultaneously on the search results page. The search results may be related videos, images, text, or links found according to the search query, etc., without any specific limitation. Each search result has a complete display area on the search results page, which may be referred to as a card.
[0054] Each card can correspond to a different style. For example, some cards can be displayed in a scrolling manner, while others can be displayed in a preview mode, and so on. There are no specific restrictions.
[0055] In addition, each card has a corresponding tag type and / or data type. The tag type is used to indicate the tags of the search results that the card can display. The tags of the search results can be pre-marked by the uploader of the search results, or they can be automatically generated based on the detection and identification of the search results. There is no specific limitation. Correspondingly, the data type is used to indicate the data type of the search results that the card can display, including videos, images, text, or links, etc.
[0056] The binding relationship between the tag type and data type for each card can be represented as a key-value pair, where the tag type corresponds to the key and the data type corresponds to the value.
[0057] For example, it can be set as follows:
[0058] key=com,value=type1,type2;
[0059] key = game, value = type3;
[0060] The tag type can be any string with special meaning, and can be defined arbitrarily as long as it is not repeated. For example, if the tag type is a general type, then key = com; if the tag type is a game type, then key = game; if the tag type is a rule type, then key = policy; and so on. There are no specific restrictions.
[0061] In addition, in some cases, it is permissible to define only the tag type without binding it to the data type. That is, the data type corresponding to any card can be any type. This makes it easier to filter the data corresponding to the target tag type directly in the subsequent filtering steps. Among the filtered data, data that is not bound to the data type can be included.
[0062] For example, if we need to filter data of a certain tag type according to rules corresponding to a certain application scenario, then in this case, we can set:
[0063] key=policy,value="";
[0064] In this way, all data with the tag type "policy" will be filtered, regardless of the data type.
[0065] Alternatively, you can define only the data type without binding it to the tag type. In other words, the tag type corresponding to any card can be any type. This makes it easier to filter the data corresponding to the target data type directly in the subsequent filtering steps. Among the filtered data, data that is not bound to the tag type can be included.
[0066] For example, you can define a tag type name as unusable, and stipulate that this tag type cannot be used to tag cards, and then define the binding relationship:
[0067] key=unusable,value=type4;
[0068] In this way, any data with the data type "type4" will be filtered out, regardless of the tag type of the data.
[0069] In this application, the target data type and target tag type are the data types and tag types that need to be filtered. In different business scenarios, the corresponding target data type and target tag type may be different.
[0070] In one implementation, the search results page includes at least one display area. Before step S11, in response to the received search instruction, retrieves the target data type and target tag type from a preset database, the following steps are also included:
[0071] Retrieve at least one target key-value pair corresponding to each display area and store it in a preset database; the key of the target key-value pair represents the target data type corresponding to the display area, and the value of the target key-value pair represents the target tag type corresponding to the display area.
[0072] In other words, at least one target key-value pair corresponding to the target data type and target tag type can be obtained in advance and stored in a preset database. This allows for centralized management of target data types and target tag types, facilitating adjustments to the displayed content for different business scenarios, thereby improving the flexibility and reusability of search result page generation.
[0073] In one implementation, after step S11, in response to the received search instruction, retrieves the target data type and target tag type from a preset database, the following steps are also included:
[0074] Step S111: Obtain the data type to be blocked and the tag type to be blocked in the current scene;
[0075] Step S112: If the data type to be blocked matches the target data type, and the tag type to be blocked matches the target tag type, then perform the subsequent steps of deleting the data to be processed whose data type is the target data type and / or whose tag type is the target tag type, and query the remaining data to be processed based on the search command to obtain the data to be displayed.
[0076] In one implementation, this application may further include step S113:
[0077] If the data type to be blocked does not match the target data type, or the tag type to be blocked does not match the target tag type, the target data type is updated according to the data type to be blocked, or the target tag type is updated according to the tag type to be blocked. The data to be processed with the updated target data type and / or the tag type is the updated target tag type is deleted, and the remaining data to be processed is queried based on the search command to obtain the data to be displayed.
[0078] The data types and tags to be blocked are pre-defined data types and tags that need to be blocked for the current scenario. It's understood that the data types and tags to be blocked will differ for different application scenarios. By pre-setting the data types and tags to be blocked for different application scenarios, the search results page can be automatically differentiated in different application scenarios. The data types and tags to be blocked can be manually set or adjusted based on user interaction data with the search results page in different application scenarios; there are no specific limitations.
[0079] Therefore, if the data type to be blocked does not match the target data type, or the tag type to be blocked does not match the target tag type, it can be considered that the target data type and the target tag type do not match the needs of the current scenario. In other words, when the target data type and the target tag type differ from the needs of the current scenario.
[0080] At this point, the target data type and target tag type can be adjusted to match the current scenario. Then, data filtering can be performed based on the updated target data type and target tag type without modifying the code logic or restarting the service, thereby improving the flexibility and reusability of generating search results pages.
[0081] In one implementation, step S113 updates the target data type according to the data type to be masked, including:
[0082] Within the first preset time period, the data type to be blocked is used as the new target data type, or the data type to be blocked is added to the target data type as the new target data type;
[0083] Step S113 updates the target tag type according to the type of tag to be blocked, including:
[0084] Within the second preset time period, the tag type to be blocked is used as a new target tag type, or the tag type to be blocked is added to the target tag type as a new target tag type.
[0085] In other words, the step of updating the target data type and / or target tag type can be a temporary adjustment. First, the target data type is updated based on the data type to be blocked, resulting in a new target data type. After a first preset time period, the target data type is then restored to its previous state. Similarly, the target tag type can be updated based on the tag type to be blocked, resulting in a new target tag type. After a second preset time period, the target tag type is then restored to its previous state. The first and second preset time periods can be the same or different; there is no specific limitation.
[0086] Specifically, one can use the data type to be masked as the new target data type, or add a data type to be masked that was not previously included in the target data type, etc., without any specific limitations; updating the target tag type is similar.
[0087] This allows for flexible adjustments to the target data type and target tag type for different application scenarios, thereby improving the flexibility and reusability of generating search results pages.
[0088] Alternatively, the target data type and target tag type can be permanently adjusted based on the data type and tag type to be blocked, until switching to the next application scenario and obtaining new data types and tag types to be blocked, without any specific limitations.
[0089] In one implementation, before obtaining the data type to be blocked and the tag type to be blocked in the current scene in step S111, the method further includes:
[0090] In response to user operation commands, determine the data type to be blocked and the tag type to be blocked in the current scenario, and store the data type to be blocked and the tag type to be blocked in the high-speed storage medium;
[0091] Step S111 obtains the data type to be blocked and the tag type to be blocked in the current scene, including:
[0092] Obtain the data type and tag type to be blocked from the high-speed storage medium.
[0093] In other words, the target data type and target tag type can be stored in a high-speed storage medium, such as the Redis (Remote Dictionary Server) database. This storage medium is very suitable for storing key-value format data, and has fast query speed and good high concurrency performance.
[0094] Specifically, corresponding to different application scenarios, administrators can select certain tag types and data types on the management platform. These selected tag types will then be used as target tag types, and the selected data types will be used as target data types, stored in high-speed storage media. The storage format can be represented as follows:
[0095] key = game, value = type3;
[0096] key = policy, value = ;
[0097] key=unusable,value=type4;
[0098] In other words, in the current scenario, data with the tag type "game" and data type "type3", all data with the tag type "policy", and all data with the data type "type4" will be filtered in subsequent steps and will not be displayed on the search results page.
[0099] In step S12, the pending data with the data type of the target data type and / or the tag type of the target tag type is deleted, and the remaining pending data is queried based on the search command to obtain the data to be displayed.
[0100] In this step, after determining the target data type and target tag type, the pending data with the target data type and target tag type can be deleted. In this way, these data will not be displayed on the search results page, thereby meeting the needs of different business scenarios and improving the flexibility and reusability of the search results page.
[0101] In one implementation, S12 deletes the pending data whose data type is the target data type and whose tag type is the target tag type, and queries the remaining pending data based on the search command to obtain the data to be displayed, including:
[0102] Delete the pending data whose data type is the target data type to obtain candidate data; perform a query in the candidate data according to the search command to obtain the query data; delete the query data whose tag type is the target tag type to obtain the data to be displayed.
[0103] In other words, firstly, the target data type to be filtered is determined. This logic can be implemented by the search data backend. In this way, in subsequent steps, it is only necessary to query from the candidate data of the remaining data types, thereby reducing the amount of data to be searched and improving search efficiency.
[0104] For example, the target key-value pairs corresponding to the current scenario can be retrieved from the high-speed storage medium Redis. Then, only the value is taken, and the target data types that need to be filtered are sorted out. When a user's search request arrives, the target data types that need to be filtered are excluded before the calculation results are processed. Subsequent data calculations and sorting are only performed within the allowed data types.
[0105] Then, according to the search command, a query is performed in the candidate data to obtain the query data. After obtaining the query data, the query data of the target tag type that needs to be filtered is further determined. The query data of the remaining tag types is used as the data to be displayed to generate cards. This logic can be implemented by the search page backend. The search page backend is a service at a higher level than the search data backend to further reduce the amount of data that needs to be operated and improve search efficiency.
[0106] For example, the search data backend needs to construct card data, which involves sequentially organizing query data of different tag types into a card data list. Then, it queries the target tag data list to be filtered in the high-speed storage medium Redis, taking only the key value, to organize all the target tag types to be filtered. It then iterates through the card data list, deleting query data of the target tag types to obtain the data to be displayed, which is used to generate the search results page later.
[0107] In this way, through dual filtering control, the final search results still possess algorithmic rationality. This avoids situations where simply removing page data leads to a chaotic page display or poor data connection logic. Moreover, the data filtering process does not require adjustments to the data search and page generation code, thereby improving the flexibility and reusability of generating search results pages.
[0108] In step S13, a search results page corresponding to the search command is generated and pushed based on the data to be displayed.
[0109] In this step, a search results page can be generated based on the filtered data to be displayed. The search results page can display all the data to be displayed, or only a portion of the data to be displayed. For example, the portion of the data to be displayed on the search results page can be determined based on data such as historical pageviews, number of comments, or number of likes, etc. There are no specific limitations.
[0110] After generating the search results page corresponding to the search query, the search results page can be further pushed to the client that sent the search query. In this way, the user can obtain the search results corresponding to the search query.
[0111] like Figure 2The diagram shown is a logical illustration of the page generation method provided in this application. First, the binding relationship between the target tag type and / or the target data type can be saved in the Redis database in key-value pair format through the tag management platform. At the same time, the tag management platform can also control the tag type and / or data type of all data to be processed, so that it can adapt to the needs of different application scenarios.
[0112] Then, upon receiving a search command, the search data backend first queries the Redis database for the target data type to be filtered, and the search page backend queries the Redis database for the target tag type to be filtered.
[0113] Then, after the Redis database returns the target data type, the search data backend can delete the pending data with the target data type, and use the remaining pending data with the target data type as candidate data; then, the search data backend can query the candidate data according to the search command to obtain the query data.
[0114] Subsequently, after the Redis database returns the target tag type, the search page backend can delete the query data with the target tag type, use the remaining query data with the target tag type as the data to be displayed, generate a card, and finally display the search results page that meets the requirements to the user.
[0115] Therefore, this solution is highly flexible, allowing for batch offline operations and re-marking based on specific requirements, and dynamically adjusting the solution; it is highly reusable, with fine-grained operations, and can largely meet various different control objectives; it has a wider range of applications, in addition to data control in different application scenarios, it can also be used to handle online faults, such as directly taking offline a certain type of data or a certain type of card when there is a problem online, temporarily avoiding risks.
[0116] As can be seen from the above, the technical solution provided by the embodiments of this disclosure filters based on the target data type and target tag type, searches based on the filtered data to be processed, and generates a search results page. For different scenarios, only the target data type and target tag type to be filtered need to be adjusted, without adjusting the data search and page generation code, thereby improving the flexibility and reusability of generating search results pages.
[0117] Reference Figure 3 The diagram shows a structural schematic of a page generation apparatus according to this application, which may specifically include:
[0118] The acquisition module 201 is used to retrieve the target data type and target tag type from a preset database in response to the received search command;
[0119] The query module 202 is used to delete pending data whose data type is the target data type and whose tag type is the target tag type, and to query the remaining pending data based on the search instruction to obtain the data to be displayed;
[0120] The generation module 203 is used to generate and push the search results page corresponding to the search instruction based on the data to be displayed.
[0121] In one implementation, the query module 202 is specifically used for:
[0122] Delete the pending data whose data type is the target data type to obtain candidate data;
[0123] According to the search instruction, the candidate data is queried to obtain the query data;
[0124] Delete the query data whose tag type is the target tag type to obtain the data to be displayed.
[0125] In one implementation, the search results page includes at least one display area, and the acquisition module 201 is further configured to:
[0126] Obtain at least one target key-value pair corresponding to each display area and store it in a preset database; the key of the target key-value pair represents the target data type corresponding to the display area, and the value of the target key-value pair represents the target tag type corresponding to the display area.
[0127] In one implementation, the acquisition module 201 is further configured to:
[0128] Obtain the data types and tag types to be blocked in the current scene;
[0129] The query module 202 is used for:
[0130] If the data type to be blocked matches the target data type, and the tag type to be blocked matches the target tag type, the following steps are performed: deleting the data to be processed whose data type is the target data type and / or whose tag type is the target tag type, and querying the remaining data to be processed based on the search instruction to obtain the data to be displayed.
[0131] In one implementation, the query module 202 is further configured to:
[0132] If the data type to be blocked does not match the target data type, or the tag type to be blocked does not match the target tag type, the target data type is updated according to the data type to be blocked, or the target tag type is updated according to the tag type to be blocked. The pending data with the updated target data type and / or the updated target tag type is deleted, and the remaining pending data is queried based on the search instruction to obtain the data to be displayed.
[0133] In one implementation, the query module 202 is specifically used for:
[0134] Within a first preset time period, the data type to be blocked is used as a new target data type, or the data type to be blocked is added to the target data type as a new target data type;
[0135] Within a second preset time period, the tag type to be blocked is used as a new target tag type, or the tag type to be blocked is added to the target tag type as a new target tag type.
[0136] In one implementation, the query module 202 is further configured to:
[0137] In response to user operation commands, determine the data type to be blocked and the tag type to be blocked in the current scene, and store the data type to be blocked and the tag type to be blocked in a high-speed storage medium;
[0138] Obtain the data type to be blocked and the tag type to be blocked from the high-speed storage medium.
[0139] As can be seen from the above, the technical solution provided by the embodiments of this disclosure filters based on the target data type and target tag type, searches based on the filtered data to be processed, and generates a search results page. For different scenarios, only the target data type and target tag type to be filtered need to be adjusted, without adjusting the data search and page generation code, thereby improving the flexibility and reusability of generating search results pages.
[0140] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.
[0141] Figure 4 This is a block diagram of an electronic device for page generation according to an exemplary embodiment, including a processor and a memory, wherein the memory is used to store computer programs; and the processor is used to execute the programs stored in the memory.
[0142] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0143] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0144] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory including instructions, which can be executed by a processor of an electronic device to perform the above-described method. Optionally, the computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0145] In an exemplary embodiment, a computer program product is also provided, which, when run on a computer, enables the computer to implement the method for generating the comment page described above.
[0146] As can be seen from the above, the technical solution provided by the embodiments of the present invention filters based on the target data type and target tag type, searches based on the filtered data to be processed, and generates a search results page. For different scenarios, only the target data type and target tag type to be filtered need to be adjusted, without adjusting the data search and page generation code, thereby improving the flexibility and reusability of generating search results pages.
[0147] Figure 5 This is a block diagram illustrating an apparatus 800 for page generation according to an exemplary embodiment.
[0148] For example, device 800 can be a mobile phone, computer, digital broadcasting electronic device, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.
[0149] Reference Figure 5The device 800 may include one or more of the following components: a processing component 802, a memory 804, a power component 806, a multimedia component 808, an audio component 810, an input / output (I / O) interface 812, a sensor component 814, and a communication component 816.
[0150] Processing component 802 typically controls the overall operation of device 800, such as operations associated with display, telephone calls, data communication, camera operation, and recording. Processing component 802 may include one or more processors 820 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 802 may include one or more modules to facilitate interaction between processing component 802 and other components. For example, processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802.
[0151] Memory 804 is configured to store various types of data to support the operation of device 800. Examples of this data include instructions for any application or method operating on device 800, contact data, phonebook data, messages, pictures, videos, etc. Memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0152] Power supply component 807 provides power to various components of device 800. Power supply component 807 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to device 800.
[0153] Multimedia component 808 includes a screen that provides an output interface between the device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 808 includes a front-facing camera and / or a rear-facing camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data to be processed. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0154] Audio component 810 is configured to output and / or input audio signals. For example, audio component 810 includes a microphone (MIC) configured to receive external audio signals when device 800 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 804 or transmitted via communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
[0155] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.
[0156] Sensor assembly 814 includes one or more sensors for providing status assessments of various aspects of device 800. For example, sensor assembly 814 may detect the on / off state of device 800, the relative positioning of components such as the display and keypad of device 800, changes in the position of device 800 or a component of device 800, the presence or absence of user contact with device 800, the orientation or acceleration / deceleration of device 800, and temperature changes of device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 814 may also include an accelerometer, a gyroscope, a magnetometer, a pressure sensor, or a temperature sensor.
[0157] Communication component 816 is configured to facilitate wired or wireless communication between device 800 and other devices. Device 800 can access wireless networks based on communication standards, such as WiFi, carrier networks (such as 2G, 3G, 4G, or 5G), or combinations thereof. In one exemplary embodiment, communication component 816 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 816 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0158] In an exemplary embodiment, the apparatus 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described in the first and second aspects.
[0159] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, which can be executed by a processor 820 of the device 800 to perform the above-described method. Optionally, for example, the storage medium may be a non-transitory computer-readable storage medium, such as a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device.
[0160] In an exemplary embodiment, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to perform any of the page generation methods described in the above embodiments.
[0161] As can be seen from the above, the technical solution provided by the embodiments of the present invention filters based on the target data type and target tag type, searches based on the filtered data to be processed, and generates a search results page. For different scenarios, only the target data type and target tag type to be filtered need to be adjusted, without adjusting the data search and page generation code, thereby improving the flexibility and reusability of generating search results pages.
[0162] Other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. The embodiments of the invention are intended to cover any variations, uses, or adaptations of the embodiments of the invention that follow the general principles of the embodiments of the invention and include common knowledge or customary techniques in the art not disclosed in the embodiments of the invention. The specification and embodiments are to be considered exemplary only, and the true scope and spirit of the embodiments of the invention are indicated by the following claims.
[0163] It should be understood that the embodiments of the present invention are not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from their scope. The scope of the embodiments of the present invention is limited only by the appended claims.
Claims
1. A page generation method characterized by, The method comprises: in response to a received search instruction, obtaining a target data type and a target label type from a preset database; deleting to-be-processed data of the target data type and / or the target label type, and querying remaining to-be-processed data based on the search instruction to obtain to-be-displayed data; generating and pushing a search result page corresponding to the search instruction based on the to-be-displayed data; after the step of obtaining the target data type and the target label type from the preset database in response to the received search instruction, the method further comprises: obtaining a to-be-screened data type and a to-be-screened label type of a current scene; in a case where the to-be-screened data type matches the target data type and the to-be-screened label type matches the target label type, performing the step of deleting to-be-processed data of the target data type and / or the target label type, and querying remaining to-be-processed data based on the search instruction to obtain to-be-displayed data.
2. The method of claim 1, wherein, the step of deleting to-be-processed data of the target data type and / or the target label type, and querying remaining to-be-processed data based on the search instruction to obtain to-be-displayed data comprises: deleting to-be-processed data of the target data type to obtain candidate data; querying the candidate data according to the search instruction to obtain query data; deleting the query data of the target label type to obtain to-be-displayed data.
3. The method of claim 1, wherein, the search result page comprises at least one display area, and before the step of obtaining the target data type and the target label type from the preset database in response to the received search instruction, the method further comprises: obtaining at least one target key-value pair corresponding to each display area and storing the target key-value pair in the preset database; the key of the target key-value pair represents a target data type corresponding to the display area, and the value of the target key-value pair represents a target label type corresponding to the display area.
4. The method of claim 1, wherein, in a case where the to-be-screened data type does not match the target data type or the to-be-screened label type does not match the target label type, the method further comprises: updating the target data type according to the to-be-screened data type or updating the target label type according to the to-be-screened label type, deleting to-be-processed data of the updated target data type and / or the updated target label type, and querying remaining to-be-processed data based on the search instruction to obtain to-be-displayed data.
5. The method of claim 4, wherein, the step of updating the target data type according to the to-be-screened data type comprises: in a first preset time period, taking the to-be-screened data type as a new target data type or adding the to-be-screened data type to the target data type as a new target data type; the step of updating the target label type according to the to-be-screened label type comprises: In a second preset time period, the to-be-masked label type is taken as a new target label type, or the to-be-masked label type is added to the target label type as a new target label type.
6. The method of claim 1, wherein, Before the obtaining of the to-be-masked data type and the to-be-masked label type of the current scene, the method further includes: In response to a user operation instruction, the to-be-masked data type and the to-be-masked label type of the current scene are determined, and the to-be-masked data type and the to-be-masked label type are stored to a high-speed storage medium. The obtaining of the to-be-masked data type and the to-be-masked label type of the current scene includes: The to-be-masked data type and the to-be-masked label type are obtained from the high-speed storage medium.
7. A page generation apparatus characterized by comprising: The method includes: An obtaining module is configured to obtain a target data type and a target label type from a preset database in response to a received search instruction; A querying module is configured to delete to-be-processed data of which a data type is the target data type and / or a label type is the target label type, and query remaining to-be-processed data based on the search instruction to obtain to-be-displayed data; A generating module is configured to generate and push a search result page corresponding to the search instruction based on the to-be-displayed data. The obtaining module is further configured to: Obtain a to-be-masked data type and a to-be-masked label type of a current scene; The querying module is configured to: In a case where the to-be-masked data type matches the target data type and the to-be-masked label type matches the target label type, the step of deleting to-be-processed data of which a data type is the target data type and / or a label type is the target label type, and querying remaining to-be-processed data based on the search instruction to obtain to-be-displayed data is performed.
8. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor implements the steps of the page generation method according to any one of claims 1 to 6 when executing the program.
9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program implements the steps of the page generation method according to any one of claims 1 to 6 when executed by the processor.
Citation Information
Patent Citations
Search method and device, equipment and storage medium
CN112287204A
Method and apparatus for filtering search results
US8548973B1