A method and device for displaying a search page
By storing the selected filter conditions in the search page to the page address, the problem of memory wasted during multi-condition filtering is solved, and the effect of saving storage space and improving user experience is achieved.
Patent Information
- Application Number
- CN202110310234.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-23
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2041-03-23
AI Technical Summary
When performing multi-condition filtering in search pages, the prior art requires defining multiple variables to store selected conditions, resulting in memory waste and potential memory leaks that affect browser performance and user experience.
By displaying multiple filter conditions on the search page and storing the target filter conditions into the address of the page when the target filter conditions are selected, a new page address is generated and the corresponding search result page is displayed, additional memory usage is avoided.
It realizes storing and displaying selected filter conditions without consuming additional memory, saving storage space, reducing resource waste when storing filter conditions, and improving browser performance and user experience.
Smart Images

Figure CN112925969B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computers, and in particular to a method and device for displaying a search page. Background Art
[0002] Currently, when performing multi-condition filtering on the search page, a new variable is generally created for each filtering condition to store the selected condition. Each time a condition is operated, the condition is stored in the variable. However, when there are too many conditions, multiple variables need to be defined, which not only requires additional memory space, but also may cause memory leaks if not paid attention to, affecting browser performance and user experience.
[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0004] The present application provides a method and device for displaying a search page, so as to at least solve the technical problem of wasting storage resources when storing screening conditions in the related art.
[0005] According to one aspect of an embodiment of the present application, a method for displaying a search page is provided, comprising:
[0006] Displaying a first search page, wherein the first search page is used to search for resources, and the first search page displays multiple screening conditions for screening resources;
[0007] When it is detected that a selection operation is performed on a target filtering condition among the multiple filtering conditions, storing a target condition identifier of the target filtering condition in a first page address of the first search page to obtain a second page address;
[0008] A second search page corresponding to the second page address is displayed, wherein the second search page displays target prompt information and search results of the target filtering condition, and the target prompt information is used to prompt that the target filtering condition has been selected.
[0009] Optionally, when it is detected that a selection operation is performed on a target filtering condition among the multiple filtering conditions, storing a target condition identifier of the target filtering condition in a first page address of the first search page, and obtaining the second page address includes:
[0010] acquiring the filtering condition on which the selection operation is performed from the plurality of filtering conditions as the target filtering condition;
[0011] Acquire a target condition identifier of the target screening condition and a first page address of the first search page;
[0012] The target condition identifier is added to the first page address to obtain the second page address.
[0013] Optionally, acquiring the filtering condition on which the selection operation is performed from the multiple filtering conditions as the target filtering condition comprises:
[0014] When it is detected that a selection operation has been performed on a filter condition among the plurality of filter conditions, switching a display style of the filter condition on which the selection operation has been performed and displayed on the first search page from a first style to a second style;
[0015] Search the first search page for a filtering condition whose display style is the second style as the target filtering condition.
[0016] Optionally, obtaining the target condition identifier of the target screening condition includes:
[0017] Reading a code value corresponding to the target screening condition from an attribute tag of a target condition node corresponding to the target screening condition;
[0018] Writing the coded value corresponding to the target screening condition into the initial request parameter object corresponding to the target screening condition to obtain a target request parameter object, wherein the initial request parameter object records the field value corresponding to the target screening condition, and the target request parameter object records the field value and the coded value having a corresponding relationship;
[0019] The field value and the code value having a corresponding relationship are obtained from the target request parameter object as the target condition identifier.
[0020] Optionally, adding the target condition identifier to the first page address to obtain the second page address includes:
[0021] In the case where the target condition identifier is one condition identifier, connecting the one condition identifier to the end of the first page address to obtain the second page address;
[0022] In the case that the target condition identifier is a plurality of condition identifiers, the plurality of condition identifiers are concatenated into a target character string; the target character string is connected to the end of the first page address to obtain the second page address.
[0023] Optionally, displaying a second search page corresponding to the second page address includes:
[0024] Searching for resources using a search request carrying the target screening condition to obtain a first search result;
[0025] Refresh the content displayed in the search result display area on the page to the first search result, and obtain the second search page, wherein the second page address is displayed in the address bar on the page, and the condition display area on the page displays the target filtering condition carrying the target prompt information, and the condition display area is used to display the multiple filtering conditions.
[0026] Optionally, after displaying the second search page corresponding to the second page address, the method further includes:
[0027] When it is detected that a refresh operation is performed on the second search page, acquiring the target condition identifier from the second page address;
[0028] Refresh the second search page to obtain a third search page;
[0029] Displaying the plurality of filtering conditions on the third search page, and displaying the target prompt information on the target filtering condition corresponding to the target condition identifier in the plurality of filtering conditions;
[0030] Searching for resources using a search request carrying the target condition identifier to obtain a second search result;
[0031] The second search result is displayed on the third search page.
[0032] According to another aspect of an embodiment of the present application, a display device for a search page is also provided, including:
[0033] A first display module, used to display a first search page, wherein the first search page is used to search for resources, and the first search page displays multiple screening conditions for screening resources;
[0034] a storage module, configured to, when detecting that a target filtering condition among the plurality of filtering conditions has been selected, store a target condition identifier of the target filtering condition in the first page address of the first search page to obtain a second page address;
[0035] The second display module is used to display a second search page corresponding to the second page address, wherein the second search page displays target prompt information and search results of the target filtering conditions, and the target prompt information is used to prompt that the target filtering conditions have been selected.
[0036] According to another aspect of an embodiment of the present application, a storage medium is further provided, which includes a stored program, and the above method is executed when the program is run.
[0037] According to another aspect of an embodiment of the present application, an electronic device is further provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the above method through the computer program.
[0038] In an embodiment of the present application, a first search page is displayed, wherein the first search page is used to search for resources, and multiple filtering conditions for filtering resources are displayed on the first search page; when it is detected that a target filtering condition among the multiple filtering conditions has been selected, the target condition identifier of the target filtering condition is stored in the first page address of the first search page to obtain a second page address; a second search page corresponding to the second page address is displayed, wherein target prompt information and search results of the target filtering condition are displayed on the second search page, and the target prompt information is used to prompt that the target filtering condition has been selected. Multiple filtering conditions for filtering resources are displayed on the first search page for searching for resources. If multiple filtering conditions are detected, If a selection operation is performed on the target filtering condition in the search result, the target condition identifier of the target filtering condition is stored in the first page address of the first search page to obtain a second page address, and the second search page corresponding to the second page address is displayed. On the second search page, target prompt information for prompting that a selection operation has been performed on the target filtering condition and the search results of the target filtering condition are displayed. Thus, the storage of the selected target filtering condition can be realized without occupying additional memory, and the selected target filtering condition can be associated with the corresponding second search page, thereby achieving the purpose of saving storage space, thereby realizing the technical effect of reducing the waste of storage resources when storing the filtering conditions, and further solving the technical problem of wasting storage resources when storing the filtering conditions. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0040] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0041] Figure 1 is a schematic diagram of a hardware environment of a method for displaying a search page according to an embodiment of the present application;
[0042] Figure 2 is a flowchart of an optional method for displaying a search page according to an embodiment of the present application;
[0043] Figure 3 is a schematic diagram of an optional search page according to an optional embodiment of the present application;
[0044] Figure 4 is a schematic diagram of an optional display device for a search page according to an embodiment of the present application;
[0045] Figure 5 It is a structural block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0046] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0047] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0048] According to one aspect of an embodiment of the present application, a method embodiment for displaying a search page is provided.
[0049] Optionally, in this embodiment, the above-mentioned method for displaying the search page can be applied to: Figure 1 In the hardware environment composed of the terminal 101 and the server 103 shown in FIG. Figure 1As shown, the server 103 is connected to the terminal 101 through a network, and can be used to provide services (such as game services, application services, etc.) for the terminal or the client installed on the terminal. A database can be set on the server or independently of the server to provide data storage services for the server 103. The above network includes but is not limited to: a wide area network, a metropolitan area network or a local area network, and the terminal 101 is not limited to a PC, a mobile phone, a tablet computer, etc. The display method of the search page of the embodiment of the present application can be executed by the server 103, or by the terminal 101, or by the server 103 and the terminal 101. Among them, the terminal 101 executes the display method of the search page of the embodiment of the present application, which can also be executed by the client installed thereon.
[0050] Figure 2 is a flowchart of an optional method for displaying a search page according to an embodiment of the present application, such as Figure 2 As shown, the method may include the following steps:
[0051] Step S202, displaying a first search page, wherein the first search page is used to search for resources, and the first search page displays multiple screening conditions for screening resources;
[0052] Step S204, when it is detected that a target filtering condition among the multiple filtering conditions has been selected, storing a target condition identifier of the target filtering condition in the first page address of the first search page to obtain a second page address;
[0053] Step S206, displaying a second search page corresponding to the second page address, wherein the second search page displays target prompt information and search results of the target filtering condition, and the target prompt information is used to prompt that the target filtering condition has been selected.
[0054] Through the above steps S202 to S206, multiple filtering conditions for filtering resources are displayed on the first search page for searching resources. If it is detected that a target filtering condition among the multiple filtering conditions has been selected, the target condition identifier of the target filtering condition is stored in the first page address of the first search page to obtain a second page address, and the second search page corresponding to the second page address is displayed. On the second search page, target prompt information for prompting that the target filtering condition has been selected and the search results of the target filtering condition are displayed, so that the storage of the selected target filtering condition can be achieved without occupying additional memory, and the selected target filtering condition can be associated with the corresponding second search page, thereby achieving the purpose of saving storage space, thereby achieving the technical effect of reducing the waste of storage resources when storing the filtering conditions, and further solving the technical problem of wasting storage resources when storing the filtering conditions.
[0055] Optionally, in this embodiment, the display method of the search page can be applied to, but not limited to, a scenario in which resources are searched by selecting filter conditions on a search page. The search page can be, but not limited to, a page with a resource search function on various types of applications. For example: a filter function page on a multimedia application, a search page on a shopping application, a search page on a financial application, a search page on a cloud service sales application, and the like.
[0056] In the technical solution provided in step S202, the first search page is used to search for resources. Multiple filtering conditions for filtering resources are displayed on the first search page. The multiple filtering conditions can be displayed in categories but are not limited to categories. Multiple or only one filtering condition can be selected at the same time in each category. Multiple selection or single selection can be determined by the category attributes of the category. For example, the filtering conditions of brand type can be multiple selections, and the filtering conditions of price range type can be single selections.
[0057] Optionally, in this embodiment, each category may include, but is not limited to, an "all" filter condition option, and selecting the "all" option indicates that the category is not filtered. The "all" option is mutually exclusive with other options in the category, that is, if the "all" option is selected, the other options under the category are unchecked, and if other options in the category are selected, the "all" option under the category is unchecked.
[0058] Optionally, in this embodiment, the above resources may include but are not limited to any type of resources, such as: multimedia resources, commodity resources, virtual product resources, financial currency resources, news resources, etc.
[0059] In the technical solution provided in step S204, the above-mentioned selection operation can be but is not limited to any form of operation that can reflect the selection of the target filtering condition, for example: the selection operation can be but is not limited to including a click operation, a check operation, a slide operation, a drag operation, etc.
[0060] Optionally, in this embodiment, the first page address may be, but is not limited to, any form of page address, such as: a page URL (Uniform Resource Locator), a page IP address (Internet Protocol Address), and the like.
[0061] As an optional embodiment, when it is detected that a target filtering condition among the multiple filtering conditions is selected, storing a target condition identifier of the target filtering condition in a first page address of the first search page, and obtaining the second page address includes:
[0062] S11, acquiring the filtering condition on which the selection operation is performed from the multiple filtering conditions as the target filtering condition;
[0063] S12, obtaining a target condition identifier of the target screening condition and a first page address of the first search page;
[0064] S13, adding the target condition identifier to the first page address to obtain the second page address.
[0065] Optionally, in this embodiment, a selected filtering condition is obtained from multiple filtering conditions as a target filtering condition, and the selected filtering condition can be displayed differently from unselected filtering conditions, for example: by display style, by font color, by special marks, etc.
[0066] Optionally, in this embodiment, the target condition identifier is used to uniquely identify the target screening condition. For example, the target condition identifier may be, but is not limited to, the name, number, etc. of the target screening condition.
[0067] As an optional embodiment, obtaining the filtering condition on which the selection operation is performed from the multiple filtering conditions as the target filtering condition includes:
[0068] S21, when it is detected that a selection operation has been performed on a filter condition among the plurality of filter conditions, switching a display style of the filter condition on which the selection operation has been performed and displayed on the first search page from a first style to a second style;
[0069] S22: searching the first search page for a filtering condition whose display style is the second style as the target filtering condition.
[0070] Optionally, in this embodiment, the above display style may include, but is not limited to, CSS (Cascading Style Sheets).
[0071] Optionally, in this embodiment, the above-mentioned switching of the display style from the first style to the second style may include but is not limited to adding a CSS class (which can be recorded as .active), which style class will highlight the filter condition node on which the selection operation has been performed, and clear the active class of its sibling nodes (other filter conditions in the same category) to ensure that only the currently selected filter condition will be highlighted.
[0072] Optionally, in this embodiment, the method of searching for a filtering condition whose display style is the second style on the first search page as the target filtering condition may include but is not limited to three: creating a function for obtaining a page highlight condition node to obtain the highlighted elements on the page.
[0073] As an optional embodiment, obtaining the target condition identifier of the target screening condition includes:
[0074] S31, reading a code value corresponding to the target screening condition from an attribute tag of a target condition node corresponding to the target screening condition;
[0075] S32, writing the coded value corresponding to the target screening condition into the initial request parameter object corresponding to the target screening condition, to obtain a target request parameter object, wherein the initial request parameter object records the field value corresponding to the target screening condition, and the target request parameter object records the field value and the coded value having a corresponding relationship;
[0076] S33: Acquire the field value and the code value having a corresponding relationship from the target request parameter object as the target condition identifier.
[0077] Optionally, in this embodiment, various filtering conditions corresponding to the resources are rendered on the first search page, and each filtering condition corresponds to a condition node in the page code. The above attribute tag may include, but is not limited to, the attributes property of the condition node corresponding to the filtering condition.
[0078] Optionally, in this embodiment, the code value (code) corresponding to the filter condition is stored in the attribute tag of the condition node. For example, the filter bars included in the filter condition type of product classification may include all, service market, enterprise application, website construction, etc. A code value is set for each filter condition, which may be a code value of 0 for all, a code value of 1 for the service market, a code value of 2 for the enterprise application, and a code value of 3 for the website construction, and stored in the corresponding condition nodes. If the service market is selected, its corresponding code value 1 may be obtained.
[0079] Optionally, in this embodiment, the initial request parameter object corresponding to each filtering condition records the field value corresponding to the filtering condition. One filtering condition may correspond to one initial request parameter object, or the filtering conditions included in the category of each filtering condition may correspond to one initial request parameter object. For example, the initial request parameter object corresponding to the filtering condition type of the above-mentioned product classification records the field value corresponding to the filtering condition type as ProductCategory, and the code value 1 corresponding to the service market is written into the initial request parameter object, and the target request parameter object is ProductCategory=1.
[0080] As an optional embodiment, adding the target condition identifier to the first page address to obtain the second page address includes:
[0081] S41, when the target condition identifier is one condition identifier, connect the one condition identifier to the end of the first page address to obtain the second page address;
[0082] S42, when the target condition identifier is a plurality of condition identifiers, concatenate the plurality of condition identifiers into a target string; and connect the target string to the end of the first page address to obtain the second page address.
[0083] Optionally, in this embodiment, the target condition identifier may be connected to the end of the first page address but is not limited thereto. If there is one condition identifier, it may be directly connected, or connected through a preset character or string. If there are multiple condition identifiers, the multiple condition identifiers may be concatenated first and then connected to the end of the first page address, or the multiple condition identifiers may be concatenated through a preset character or string and then connected to the end of the first page address through another preset character or string.
[0084] In the technical solution provided in step S206, the target prompt information and the search results of the target filtering conditions are displayed on the second search page. The target prompt information is used to prompt that the target filtering condition has been selected, for example: the target prompt information may be in the form of, but not limited to, highlighting, font change, text prompt, symbol prompt, etc.
[0085] Optionally, in this embodiment, the page address, filter conditions and search results can be but are not limited to being displayed in different areas of the search page, the page address can be but are not limited to being displayed in the address bar, the filter conditions can be but are not limited to being displayed in the condition display area, and the search results can be but are not limited to being displayed in the search results display area.
[0086] As an optional embodiment, displaying the second search page corresponding to the second page address includes:
[0087] S51, searching for resources using a search request carrying the target screening condition to obtain a first search result;
[0088] S52, refresh the content displayed in the search result display area on the page to the first search result, and obtain the second search page, wherein the second page address is displayed in the address bar on the page, and the condition display area on the page displays the target filtering condition carrying the target prompt information, and the condition display area is used to display the multiple filtering conditions.
[0089] Optionally, in this embodiment, after obtaining the first search result, the first search result can be displayed by, but not limited to, partially refreshing the search page, that is, refreshing the search result display area on the search page, refreshing the content displayed in the search result display area on the page to the first search result, thereby obtaining a second search page.
[0090] Optionally, in this embodiment, the search page can be divided into, but not limited to, an address bar and a display area, and the display area can be divided into two areas: a search result display area and a condition display area, and these two areas can be refreshed in real time according to the selected filtering conditions. The search result display area is used to display the current search results, and the condition display area displays the target filtering conditions carrying target prompt information, that is, the currently selected screening physical examination, and the condition display area is used to display multiple filtering conditions.
[0091] Optionally, in this embodiment, the second page address can be written into the address bar on the page in real time through the history.pushState function, thereby realizing the operation of displaying the second page address on the address bar on the page, achieving the effect of changing the page address without refreshing.
[0092] As an optional embodiment, after displaying the second search page corresponding to the second page address, the method further includes:
[0093] S61, when it is detected that a refresh operation is performed on the second search page, acquiring the target condition identifier from the second page address;
[0094] S62, refreshing the second search page to obtain a third search page;
[0095] S63, displaying the multiple filtering conditions on the third search page, and displaying the target prompt information on the target filtering condition corresponding to the target condition identifier in the multiple filtering conditions;
[0096] S64, searching for resources using a search request carrying the target condition identifier to obtain a second search result;
[0097] S65: Display the second search result on the third search page.
[0098] Optionally, in this embodiment, if it is detected that the second search page has been refreshed, the selected filter condition in the second search page can be obtained from the second page address corresponding to the second search page, so that the filter condition selection before the refresh can be directly displayed on the refreshed page.
[0099] Optionally, in this embodiment, when the second search page is refreshed, the target condition identifier corresponding to the selected filtering condition can be directly obtained from the second page address, and the search request carrying the target condition identifier can be reused to search for the resource to obtain the second search result, and the second search result can be displayed on the refreshed third search page.
[0100] Optionally, in this embodiment, the search request used to obtain the second search result may include, but is not limited to, an AJAX request, which may implement a partial refresh of the page.
[0101] The present application also provides an optional embodiment, which provides a method for processing multi-condition filtering queries. When a search request is triggered on a search page, the selected filtering conditions are synchronized to the page URL (the selected filtering conditions can be obtained from the URL) and synchronized with the page view. When the selected filtering conditions on the page change, the page URL will also change. This processing can prevent the user from refreshing the page and causing the filtering conditions to disappear. As long as the page URL is not changed, the parameters of the selected filtering conditions can be permanently saved, and do not rely on other storage modules or cache interfaces, and do not use additional variables and memory to store the filtering conditions. They can be directly obtained from the page, reducing the consumption of memory resources.
[0102] In this optional embodiment, the list data of various filtering conditions can be obtained from the background server, and the condition lists are rendered according to the obtained data, and the identifier of each filtering condition (recorded as code, i.e. the above-mentioned code value) is written into the attributes of the condition node of the page to obtain the condition display area of the page. For example: Figure 3 is a schematic diagram of an optional search page according to an optional embodiment of the present application, such as Figure 3 As shown, for the cloud service product search page, various filtering conditions are displayed by category in the condition display area, including: product classification (all, service market, website promotion, enterprise application, SaaS market, API service, website construction and solution), delivery type (all, image, API, SaaS, manual service and License), price (all, free / trial, 1-98, 99-198, 199-1998, 1998-2998 and above 2998).
[0103] The field names corresponding to the various filtering conditions may be: the field names corresponding to the filtering conditions in product classification are all ProductCategory, the field names corresponding to the filtering conditions in delivery type are all deliverType, and the field names corresponding to the filtering conditions in price are all PriceFrom&PriceTo. In product classification, the corresponding coding value of all is 0, the corresponding coding value of service market is 1, the corresponding coding value of website promotion is 2, the corresponding coding value of enterprise application is 3, the corresponding coding value of SaaS market is 4, the corresponding coding value of API service is 5, the corresponding coding value of website construction is 6 and the corresponding coding value of solution is 7. In delivery type, the corresponding coding value of all is 0, the corresponding coding value of image is 1, the corresponding coding value of API is 2, the corresponding coding value of SaaS is 3, the corresponding coding value of manual service is 4 and the corresponding coding value of License is 5. In price, the corresponding coding value of all is all&all, the corresponding coding value of free / trial is 0&0, the corresponding coding value of 1-98 is 1&98, the corresponding coding value of 99-198 is 99&198, the corresponding coding value of 199-1998 is 199&1998, the corresponding coding value of 1998-2998 is 1998&2998 and the corresponding coding value of 2998 and above is 2998&all.
[0104] When a condition is clicked, a CSS class (which can be recorded as .active) is added to the condition node corresponding to the currently clicked filter condition. This style class will highlight the condition node and clear the active class of its sibling nodes to ensure that only the currently selected condition is highlighted. For example, if All in the product category is clicked, Mirror in the delivery type is clicked, and 1-98 in the price is clicked on the cloud service product search page, All in the product category, Mirror in the delivery type, and 1-98 in the price will be highlighted, and all other filter conditions will not be highlighted.
[0105] The function of obtaining the highlighted conditional node of the page can be used to obtain the conditional node that has been highlighted on the page and obtain the code value of the conditional node. Write the code value of each highlighted conditional node obtained into the initial request parameter object of the page query interface to obtain the target request parameter object. For example: on the cloud service product search page, the conditional nodes that have been highlighted on the page are all in the product category, the mirror in the delivery type, and 1-98 in the price. Then add the code value to the initial request parameter object. The target request parameter object corresponding to all in the product category is ProductCategory=0, the target request parameter object corresponding to the mirror in the delivery type is deliverType=1, and the target request parameter object corresponding to 1-98 in the price is PriceFrom=1&PriceTo=98. Traverse each target request parameter object and splice each parameter and write it to the URL of the page to obtain the second page address: http: / / abc.com / page? PriceFrom=1&PriceTo=98&deliverType=1&Pro ductCategory=0. The second page address is written into the address bar through the history.pushState function, thereby achieving the effect of changing the page address without refreshing.
[0106] Then the data request function is triggered to request the resource corresponding to PriceFrom=1&PriceTo=98&deliverType=1&ProductCategory=0. The search page view of the conditional filtering is associated with the parameters in the URL, that is, when the view changes, the filtering condition parameters will also change, and vice versa.
[0107] If the current page is refreshed, the target filtering conditions are obtained directly from the current URL, the obtained parameters are written into the AJAX request parameters, and the view is synchronized with the selected parameters. Then, the page request is initiated to request the search resources, the final search results are obtained, and the search results display area of the search page is partially updated.
[0108] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0109] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for an electronic device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0110] According to another aspect of an embodiment of the present application, a search page display device for implementing the above-mentioned search page display method is also provided. Figure 4 is a schematic diagram of an optional display device for a search page according to an embodiment of the present application, such as Figure 4 As shown, the device may include:
[0111] A first display module 42, used to display a first search page, wherein the first search page is used to search for resources, and the first search page displays multiple screening conditions for screening resources;
[0112] The storage module 44 is used for storing the target condition identifier of the target filtering condition in the first page address of the first search page to obtain a second page address when it is detected that the target filtering condition among the multiple filtering conditions has been selected;
[0113] The second display module 46 is used to display a second search page corresponding to the second page address, wherein the second search page displays target prompt information and search results of the target filtering conditions, and the target prompt information is used to prompt that the target filtering conditions have been selected.
[0114] It should be noted that the first display module 42 in this embodiment can be used to execute step S202 in the embodiment of the present application, the storage module 44 in this embodiment can be used to execute step S204 in the embodiment of the present application, and the second display module 46 in this embodiment can be used to execute step S206 in the embodiment of the present application.
[0115] It should be noted that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the contents disclosed in the above embodiments. It should be noted that the above modules as part of the device can be run in Figure 1 In the hardware environment shown, it can be implemented by software or by hardware.
[0116] Through the above-mentioned module, multiple filtering conditions for filtering resources are displayed on the first search page for searching resources. If it is detected that a target filtering condition among the multiple filtering conditions has been selected, the target condition identifier of the target filtering condition is stored in the first page address of the first search page to obtain a second page address, and the second search page corresponding to the second page address is displayed. On the second search page, target prompt information for prompting that the target filtering condition has been selected and the search results of the target filtering condition are displayed, so that the storage of the selected target filtering condition can be realized without occupying additional memory, and the selected target filtering condition can be associated with the corresponding second search page, thereby achieving the purpose of saving storage space, thereby achieving the technical effect of reducing the waste of storage resources when storing the filtering conditions, and further solving the technical problem of wasting storage resources when storing the filtering conditions.
[0117] As an optional embodiment, the storage module includes:
[0118] A first acquiring unit, configured to acquire, from the plurality of filtering conditions, a filtering condition on which the selection operation is performed as the target filtering condition;
[0119] A second acquisition unit, used to acquire a target condition identifier of the target screening condition and a first page address of the first search page;
[0120] An adding unit is used to add the target condition identifier to the first page address to obtain the second page address.
[0121] As an optional embodiment, the first acquiring unit is used to:
[0122] When it is detected that a selection operation has been performed on a filter condition among the plurality of filter conditions, switching a display style of the filter condition on which the selection operation has been performed and displayed on the first search page from a first style to a second style;
[0123] Search the first search page for a filtering condition whose display style is the second style as the target filtering condition.
[0124] As an optional embodiment, the second acquiring unit is used to:
[0125] Reading a code value corresponding to the target screening condition from an attribute tag of a target condition node corresponding to the target screening condition;
[0126] Writing the coded value corresponding to the target screening condition into the initial request parameter object corresponding to the target screening condition to obtain a target request parameter object, wherein the initial request parameter object records the field value corresponding to the target screening condition, and the target request parameter object records the field value and the coded value having a corresponding relationship;
[0127] The field value and the code value having a corresponding relationship are obtained from the target request parameter object as the target condition identifier.
[0128] As an optional embodiment, the adding unit is used for:
[0129] In the case where the target condition identifier is one condition identifier, connecting the one condition identifier to the end of the first page address to obtain the second page address;
[0130] In the case that the target condition identifier is a plurality of condition identifiers, the plurality of condition identifiers are concatenated into a target string; the target string is connected to the end of the first page address to obtain the second page address.
[0131] As an optional embodiment, the second display module includes:
[0132] A search unit, configured to search for resources using a search request carrying the target screening condition to obtain a first search result;
[0133] A refresh unit is used to refresh the content displayed in the search result display area on the page to the first search result, and obtain the second search page, wherein the second page address is displayed in the address bar on the page, and the condition display area on the page displays the target filtering condition carrying the target prompt information, and the condition display area is used to display the multiple filtering conditions.
[0134] As an optional embodiment, the device further includes:
[0135] an acquisition module, configured to acquire the target condition identifier from the second page address after displaying the second search page corresponding to the second page address and in the case where it is detected that a refresh operation is performed on the second search page;
[0136] A refresh module, used for refreshing the second search page to obtain a third search page;
[0137] A third display module, configured to display the plurality of filtering conditions on the third search page, and to display the target prompt information on the target filtering condition corresponding to the target condition identifier in the plurality of filtering conditions;
[0138] A search module, configured to search for resources using a search request carrying the target condition identifier to obtain a second search result;
[0139] The fourth display module is used to display the second search result on the third search page.
[0140] It should be noted that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the contents disclosed in the above embodiments. It should be noted that the above modules as part of the device can be run in Figure 1 In the hardware environment shown, it can be implemented by software or by hardware, wherein the hardware environment includes a network environment.
[0141] According to another aspect of an embodiment of the present application, an electronic device for implementing the above-mentioned search page display method is also provided.
[0142] Figure 5 is a structural block diagram of an electronic device according to an embodiment of the present application, such as Figure 5 As shown, the electronic device may include: one or more (only one is shown in the figure) processors 501, a memory 503, and a transmission device 505, such as Figure 5 As shown, the electronic device may further include an input / output device 507 .
[0143] Among them, the memory 503 can be used to store software programs and modules, such as the program instructions / modules corresponding to the display method and device of the search page in the embodiment of the present application. The processor 501 executes various functional applications and data processing by running the software programs and modules stored in the memory 503, that is, realizing the display method of the search page mentioned above. The memory 503 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 503 may further include a memory remotely arranged relative to the processor 501, and these remote memories can be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0144] The above-mentioned transmission device 505 is used to receive or send data via a network, and can also be used for data transmission between a processor and a memory. The above-mentioned network specific examples may include wired networks and wireless networks. In one example, the transmission device 505 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers via a network cable so as to communicate with the Internet or a local area network. In one example, the transmission device 505 is a radio frequency (Radio Frequency, RF) module, which is used to communicate with the Internet wirelessly.
[0145] Specifically, the memory 503 is used to store application programs.
[0146] The processor 501 may call the application stored in the memory 503 through the transmission device 505 to perform the following steps:
[0147] Displaying a first search page, wherein the first search page is used to search for resources, and the first search page displays multiple screening conditions for screening resources;
[0148] When it is detected that a selection operation is performed on a target filtering condition among the multiple filtering conditions, storing a target condition identifier of the target filtering condition in a first page address of the first search page to obtain a second page address;
[0149] A second search page corresponding to the second page address is displayed, wherein the second search page displays target prompt information and search results of the target filtering condition, and the target prompt information is used to prompt that the target filtering condition has been selected.
[0150] By adopting the embodiment of the present application, a scheme for displaying a search page is provided. A plurality of filtering conditions for filtering resources are displayed on a first search page for searching resources. If it is detected that a target filtering condition among the plurality of filtering conditions has been selected, a target condition identifier of the target filtering condition is stored in the first page address of the first search page to obtain a second page address, and a second search page corresponding to the second page address is displayed. On the second search page, target prompt information for prompting that a selection operation has been performed on the target filtering condition and search results of the target filtering condition are displayed, so that the selected target filtering condition can be stored without occupying additional memory, and the selected target filtering condition can be associated with the corresponding second search page, so as to achieve the purpose of saving storage space, thereby achieving the technical effect of reducing the waste of storage resources when storing the filtering conditions, and further solving the technical problem of wasting storage resources when storing the filtering conditions.
[0151] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment will not be described in detail here.
[0152] It can be understood by those skilled in the art that Figure 5 The structure shown is for illustration only, and the electronic device may be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (MID), a PAD, or other electronic devices. Figure 5 The structure of the electronic device is not limited. Figure 5 More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Figure 5 Different configurations are shown.
[0153] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the electronic device through a program, and the program can be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0154] The embodiment of the present application further provides a storage medium. Optionally, in this embodiment, the storage medium can be used to execute the program code of the method for displaying the search page.
[0155] Optionally, in this embodiment, the storage medium may be located on at least one network device among a plurality of network devices in the network shown in the above embodiment.
[0156] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps:
[0157] Displaying a first search page, wherein the first search page is used to search for resources, and the first search page displays multiple screening conditions for screening resources;
[0158] When it is detected that a selection operation is performed on a target filtering condition among the multiple filtering conditions, storing a target condition identifier of the target filtering condition in a first page address of the first search page to obtain a second page address;
[0159] A second search page corresponding to the second page address is displayed, wherein the second search page displays target prompt information and search results of the target filtering condition, and the target prompt information is used to prompt that the target filtering condition has been selected.
[0160] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment will not be described in detail here.
[0161] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store program codes.
[0162] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0163] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
[0164] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0165] In the several embodiments provided in the present application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0166] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0167] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0168] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for displaying a search page, characterized in that: include: Displaying a first search page, wherein the first search page is used to search for resources, and the first search page displays multiple screening conditions for screening resources; When it is detected that a selection operation is performed on a target filtering condition among the multiple filtering conditions, storing a target condition identifier of the target filtering condition in a first page address of the first search page to obtain a second page address; Displaying a second search page corresponding to the second page address, wherein the second search page displays target prompt information and search results of the target screening condition, and the target prompt information is used to prompt that the target screening condition has been selected; In the case where it is detected that a selection operation is performed on a target filtering condition among the multiple filtering conditions, storing a target condition identifier of the target filtering condition in a first page address of the first search page, and obtaining a second page address includes: acquiring the filtering condition on which the selection operation is performed from the plurality of filtering conditions as the target filtering condition; Acquire a target condition identifier of the target screening condition and a first page address of the first search page; Adding the target condition identifier to the first page address to obtain the second page address; Obtaining the target condition identifier of the target screening condition includes: Reading a code value corresponding to the target screening condition from an attribute tag of a target condition node corresponding to the target screening condition; Writing the coded value corresponding to the target screening condition into the initial request parameter object corresponding to the target screening condition to obtain a target request parameter object, wherein the initial request parameter object records the field value corresponding to the target screening condition, and the target request parameter object records the field value and the coded value having a corresponding relationship; The field value and the code value having a corresponding relationship are obtained from the target request parameter object as the target condition identifier.
2. The method according to claim 1, characterized in that Acquiring the filtering condition on which the selection operation is performed from the plurality of filtering conditions as the target filtering condition includes: When it is detected that a selection operation has been performed on a filter condition among the plurality of filter conditions, switching a display style of the filter condition on which the selection operation has been performed and displayed on the first search page from a first style to a second style; Search the first search page for a filtering condition whose display style is the second style as the target filtering condition.
3. The method according to claim 1, characterized in that Adding the target condition identifier to the first page address to obtain the second page address includes: In the case where the target condition identifier is one condition identifier, connecting the one condition identifier to the end of the first page address to obtain the second page address; In the case that the target condition identifier is a plurality of condition identifiers, the plurality of condition identifiers are concatenated into a target character string; the target character string is connected to the end of the first page address to obtain the second page address.
4. The method according to claim 1, characterized in that Displaying the second search page corresponding to the second page address includes: Searching for resources using a search request carrying the target screening condition to obtain a first search result; Refresh the content displayed in the search result display area on the page to the first search result, and obtain the second search page, wherein the second page address is displayed in the address bar on the page, and the condition display area on the page displays the target filtering condition carrying the target prompt information, and the condition display area is used to display the multiple filtering conditions.
5. The method according to claim 1, characterized in that After displaying the second search page corresponding to the second page address, the method further includes: When it is detected that a refresh operation is performed on the second search page, acquiring the target condition identifier from the second page address; Refresh the second search page to obtain a third search page; Displaying the plurality of filtering conditions on the third search page, and displaying the target prompt information on the target filtering condition corresponding to the target condition identifier in the plurality of filtering conditions; Searching for resources using a search request carrying the target condition identifier to obtain a second search result; The second search result is displayed on the third search page.
6. A display device for a search page, characterized in that: include: A first display module, used to display a first search page, wherein the first search page is used to search for resources, and the first search page displays multiple screening conditions for screening resources; a storage module, configured to, when detecting that a target filtering condition among the plurality of filtering conditions has been selected, store a target condition identifier of the target filtering condition in the first page address of the first search page to obtain a second page address; A second display module is used to display a second search page corresponding to the second page address, wherein the second search page displays target prompt information and search results of the target screening condition, and the target prompt information is used to prompt that the target screening condition has been selected; The storage module comprises: A first acquiring unit, configured to acquire, from the plurality of filtering conditions, a filtering condition on which the selection operation is performed as the target filtering condition; A second acquisition unit, used to acquire a target condition identifier of the target screening condition and a first page address of the first search page; an adding unit, configured to add the target condition identifier to the first page address to obtain the second page address; The second acquisition unit is further used for: Reading a code value corresponding to the target screening condition from an attribute tag of a target condition node corresponding to the target screening condition; Writing the coded value corresponding to the target screening condition into the initial request parameter object corresponding to the target screening condition to obtain a target request parameter object, wherein the initial request parameter object records the field value corresponding to the target screening condition, and the target request parameter object records the field value and the coded value having a corresponding relationship; The field value and the code value having a corresponding relationship are obtained from the target request parameter object as the target condition identifier.
7. A storage medium, characterized in that: The storage medium includes a stored program, wherein the program executes the method described in any one of claims 1 to 5 when executed.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: The processor executes the method described in any one of claims 1 to 5 through the computer program.
Citation Information
Patent Citations
Page loading method and apparatus
CN106598964A
Service interface display method and device
CN110941783A