Material searching method and device, medium and electronic equipment
By obtaining the first search parameters entered by the user and the second search parameters pre-configured, target search parameters are generated, and material search is used to search by searching the search engine, the problem of material search in the prior art requires the development of different search codes according to different scenarios, and the effect of simplifying the search process and reducing development costs is achieved.
Patent Information
- Application Number
- CN202311578868.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-23
- Publication Date
- 2025-05-23
AI Technical Summary
In systems such as building information models, material search requires the development of different search codes according to different scenarios, resulting in high development and maintenance costs.
By obtaining the first search parameters entered by the user in the target material search mode, and generating the target search parameters based on the parameters and the pre-configured second search parameters, using the search engine to search for materials, and finally display the search results.
This method simplifies the material search process through pre-configured second search parameters, reduces development costs, and realizes code reuse of different material search modes.
Smart Images

Figure CN120030061A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular, to a material search method, device, medium and electronic device. Background Art
[0002] In systems like building information models, materials are an important and extensive type of data. In many scenarios, materials need to be queried and retrieved, and the retrieval conditions used in different scenarios are different. This requires developers to develop different retrieval codes according to different scenarios, resulting in high development and maintenance costs. Summary of the invention
[0003] This summary is provided to introduce concepts in a brief form that will be described in detail in the detailed description below. This summary is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.
[0004] In a first aspect, the present disclosure provides a material search method, comprising:
[0005] Obtaining a first search parameter input by a user in a target material search mode;
[0006] Obtaining a target search parameter according to the first search parameter and a second search parameter preconfigured in the target material search mode;
[0007] Obtaining, through a search engine, material search results corresponding to the target search parameters according to the target search parameters;
[0008] Display the material search results.
[0009] In a second aspect, the present disclosure provides a material search device, comprising:
[0010] An acquisition module is configured to acquire a first search parameter input by a user in a target material search mode;
[0011] A first obtaining module is configured to obtain a target search parameter according to the first search parameter and a second search parameter pre-configured in the target material search mode;
[0012] A second obtaining module is configured to obtain, through a search engine and according to the target search parameter, a material search result corresponding to the target search parameter;
[0013] The display module is configured to display the material search results.
[0014] In a third aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the method described in the first aspect.
[0015] In a fourth aspect, the present disclosure provides an electronic device, including:
[0016] a storage device having a computer program stored thereon;
[0017] A processing device is used to execute the computer program in the storage device to implement the steps of the method described in the first aspect.
[0018] Based on the above technical solution, by obtaining the first search parameter input by the user in the target material search mode, the target search parameter is obtained according to the first search parameter and the second search parameter pre-configured for the target material search mode, and the material search results corresponding to the target search parameter are obtained through the search engine according to the target search parameter, and then the material search results are displayed. By pre-configuring the corresponding second search parameters for different material search modes, the material search requirements of the material search mode can be met, and the process of material search by the user can be simplified. Moreover, for similar material search modes, code reuse can be achieved by configuring different second search parameters, and developers no longer need to develop corresponding retrieval codes according to different scenarios, which greatly reduces development costs.
[0019] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale. In the drawings:
[0021] Figure 1 The present invention is a flowchart of a material search method according to some embodiments.
[0022] Figure 2 yes Figure 1 A detailed flow chart of step 130 is shown.
[0023] Figure 3 It is a schematic diagram of a material display page according to an exemplary embodiment.
[0024] Figure 4 is an architectural diagram of a material search method according to an exemplary embodiment.
[0025] Figure 5It is a schematic structural diagram of a material search device shown according to some embodiments.
[0026] Figure 6 It is a schematic structural diagram of an electronic device shown according to some embodiments. Detailed implementation manners
[0027] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although some embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. On the contrary, these embodiments are provided to more thoroughly and completely understand the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not used to limit the protection scope of the present disclosure.
[0028] It should be understood that the various steps recorded in the method embodiments of the present disclosure can be executed in different orders and / or executed in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this regard.
[0029] As used herein, the term "including" and its variations are open-ended, that is, "including but not limited to". The term "based on" is "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0030] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or the interdependent relationship therebetween.
[0031] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive. Those skilled in the art should understand that, unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0032] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only for illustrative purposes and are not used to limit the scope of these messages or information.
[0033] It can be understood that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, usage scopes, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to users and the authorization of users should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0034] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.
[0035] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0036] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0037] At the same time, it is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.
[0038] Figure 1 FIG. 1 is a flow chart of a material search method according to some embodiments. Figure 1 As shown, the embodiment of the present disclosure provides a material search method, which can be executed by an electronic device, specifically, by a material search device, which can be implemented by software and / or hardware and configured in the electronic device. Figure 1 As shown, the method may include the following steps.
[0039] In step 110, a first search parameter input by a user in a target material search mode is obtained.
[0040] Here, the target material search mode refers to different material search scenarios. For example, when a user searches for materials in the material management page, it is equivalent to searching for materials in a material search mode. When a user searches in the auxiliary material management page, it is also equivalent to searching for materials in a material search mode. In other words, the first search parameter entered by the user in the target material search mode can be understood as the first search parameter entered by the user on different material query pages, and different material query pages represent different material search scenarios.
[0041] The first search parameter may be a keyword input by a user, etc. For example, if a user needs to search for materials related to a sofa, the keyword may be sofa.
[0042] It should be understood that the materials referred to in the embodiments of the present disclosure may not only be architectural materials, but also picture materials, video materials, audio materials, text materials, etc. In other words, the application scenario of the material search method provided in the embodiments of the present disclosure may not only be an architectural material search scenario, but also other picture, video, audio, and text search scenarios.
[0043] In step 120, a target search parameter is obtained according to the first search parameter and a second search parameter preconfigured in the target material search mode.
[0044] Here, the second search parameter is a search parameter pre-configured in the target material search mode. For different material search modes, the corresponding second search parameter can be pre-configured by the developer. When the user searches for materials in any material search mode, the final target search parameter is determined based on the first search parameter input by the user in the material search mode and the second search parameter pre-configured in the material search mode.
[0045] In some embodiments, a mapping relationship between a material search mode and a search parameter may be pre-established. The mapping relationship is obtained by pre-configuring corresponding search parameters for different material search modes.
[0046] For example, corresponding search parameters may be set for the auxiliary material management page, and corresponding search parameters may be set for the source material management page.
[0047] The pre-configured search parameters may include, but are not limited to, data type of the material, data status of the material, query conditions of the material, tags, sorting methods, aggregate fields, refresh parameters, image sizes, simplification parameters, version numbers of the material, and paging parameters.
[0048] The data type of the material refers to different types of materials, for example, the data type of the material may include independent materials, plane layout objects, material combination objects, etc. By indicating the data type, different types of material data may be queried.
[0049] The data status of a material refers to the status of the material in the system, such as the data status may include the on-shelf status, off-shelf status, and deleted status. By indicating the data status, you can search for the required material among materials in different data statuses.
[0050] The query conditions of the material may include keyword matching strategies, filtering conditions, etc. The keyword matching strategy refers to the matching strategy of the keyword, such as fuzzy matching, intelligent matching by Chinese assignment, etc. The filtering condition indicates the type of the queried material. For example, if the model type is indicated, the queried material must be of the model type. By indicating the query conditions, different materials can be searched.
[0051] The sorting method refers to the method of the final material search results, including descending order, ascending order, etc. By indicating the sorting method, the material search results displayed at the end can be displayed in different sorting methods.
[0052] The aggregation field is used to instruct the search engine to count the material types corresponding to the material attributes of the material data included in the material search results according to the material attributes indicated by the aggregation field. For example, if the material attribute indicated by the aggregation field is shape, the shapes of the searched material data are counted in the shape dimension, such as the searched materials are square, circular, triangle, etc.
[0053] The refresh parameter is used to instruct the search engine to refresh the target material data in the database to the search engine before executing the search request. For example, the refresh parameter can indicate the unique code of the material data to be refreshed, the type of the material data to be refreshed, and the time interval between refreshing the material data and searching the material data by the search engine.
[0054] Image size refers to dynamically scaling the image size according to the parameter value specified by the image size. By specifying the image size, you can dynamically scale the searched images to adapt to different display scenarios.
[0055] The simplified parameter means that the material search results need to be simplified. For example, by indicating different fields, specific material data can be returned or not returned.
[0056] The version number of a material refers to the version of the material data. By specifying the version number, you can search for a specific version of the material.
[0057] Paging parameters refer to the page number, page size, etc. for displaying material search results. By indicating the paging parameters, the material search results can be displayed according to the page number, page size, etc. indicated by the paging parameters.
[0058] For different material search modes, one or more of the material data type, material data status, material query conditions, tags, sorting methods, aggregation fields, refresh parameters, image size, simplification parameters, material version number and paging parameters can be used as pre-configured search parameters for the material search mode according to the requirements of the material search mode to obtain the above-mentioned mapping relationship.
[0059] Accordingly, when the user is searching in the target material search mode, the second search parameter can be obtained according to the target material search mode and the mapping relationship between the material search mode and the search parameter. In other words, the corresponding second search parameter can be found in the mapping relationship according to the target material search mode.
[0060] Exemplarily, the first search parameter and the second search parameter may be combined to obtain a target search parameter. For example, assuming that the first search parameter is a keyword, and the second search parameter is the image size of the material, the data type of the material, and the data status of the material, the target search parameter is keyword+image size of the material+data type of the material+data status of the material.
[0061] In step 130, a search engine is used to obtain material search results corresponding to the target search parameters according to the target search parameters.
[0062] Here, the search engine may be Elasticsearch (ES), which is a distributed, highly scalable, and highly real-time search and data analysis engine.
[0063] After obtaining the target search parameter, the query interface of the search engine can be called through the target search parameter to transmit the target search parameter to the search engine. The search engine receives the target search parameter, searches the material data in the database according to the target search parameter, and obtains the corresponding material search result.
[0064] It is worth noting that the search engine of the embodiment of the present disclosure can be deployed locally or in the cloud.
[0065] In step 140 , the material search results are displayed.
[0066] Here, after obtaining the material search results, the electronic device may display the material search results in a search page corresponding to the target material search mode.
[0067] Thus, by obtaining the first search parameter input by the user in the target material search mode, obtaining the target search parameter according to the first search parameter and the second search parameter pre-configured for the target material search mode, and obtaining the material search results corresponding to the target search parameter according to the target search parameter through the search engine, and then displaying the material search results, by pre-configuring the corresponding second search parameter for different material search modes, it is possible to meet the material search requirements of the material search mode and simplify the process of material search for users. Moreover, for similar material search modes, code reuse can be achieved by configuring different second search parameters, and developers are no longer required to develop corresponding retrieval codes according to different scenarios, which greatly reduces development costs.
[0068] Figure 2 yes Figure 1 Detailed flow chart of step 130 is shown. Figure 2 As shown, in some possible implementations, step 130 may include the following steps:
[0069] In step 131, write the target search parameters into a pre-configured initial configuration file to obtain a target configuration file.
[0070] Here, the initial configuration file can be a configuration file in JSON (JavaScript Object Notation, a lightweight data interchange format) structure.
[0071] That is to say, the specified first search parameter and second search parameter are written into the initial configuration file in JSON structure to obtain a target configuration file in JSON structure containing the first search parameter and the second search parameter.
[0072] The data type of the material can be represented by the "type" parameter. In the "type" parameter, the "material" field representing the material, the "flatLayoutObject" field representing the flat layout object, and the "materialCombination" field representing the material combination object can be specified.
[0073] The data status of the material can be represented by the "availableStatus" parameter. When the value of the "availableStatus" parameter is 1, it means to query the material data in the on-shelf status; when the value of the "availableStatus" parameter is 0, it means to query the material data in the off-shelf status; when the value of the "availableStatus" parameter is -1, it means to query the material data in the on-shelf status and off-shelf status; when the value of the "availableStatus" parameter is -2, it means to query the material data in the on-shelf status, off-shelf status and deleted status.
[0074] The filtering condition can be represented by the "filter" parameter. Different values can be specified in the "filter" parameter to specify the specific material data to be queried. For example, in the "filter" parameter, the field "modelTypeld:1&&bizLine:0" can be specified, indicating that the searched material data is the material data with the model type (modelTypeld) of 1 and the business line (bizLine) of 0. In the "filter" parameter, the field "(modelTypeld:1||hasPatternFolder:1)&&bizLine:0" can be specified, indicating that the searched material data is the material data with the model type (modelTypeld) of 1 or in the pattern menu (hasPatternFolder:1), and the business line is 0.
[0075] The sorting method can be indicated by the "sort" parameter, in which the "desc" field for descending order and the "asc" field for ascending order can be specified. For example, "id:desc" means that the material search results are sorted in descending order according to the ID (unique code).
[0076] Keywords can be expressed by the "query" parameter. For example, specifying "sofa" in the "query" parameter means searching for material data corresponding to "sofa".
[0077] The keyword matching strategy can be expressed by the "queryType" parameter. For example, a value of 0 for the "queryType" parameter indicates fuzzy matching by text, and a value of 1 for the "queryType" parameter indicates intelligent matching by Chinese.
[0078] Aggregation fields can be represented by the "aggregation" parameter. For example, the value of the "aggregation" parameter is "aggregation: "brand"", which means all values of the brand field (brand) included in the material search results.
[0079] The refresh parameters can be represented by the "refreshIds" parameter, the "refreshType" parameter, and the "refreshInterval" parameter. The "refreshIds" parameter represents the ID of the material data to be refreshed. The "refreshType" parameter represents the type of the material data to be refreshed, and the "refreshInterval" parameter represents the time interval between refreshing the material data and searching for the material data. The value of the "refreshInterval" parameter is "-1" to indicate no time interval.
[0080] The image size can be expressed by the "imageSize" parameter. In the "imageSize" parameter, you can specify the corresponding image size value, and the search engine will scale the image according to the image size value in the material search results returned by the search engine.
[0081] The simplified parameters can be represented by the "simplified" parameter. The value of the "simplified" parameter is true, which means that the material search results are simplified. If the value of the "simplified" parameter is not true, it means that the material search results are not simplified. Of course, the simplified parameters can also further include the "includeFields" parameter, which indicates which specified fields' material data need to be returned (the material data corresponding to unspecified resources is not returned by default), the "excludeFields" parameter, which indicates which specified fields' material data do not need to be returned (the material data corresponding to unspecified resources is returned by default), and the "extractSubset" parameter, which indicates extracting the material data of a specific field as the material search result.
[0082] The paging parameter can be represented by the page number through the "pagelndex" parameter. The value of the "pagelndex" parameter is 1, which means to obtain the material data of the first page in the material search results. The paging parameter can be represented by the "pageside" parameter to indicate the page size. For example, the value of the "pageside" parameter is 20, which means that 20 material data are displayed on one page.
[0083] It should be understood that the target search parameters can be written into the initial configuration file of the JSON structure through the parameters provided in the above example to obtain the target configuration file.
[0084] For example, the target configuration file may look like this:
[0085] {
[0086] "type": "material",
[0087] "sort": "id:desc",
[0088] "filter":"modelTypeID:1&&bizLine:0)",
[0089] "availableStatus":1,
[0090] "simplified": true,
[0091] "excludeFields":"dataMap.material.attrs,dataMap.material.category,record,erro",
[0092] "extractSubset":"baseInfo"}
[0093] It should be understood that the above target configuration file is only used as an example, and the parameters in the target configuration file may be different in different material search modes or when different first search parameters are input by the user.
[0094] Of course, in some embodiments, the second search parameter itself may be written in the initial configuration file. In this case, the first search parameter may be directly written into the initial configuration file to obtain the target configuration file.
[0095] It is worth noting that by writing the target search parameters into the pre-configured JSON structured initial configuration file, the search engine can be called through the target configuration file for different material search modes, thereby realizing the material search function for the material search mode.
[0096] In step 132, the target configuration file is transmitted to the search engine.
[0097] Here, after the target configuration file is obtained, a query interface in the target material search mode may be generated based on the target configuration file, and the target configuration file may be transmitted to the search engine based on the query interface.
[0098] In step 133, the target configuration file is converted into a corresponding search request through a search engine.
[0099] Here, after receiving the target configuration file, the search engine converts the target search parameters carried in the target configuration file into a search request for the search engine. For example, if the search engine is an ES engine, the target search parameters carried in the target configuration file are converted into an ES request. It should be understood that the search engine converts the target search parameters into an ES request according to a pre-configured data format.
[0100] It is worth noting that in the disclosed embodiment, the search engine directly receives the target configuration file instead of directly receiving the search request initiated by the front-end page. Based on the target configuration file with JSON structure, the material search in different material search modes can be realized by configuring the search parameters according to the requirements in the target configuration file with JSON structure.
[0101] In step 134, the search request is executed through the search engine, and the material search results are obtained by searching the material data.
[0102] Here, after the search engine converts the target configuration file into a search request, the search engine executes the search request and searches the material data to obtain material search results.
[0103] Taking the ES engine as an example, the ES request (search request) can be used to call the ES engine's API (Application Programming Interface) to execute the ES request. The material data returned by the ES engine is in the hits list, which is then parsed to obtain material search results for display.
[0104] It should be understood that the material search results refer to the search engine searching for material data that matches the target search parameters specified in the search request in the pre-configured material data. For example, assuming that the target search parameters carry the keyword "sofa", the material data included in the material search results are material data that matches the keyword "sofa".
[0105] Thus, through the above steps 131 to 134, by writing the target search parameters into the pre-configured initial configuration file of the JSON structure, the search engine can be called through the target configuration file for different material search modes, thereby realizing the material search function for the material search mode. In other words, the search parameters can be configured according to the requirements in the target configuration file of the JSON structure, so that the material search under different material search modes can be realized, thereby reducing the development cost.
[0106] In some feasible implementations, in step 134, the material data in the database may be first synchronized to the search engine, and then the search engine may be used to execute a search request to obtain material search results by searching the material data synchronized to the search engine.
[0107] Here, under different material search modes, the source of material data may be different. For example, the addition, deletion, modification and query of material data are generally implemented through a relational database. Therefore, before executing a search request, the search engine can synchronize the material data in the database corresponding to the target material search mode to the search engine to ensure that correct and comprehensive material data can be found.
[0108] For example, in the scenario of adding, deleting, modifying and searching material data, the material data in the relational database can be synchronized to the search engine, and then the search request is executed through the search engine to obtain material search results in the material data synchronized to the search engine.
[0109] Therefore, by synchronizing the material data in the database corresponding to the target material search mode to the search engine, it can be ensured that correct and comprehensive material data in the target material search mode can be found.
[0110] In some feasible implementations, the target search parameters may include a refresh parameter, and the refresh parameter is used to instruct the search engine to refresh the target material data in the database to the search engine before executing the search request.
[0111] It should be understood that since there is a delay in synchronizing the material data in the database to the search engine, when a new material data is created in the database, if the search engine searches immediately, the newly created material data cannot be searched due to the delay. At this time, a refresh parameter can be specified in the target search parameter.
[0112] After the search engine synchronizes the material data in the database corresponding to the target material search mode to the search engine, the target material data indicated by the refresh parameter can be refreshed to the search engine through the search engine in response to the refresh parameter.
[0113] The target material data may be specified by the "refreshIds" parameter or the "refreshType" parameter in the refresh parameter. Refreshing the target material data indicated by the refresh parameter to the search engine means synchronizing the target material data in the database to the search engine to ensure that the specified target material data can be synchronized to the search engine after executing the search request.
[0114] It is worth noting that the search engine will refresh the target material data indicated by the refresh parameter into the search engine only when the target search parameter carries a refresh parameter. If the target search parameter does not carry a refresh parameter, the search engine will not refresh the target material data indicated by the refresh parameter into the search engine.
[0115] It should be noted that the refresh parameter can be specified by the first search parameter or the second search parameter. That is, the refresh parameter can be a search parameter pre-configured in the target material search mode, and the target material data can be the material data corresponding to the target material search mode. Of course, the refresh parameter can also be the first search parameter input by the user in the target material search mode, that is, the user can specify to refresh the corresponding target material data.
[0116] Therefore, by responding to the refresh parameter and refreshing the target material data indicated by the refresh parameter to the search engine through the search engine, the problem of newly created material not being searchable due to delay can be avoided, so as to ensure comprehensive search of material data.
[0117] In some practicable implementations, the target search parameter may include an aggregation field, which is used to indicate to the search engine the material type included in the material data of the statistical material search results under the material attribute according to the material attribute indicated by the aggregation field.
[0118] Accordingly, after step 130, in response to the aggregation field, the search engine can determine the material type included in the material data of the material search results under the material attribute according to the material attribute indicated by the aggregation field, and display the material attribute and the material type included under the material attribute.
[0119] Here, the aggregation field can be represented by the "aggregation" parameter, and different values can be assigned to the "aggregation" parameter to indicate the corresponding material attributes.
[0120] Among them, the material attribute may refer to the shape, material, brand, texture, style, etc. of the material. The material type included in the material data under the material attribute may refer to the material type contained in the material data included in the material search results under the specified material attribute. For example, assuming that the material attribute is shape, then the various shapes contained in the material data included in the material search results are counted. If the material data included in the material search results contain circle, square, and triangle, the corresponding material types are circle, square, and triangle. For another example, assuming that the material attribute is style, then the various styles contained in the material data included in the material search results are counted. If the material data included in the material search results contain modern style, Chinese style, and European style, then the corresponding material types are modern style, Chinese style, and European style.
[0121] It is worth noting that the search engine will only perform the operation indicated by the aggregate field when the target search parameter carries an aggregate field. If the target search parameter does not carry an aggregate field, the search engine will not perform the operation indicated by the aggregate field.
[0122] It should be noted that the aggregation field can be specified by the first search parameter or the second search parameter. That is, the aggregation field can be a search parameter pre-configured in the target material search mode. Of course, the aggregation field can also be the first search parameter entered by the user in the target material search mode, that is, the user can specify the corresponding aggregation field according to the needs.
[0123] When the target search parameter carries an aggregation field, after obtaining the corresponding material search results, the search engine can respond to the aggregation field and, according to the material attribute indicated by the aggregation field, count the names and quantities of material types included in the material data included in the material search results under the material attribute. Furthermore, the material attribute and the material types included under the material attribute can be displayed on the material display page.
[0124] It should be understood that the material display page may be a page corresponding to the target material search mode. That is, when the material search results are displayed in the material display page, the material attributes and the material types included under the material attributes may be displayed simultaneously.
[0125] In some embodiments, the material properties can be displayed through a target control, where the target control is used to display the material type under the material property in response to a user's selection operation, and the target control is used to display the corresponding material data under the target material type in response to a selection operation for the target material type.
[0126] Figure 3 FIG. 1 is a schematic diagram of a material display page according to an exemplary embodiment. Figure 3 As shown, the material search results can be displayed in area 301 of the material display page. In the material display page, the material properties (caliber, number of circuits, number of controls, number of socket holes) are displayed through the target control 302. The user can trigger the selection operation for the target control by clicking the drop-down button in the target control 302, and display the material type under the material property. For example, when the user clicks the drop-down button of "caliber" of the target control 302, the different material types included in the material property of "caliber" are displayed. Of course, in the case of displaying the material types included in the material property, if a selection operation for the target material type is detected, the corresponding material data under the target material type is displayed in the material display page.
[0127] For example, when the user clicks "2" in "Number of loops", Figure 3 The material data in area 301 in is replaced with the material data whose "number of circuits" is "2" in the material search result.
[0128] It should be understood that one or more different material attributes may be specified in the aggregation field. Accordingly, the number of target controls for displaying material attributes may include one or more. That is, each target control is used to display a material type under a material attribute.
[0129] Therefore, by aggregating fields, the search engine can collect statistics on the material attributes of the material search results, thereby making it easier for users to find materials based on the material attributes.
[0130] In some practicable implementations, the target search parameter may include a simplification parameter for indicating that the material search results are simplified. Accordingly, after step 130, the material search results may be filtered in response to the simplification parameter and according to the field value specified by the simplification parameter to obtain the filtered material search results, and then the filtered material search results may be displayed.
[0131] Here, the simplified parameter can be represented by the "simplified" parameter. For example, if the value of the "simplified" parameter is true, it means that the material search results are simplified, and if the value of the "simplified" parameter is not true, it means that the material search results are not simplified. Then, the specific simplification process can be specified by the "includeFields" parameter, the "excludeFields" parameter, and the "extractSubset" parameter.
[0132] For example, if the field value specified by the simplification parameter is "includeFields", the material data specified by the value of "includeFields" in the material search results is retained, and the material data other than the material data specified by the value of "includeFields" in the material search results is deleted.
[0133] For another example, if the field value specified by the simplification parameter is "excludeFields", the material data specified by the value of "excludeFields" in the material search results is deleted, and the material data other than the material data specified by the value of "excludeFields" in the material search results is retained.
[0134] For another example, if the field value specified by the simplification parameter is "extractSubset", the material data specified by the value of "extractSubset" is extracted from the material search results as the filtered material search results.
[0135] Therefore, by filtering the material search results, the material search results can be simplified, so that the user can quickly find the required material data according to the filtered material search results.
[0136] Figure 4 FIG. 1 is an architecture diagram of a material search method according to an exemplary embodiment. Figure 4As shown, a target profile including target search parameters can be constructed based on the search parameters, and the target profile is transmitted to the search engine. The search engine performs the processing of "converting the target profile into a search request", "executing the search request", and "obtaining the material search results". If the target profile also carries an aggregation field and / or a simplification parameter, the search engine further performs an aggregation process and / or a simplification process. Then, the search engine returns the material search results.
[0137] The search engine can return the material query results to the front-end page through the following data structure:
[0138] {
[0139] “aggregations”: […],
[0140] "list":[…],
[0141] "pageIndex":1,
[0142] "pageSize":10,
[0143] "pageTotal":1,
[0144] "params":{...},
[0145] "spendTime":558,
[0146] "total":4
[0147] }
[0148] Among them, aggregations indicates the data corresponding to the aggregated fields in the material query results, list indicates the material data of the current page in the material search results, pageIndex indicates the sequence number of the current page, pageSize indicates the size of each page, pageTotal indicates the total number of pages in the material search results, params indicates the target search parameters corresponding to this search, spendTime indicates the time taken for this search, and total indicates the total material data searched.
[0149] Figure 5 FIG. 1 is a schematic diagram of a material search device according to some embodiments. Figure 5 As shown, the embodiment of the present disclosure provides a material search device 500, and the material search device 500 includes:
[0150] The acquisition module 501 is configured to acquire a first search parameter input by a user in a target material search mode;
[0151] A first obtaining module 502 is configured to obtain a target search parameter according to the first search parameter and a second search parameter pre-configured in the target material search mode;
[0152] The second obtaining module 503 is configured to obtain, through a search engine, material search results corresponding to the target search parameters according to the target search parameters;
[0153] The display module 504 is configured to display the material search results.
[0154] Optionally, the second obtaining module 503 is specifically configured to:
[0155] Writing the target search parameters into a pre-configured initial configuration file to obtain a target configuration file;
[0156] transmitting the target configuration file to a search engine;
[0157] converting the target configuration file into a corresponding search request through the search engine;
[0158] The search request is executed through the search engine, and the material search result is obtained by searching in the material data.
[0159] Optionally, the second obtaining module 503 is specifically configured to:
[0160] Synchronizing the material data in the database corresponding to the target material search mode to the search engine;
[0161] The search request is executed through the search engine, and the material search results are obtained by searching in the material data synchronized to the search engine.
[0162] Optionally, the target search parameter includes a refresh parameter, and the refresh parameter is used to instruct the search engine to refresh the target material data in the database to the search engine before executing the search request; the device 500 further includes:
[0163] The refresh module is configured to, after the second acquisition module 503 synchronizes the material data in the database corresponding to the target material search mode to the search engine, respond to the refresh parameter and refresh the target material data indicated by the refresh parameter to the search engine through the search engine.
[0164] Optionally, the target search parameter includes an aggregation field, and the aggregation field is used to instruct the search engine to count the material types included in the material data included in the material search results under the material attribute according to the material attribute indicated by the aggregation field; the device 500 further includes:
[0165] an aggregation unit configured to, after obtaining, through a search engine and according to the target search parameter, a material search result corresponding to the target search parameter, determine, in response to the aggregation field, through the search engine and according to the material attribute indicated by the aggregation field, a material type included in the material data included in the material search result under the material attribute;
[0166] The attribute display unit is configured to display the material attribute and the material type included under the material attribute.
[0167] Optionally, the attribute display unit is specifically configured as follows:
[0168] The material attribute is displayed through a target control, wherein the target control is used to display the material type under the material attribute in response to a user's selection operation, and the target control is used to display the corresponding material data under the target material type in response to a selection operation for the target material type.
[0169] Optionally, the target search parameter includes a simplified parameter for indicating that simplified processing is performed on the material search results; the device 500 further includes:
[0170] The simplification unit is configured to, after obtaining the material search results corresponding to the target search parameters through the search engine according to the target search parameters, filter the material search results according to the field values specified by the simplification parameters in response to the simplification parameters to obtain filtered material search results;
[0171] The display module 504 is specifically configured as follows:
[0172] The filtered material search results are displayed.
[0173] The functional logic executed by each functional module in the material search device 500 has been described in detail in the part about the method, and will not be repeated here.
[0174] Reference below Figure 6 , which shows a schematic diagram of the structure of an electronic device (such as a terminal device or a server) 600 suitable for implementing the embodiment of the present disclosure. The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0175] like Figure 6 As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0176] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 6 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0177] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0178] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0179] In some embodiments, the terminal devices and servers may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0180] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0181] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: obtains a first search parameter input by a user in a target material search mode; obtains a target search parameter based on the first search parameter and a second search parameter pre-configured in the target material search mode; obtains, through a search engine, material search results corresponding to the target search parameter based on the target search parameter; and displays the material search results.
[0182] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0183] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0184] The modules involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a module does not, in some cases, limit the module itself.
[0185] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0186] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0187] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0188] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0189] Although the subject matter has been described in language specific to structural features and / or method logic actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims. Regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Claims
1. A material search method, It is characterized in that include: Obtaining a first search parameter input by a user in a target material search mode; Obtaining a target search parameter according to the first search parameter and a second search parameter preconfigured in the target material search mode; Obtaining, through a search engine, material search results corresponding to the target search parameters according to the target search parameters; Display the material search results.
2. The method according to claim 1, It is characterized in that The step of obtaining, by means of a search engine, material search results corresponding to the target search parameters according to the target search parameters includes: Writing the target search parameters into a pre-configured initial configuration file to obtain a target configuration file; transmitting the target configuration file to a search engine; converting the target configuration file into a corresponding search request through the search engine; The search request is executed through the search engine, and the material search result is obtained by searching in the material data.
3. The method according to claim 2, It is characterized in that The step of executing the search request through the search engine and searching the material data to obtain the material search result includes: Synchronizing the material data in the database corresponding to the target material search mode to the search engine; The search request is executed through the search engine, and the material search results are obtained by searching in the material data synchronized to the search engine.
4. The method according to claim 3, It is characterized in that The target search parameter includes a refresh parameter, and the refresh parameter is used to instruct the search engine to refresh the target material data in the database into the search engine before executing the search request; After the step of synchronizing the material data in the database corresponding to the target material search mode to the search engine, the method further includes: In response to the refresh parameter, the target material data indicated by the refresh parameter is refreshed into the search engine through the search engine.
5. The method according to claim 1, It is characterized in that The target search parameter includes an aggregation field, and the aggregation field is used to instruct the search engine to count the material types included in the material data included in the material search results under the material attribute according to the material attribute indicated by the aggregation field; After the step of obtaining, by means of a search engine, a material search result corresponding to the target search parameter according to the target search parameter, the method further comprises: In response to the aggregate field, determining, by the search engine, according to the material attribute indicated by the aggregate field, a material type included in the material data included in the material search result under the material attribute; The material attributes and the material types included under the material attributes are displayed.
6. The method according to claim 5, It is characterized in that The display of the material attributes and the material types included under the material attributes includes: The material attribute is displayed through a target control, wherein the target control is used to display the material type under the material attribute in response to a user's selection operation, and the target control is used to display the corresponding material data under the target material type in response to a selection operation for the target material type.
7. The method according to claim 1, It is characterized in that The target search parameters include simplified parameters for indicating simplified processing of material search results; After the step of obtaining, by means of a search engine, a material search result corresponding to the target search parameter according to the target search parameter, the method further comprises: In response to the simplified parameter, the material search results are filtered according to the field value specified by the simplified parameter to obtain filtered material search results; The displaying of the material search results includes: The filtered material search results are displayed.
8. A material search device, It is characterized in that include: An acquisition module is configured to acquire a first search parameter input by a user in a target material search mode; A first obtaining module is configured to obtain a target search parameter according to the first search parameter and a second search parameter pre-configured in the target material search mode; A second obtaining module is configured to obtain, through a search engine and according to the target search parameter, a material search result corresponding to the target search parameter; The display module is configured to display the material search results.
9. A computer readable medium having a computer program stored thereon, It is characterized in that When the program is executed by a processing device, the steps of the method described in any one of claims 1 to 7 are implemented.
10. An electronic device, It is characterized in that include: a storage device having a computer program stored thereon; A processing device, configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 1 to 7.