Remote search method, apparatus and device

By combining the shared logic layer and the framework adaptation layer, the remote search logic can be reused across front-end frameworks, solving the problems of low development efficiency and high maintenance costs, and realizing efficient and convenient remote search.

CN123157971APending Publication Date: 2026-11-24ZHEJIANG GEELY HLDG GRP CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611229378.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-13
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

In web application development, when using remote search, traditional static dropdown options cannot meet business needs, resulting in low development efficiency and high maintenance costs, especially since remote search logic needs to be implemented repeatedly under different front-end frameworks.

Method used

By using a shared logic layer, remote search logic reuse across front-end frameworks is achieved. By combining the framework adaptation layer with the shared logic layer, input data is obtained, search requests are constructed, backend response data is received, and dropdown lists are rendered under the target front-end framework, thus realizing cross-framework logic reuse and interface adaptation.

Benefits of technology

It improves development efficiency, reduces maintenance costs, enables efficient and convenient remote searching under any front-end framework, and reduces code duplication and interface adaptation time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123157971A_ABST
    Figure CN123157971A_ABST
Patent Text Reader

Abstract

This application provides a remote search method, apparatus, and device, comprising: acquiring input data input into a search box through a target front-end framework among multiple front-end frameworks; sending a search request to a back-end service and receiving response data returned by the back-end service based on the input data through a shared remote search logic common to multiple front-end frameworks in a shared logic layer; and rendering a dropdown list of the search box through the target front-end framework based on the response data. This enables the reuse of remote search logic across front-end frameworks, achieving more general, efficient, and convenient remote search across any front-end framework.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data search technology, and in particular to a remote search method, apparatus, and device. Background Technology

[0002] In web application development, dropdown selectors are one of the commonly used form interaction components. Dropdown selectors can display a dropdown list for a search box.

[0003] When the business scenario corresponding to the search box dropdown list (such as city selection, people search, and product filtering) involves a large amount of data, traditional static dropdown options often cannot meet the business requirements. Therefore, a remote search approach is needed to display the dropdown list: the user enters keywords, the front-end service sends a search request to the back-end service, the back-end service returns matching option data, and the front-end service dynamically renders the dropdown list based on this option data. However, due to the existence of multiple front-end frameworks, the remote search logic needs to be implemented repeatedly in different front-end frameworks, resulting in low development efficiency and high maintenance costs for search code. Summary of the Invention

[0004] This application provides a remote search method, apparatus, and device that enables the reuse of remote search logic across front-end frameworks, solving the problems of high development and maintenance costs and low efficiency of search code, and realizing more universal, efficient, and convenient remote search under any front-end framework.

[0005] In a first aspect, this application provides a remote search method, comprising: obtaining input data input into a search box through a target front-end framework among multiple front-end frameworks; sending a search request to a back-end service and receiving response data returned by the back-end service based on the input data through a remote search logic common to multiple front-end frameworks in a shared logic layer; and rendering a drop-down list of the search box through the target front-end framework based on the response data.

[0006] Secondly, this application provides a remote search device, comprising: an input acquisition module, used to acquire input data input into a search box through a target front-end framework among multiple front-end frameworks; a data request module, used to send a search request to a back-end service and receive response data returned by the back-end service based on the input data and through a remote search logic common to multiple front-end frameworks in a shared logic layer; and a response rendering module, used to render a drop-down list of the search box through the target front-end framework based on the response data.

[0007] Thirdly, this application provides an electronic device, including: a processor and a memory, the memory for storing a computer program, and the processor for calling and running the computer program stored in the memory to perform the methods as described in the first aspect or its various implementations.

[0008] Fourthly, this application provides a computer-readable storage medium for storing a computer program that causes a computer to perform the methods described in the first aspect or its various implementations.

[0009] Fifthly, this application provides a computer program product including computer program instructions that cause a computer to perform the methods as described in the first aspect or its various implementations.

[0010] Sixthly, this application provides a computer program that causes a computer to perform the methods described in the first aspect or its various implementations.

[0011] The technical solution of this application allows for the acquisition of input data from a search box through multiple target front-end frameworks. Based on the input data, a search request is sent to the backend service and the response data returned by the backend service is received through a shared remote search logic common to multiple front-end frameworks in the shared logic layer. Based on the response data, the dropdown list of the search box is rendered through the target front-end framework. In this process, the business logic of the remote search, i.e., the remote search logic, can be decoupled from the front-end framework, allowing the same set of search logic to be reused in different front-end frameworks. Therefore, it enables the reuse of remote search logic across front-end frameworks, solving the problems of high development and maintenance costs and low efficiency in search code, and achieving more universal, efficient, and convenient remote search across any front-end framework.

[0012] Other technical features and effects involved in the technical solution of this application will be described in subsequent embodiments, and will not be repeated here to avoid repetition. Attached Figure Description

[0013] The accompanying drawings used in the following description of the embodiments are introduced.

[0014] Figure 1 A flowchart illustrating a remote search method provided in an embodiment of this application; Figure 2 A schematic diagram illustrating a remote search method provided in an embodiment of this application; Figure 3 A schematic diagram illustrating another remote search method provided in an embodiment of this application; Figure 4 A schematic diagram illustrating another remote search method provided in an embodiment of this application; Figure 5A schematic diagram of the remote search device provided in the embodiments of this application; Figure 6 A schematic diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0015] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0016] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or server that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.

[0017] In some embodiments, the technical solution of this application can be used in remote search scenarios. For example, it can be applied to form interaction scenarios in web pages or applications that require dynamically obtaining option data from backend services and displaying it as a drop-down list, including but not limited to: city selection, people search, product filtering, department selection, and other business scenarios involving large amounts of data that require real-time searching.

[0018] Remote search can refer to the process where a user enters data, such as keywords, into the search box on the front-end interface, and the front-end service sends a search request to the back-end service based on those keywords. The back-end service then queries the matching option data based on those keywords and returns it to the front-end service. The front-end service then renders the returned option data into a drop-down list for the user to select from.

[0019] For example, taking city selection as an example, a user can enter the keyword "City 1" in the search box on the front-end interface. After the front-end service obtains this input data, it sends a search request containing the keyword to the back-end service through the remote search logic common to multiple front-end frameworks in the shared logic layer. The back-end service performs a matching query in the corresponding database, such as the city database, based on the keyword, and returns the city option data containing matching "City 1" or "City 1 District 1" to the front-end. The front-end renders the returned city option data into the drop-down list of the search box for the user to select. Throughout the process, the core business logic of remote search is uniformly handled by the shared logic layer. Any front-end framework can call this search logic, realizing cross-framework reuse. In addition, it adapts to the interface differences of different back-end services through configuration, allowing connection to different city data sources without modifying the interface source code of the back-end service, thereby improving the development efficiency and maintenance convenience of the remote search function.

[0020] In some embodiments, the solution provided in this application can be executed by any electronic device with data processing capabilities. For example, the electronic device can be a server, specifically a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. Alternatively, the electronic device can be a terminal device, specifically a tablet computer, laptop computer, or desktop computer. Furthermore, the electronic device can be a combination of a server and a terminal device, wherein the server and terminal device in the combination can communicate wirelessly or via wired means. This application does not impose specific limitations on the electronic device.

[0021] For example, the aforementioned terminal devices can also be in-vehicle terminals or smart cockpit devices, such as in-vehicle infotainment systems, navigation devices, or head-up display systems. Specifically, taking the keyword "charging station" as an example, the user enters "charging station" in the search box of the in-vehicle terminal. After the front-end service obtains this input data, it sends a search request to the back-end service through the common remote search logic in the shared logic layer. The back-end service performs a matching query in a preset geographic information database or third-party service interface based on the keyword, and returns the matching charging station name, location address, distance information, and other option data to the front-end. The front-end renders the returned data into the drop-down list of the search box through the front-end framework, allowing the user to select a navigation destination.

[0022] It should be noted that all technical solutions in this application can be combined in any way to form optional embodiments of this application. To avoid repetition, these will not be elaborated upon.

[0023] Furthermore, various data, information, or instructions are involved in the specific embodiments of this application. When the embodiments of this application are applied to specific products or technologies, user permission, consent, or authorization is required, and the collection, use, and processing of related data must comply with relevant laws, regulations, and standards.

[0024] The technical solution of this application is described below: In some embodiments, Figure 1 This is a flowchart illustrating a remote search method provided in an embodiment of this application. The method can be executed by the aforementioned electronic device, but is not limited thereto. Figure 1 As shown, the method may include S110-S130.

[0025] S110: Obtain the input data entered into the search box through the target front-end framework among multiple front-end frameworks.

[0026] For example, a front-end framework can refer to a software development framework used to build user interfaces. It provides a complete component-based development model and a reactive data binding mechanism, which can be used to build interactive web applications. For example, a front-end framework can include any of the following: Vue2 (Vue framework version 2.x, using the Options API syntax, which allows defining how components are written using options such as data, computed, and methods), Vue3 (Vue framework version 3.x, using the Composition API syntax, which allows defining how components are written using functions such as ref, computed, and watch), and React (React framework version 18.x, using Hooks syntax (i.e., React's functional component writing syntax, which manages state and side effects through functions such as useState and useEffect), allowing writing methods that manage state and side effects through functions such as useState and useEffect.

[0027] For example, an electronic device may include a framework adapter layer. This framework adapter layer can refer to an intermediate layer used to adapt generic remote search logic in a shared logic layer of the electronic device (described in the embodiment of S120) to a specific front-end framework. It can be responsible for responsive state management, UI (User Interface) rendering, and interaction with UI components of the specific front-end framework. For instance, the framework adapter layer can communicate with the shared logic layer to invoke generic remote search logic in the shared logic layer that is independent of the front-end framework.

[0028] For example, the framework adaptation layer can include at least one of the following: Vue2 adaptation layer (using the Options API (i.e., Vue2's component writing syntax, defining components through options such as data, computed, and methods) syntax, and implemented based on the el-select component (i.e., the selector UI component provided by Element UI / Element Plus) in the Element UI component library (i.e., the Vue2 version of the UI component library), with the corresponding file path being remote-select / vue2 / RemoteSelect.vue); Vue3 adaptation layer (using the Composition API syntax (i.e., Vue3's component writing syntax, defining components through functions such as ref, computed, and watch), and implemented based on the el-select component in the Element Plus component library (i.e., the Vue3 version of the UI component library), with the corresponding file path being remote-select / vue3 / RemoteSelect.vue); React adaptation layer (using Hooks syntax, and implemented based on the Select component in the Ant Design component library (i.e., the React version of the UI component library), with the corresponding file path being remote-select / react / RemoteSelect.jsx). Each framework adaptation layer can be responsible only for UI rendering and responsive state management, while the core search process can be handled uniformly by a shared logic layer.

[0029] For example, the target front-end framework can refer to any one of multiple front-end frameworks, such as the front-end framework currently used by the electronic device, which matches the corresponding adaptation layer in the framework adaptation layer. For instance, if the electronic device uses the Vue2 framework for UI development, then the target front-end framework is Vue2, and its corresponding framework adaptation layer is the Vue2 adaptation layer; if it uses the Vue3 framework, then the target front-end framework is Vue3, and its corresponding framework adaptation layer is the Vue3 adaptation layer; if it uses the React framework, then the target front-end framework is React, and its corresponding framework adaptation layer is the React adaptation layer.

[0030] For example, the target front-end framework can obtain input data entered into the search box through the following steps: The target front-end framework renders the search box component and listens for input events of the search box component; when the user enters content in the search box (such as keywords, or, but not limited to, voice, text, video, etc.), the input event is triggered; the target front-end framework captures the input event through an event listening mechanism and extracts the string entered by the user from the input event as input data. If the search box component is a multi-select mode, the input data can be the query string entered by the user in the search box for filtering options, such as the query string entered by the user.

[0031] The input data can be content entered by the user in the search box, or data converted from that content. For example, the user can use voice input, where a voice recognition component converts the speech into text as input data; or the user can use text input, directly typing keywords into the search box as input data; or the user can obtain input data by acquiring video or image data through image recognition, and this application does not limit this.

[0032] In the embodiment of S110 above, the front-end framework can listen to the input events of the search box and obtain the input data, which is convenient for the input data to be passed to the shared logic layer for subsequent processing, thus providing a data foundation for subsequent remote search processing based on the shared logic layer.

[0033] S120: Based on the input data, send a search request to the backend service and receive the response data returned by the backend service through the remote search logic common to multiple frontend frameworks in the shared logic layer.

[0034] For example, the shared logic layer can refer to a general business logic layer independent of the front-end framework. It contains multiple reusable core business logics for remote search across different front-end frameworks, and can be used to uniformly handle request construction, request sending, response extraction, and data transformation in the remote search process. Correspondingly, remote search logic can refer to a set of business processing rules involved when an electronic device performs a remote search. It includes at least the following steps: constructing a search request based on input data, sending the search request to the backend service, receiving the response data returned by the backend service, extracting raw data from the response data, and converting the raw data into a standardized option format. The remote search logic can be independent of a specific front-end framework and uniformly implemented by the shared logic layer, allowing it to be called by the framework adaptation layers of different front-end frameworks, thereby achieving cross-front-end framework reuse of remote search logic.

[0035] The shared logic layer can communicate with the framework adaptation layer. After obtaining input data, the framework adaptation layer passes the input data to the shared logic layer, which then executes the subsequent remote search process. For example, the shared logic layer may include at least one of the following: an API request client (APIClient, i.e., a client class that encapsulates HTTP request sending and can provide get / post / request methods), utility functions (such as the debouncing function debounce, the path extraction function getValueByPath, the data transformation function transformData, the response extraction function extractDataFromResponse, the scroll container lookup function findScrollContainer (a function used to find the currently visible dropdown scroll container DOM element), etc.), and constant configurations (such as the default API configuration object DEFAULT_API_CONFIG, the default property mapping configuration object DEFAULT_PROP_CONFIG, the event name constant EVENTS, etc.). The shared logic layer can be located in the shared / directory of the electronic device, but is not limited to this.

[0036] For example, the above-mentioned method, based on the input data, sends a search request to the backend service through a remote search logic common to multiple frontend frameworks in the shared logic layer, including: loading an interface configuration object (apiConfig, i.e., a configuration object that defines interface request parameters); mapping the input data to the data format corresponding to the backend service through the interface configuration object to obtain the search request; and sending the search request to the backend service; wherein, the interface configuration object is used to configure the parameter format of the corresponding interface request of the backend service.

[0037] It should be noted that the field mapping object (propConfig, i.e., the configuration object that defines the data field mapping) can be used to perform field mapping processing on the response data after receiving the response data, which will be introduced in the subsequent embodiment of S130.

[0038] For example, the parameters configured in the interface configuration object include at least one of the following: The backend service's interface address (url) is used to specify the target address for the search request; The request method for a search request specifies the HTTP method type of the search request, such as GET, POST, or PUT. The parameter name (paramsKey) in the search request is the parameter name of the search keyword in the backend service interface, such as keyword, q, or search. The number of data entries returned per request (pageSize) is used to control the amount of data returned for each search request; The response path is the nested path of the target data array in the backend response, such as "data.list" or "result.items", and is used to extract the target data array from the nested response data. The parameter name (pageKey) of the current page number in the search request, which is the parameter name of the current page number in the backend service interface, such as pageNum, page, or currentPage; The number of data records per page is the parameter name (pageSizeKey) in the search request, which is the parameter name of the number of data records per page in the backend service interface, such as pageSize, rows, or limit. The field name (totalKey) corresponding to the total number of records in the response data is used to extract the total number of records from the response data; Additional request parameters that must be included are those other request parameters besides the search keywords and pagination parameters. The `usePagination` parameter indicates whether pagination is enabled, and is used to indicate whether the search request should include pagination parameters.

[0039] The specific values ​​of the above parameters can be configured according to the format requirements of different backend service interfaces, so as to adapt to different backend service interfaces without modifying the source code.

[0040] For example, configuring an interface to map input data to the data format corresponding to the backend service can include at least one of the following: Based on the search parameter key name (paramsKey) in the interface configuration object, the input data is used as the value corresponding to the key name; Based on the page key name (pageKey) in the interface configuration object, the current page number is used as the value corresponding to the key name; Based on the key name (pageSizeKey) of the page quantity parameter in the interface configuration object, use the page quantity (pageSize) in the interface configuration object as the value corresponding to the key name; The extra parameters (extraParams) in the interface configuration object are merged into the request parameters.

[0041] For example, assuming the interface configuration object has `paramsKey` set to "keyword", `pageKey` set to "pageNum", `pageSizeKey` set to "pageSize", and `pageSize` set to 10, and the input data is "City 1", then the mapped request parameters can be `{keyword: "City 1", pageNum: 1, pageSize: 10}`. As another example, assuming another backend service interface has `paramsKey` set to "q", `pageKey` set to "current", and `pageSizeKey` set to "size", then when the input is also "City 1", the mapped request parameters will be `{q: "City 1", current: 1, size: 10}`. Therefore, by using different configuration values ​​in the interface configuration object, the same input data (such as "City 1" above) can be adapted to the parameter formats required by different backend service interfaces without modifying the source code.

[0042] For example, sending a search request to the backend service can include sending the search request via an API request client (APIClient). Specifically, the API request client can preferentially use the custom request function (request prop) passed in by the developer. If no custom request function is passed in, it can use the built-in axios request logic to select the corresponding request method (such as axios.get or axios.post) based on the request method (method) in the interface configuration object to send the search request. This retains the flexibility of developers to customize requests while providing a ready-made default implementation, further enhancing the flexibility of interface adaptation.

[0043] For example, after sending a search request, the shared logic layer can also receive response data returned by the backend service. This response data is the raw data returned by the backend service after querying based on the parameters in the search request. Its format may vary depending on the backend service, for example, it may be {code: 0, data: {list: [{id: 1, name: "Name"}]}} or {success: true, result: {items: [{userId: 1, userName: "Name"}]}}, etc. After receiving the response data, the shared logic layer can pass it to subsequent steps for further processing.

[0044] Understandably, writing remote search logic separately for Vue2 / Vue3 / React would result in near 100% code duplication, making it difficult to guarantee functional consistency. However, with a shared logic layer architecture, business logic can be developed once and used across all three frameworks, improving development efficiency by approximately three times. When a function in the shared logic layer needs fixing or optimization, only one code snippet needs to be modified, benefiting all framework versions simultaneously and reducing maintenance costs by approximately 67%. Furthermore, each new interface requires writing a complete set of search request code (approximately 50,100 lines), involving request parameter construction, response data extraction, field mapping, and other logic, typically taking hours. With the configuration mechanism in S120, only a few parameter values ​​in the configuration object need to be modified (approximately 510 lines of configuration), without modifying the source code, reducing interface adaptation development time from hours to minutes. Therefore, in the S120 embodiment described above, the shared logic layer can load the interface configuration object, map input data to the parameter formats required by different backend services, and send search requests accordingly, receiving response data returned by the backend services. Because the interface configuration object abstracts the differences in parameter formats of backend service interfaces into configurable parameters, when a backend service interface changes, only the corresponding parameter values ​​in the interface configuration object need to be modified, without modifying the source code. This enables rapid adaptation of different backend service interfaces, reducing interface adaptation development time from hours to minutes. Furthermore, this remote search logic resides in a shared logic layer, independent of any specific frontend framework, and can be called by multiple framework adaptation layers such as Vue2, Vue3, and React, achieving cross-frontend framework remote search logic reuse.

[0045] S130: Render the dropdown list of the search box using the target front-end framework based on the response data.

[0046] For example, the response data can be the raw data returned by the backend service based on the search request. Its format may vary depending on the backend service; for example, it may be an array of objects (e.g., [{id:1, name:"City 1"}]), an array of strings (e.g., ["City 1","City 2"]), an array of numbers (e.g., [1,2,3]), or a nested structure (e.g., {code:0, data:{list:[{id:1, name:"City 1"}]}}). Because the response data formats returned by different backend services are not uniform, the response data needs to be formatted before rendering the dropdown list to adapt to the standard data format of the frontend dropdown list.

[0047] For example, based on the response data, the dropdown list of the search box is rendered through the target front-end framework, including: extracting the raw data from the response data; converting the raw data into raw data under a preset data type; mapping the data fields of the converted raw data to the fields of the corresponding preset option format in the dropdown list through the field mapping relationship contained in the property mapping configuration object (propConfig, i.e., the configuration object that defines the data field mapping, including parameters such as labelKey, valueKey, keyKey, descKey, etc.); and rendering the mapped raw data to the dropdown list through the target front-end framework.

[0048] The preset option format can refer to the standardized option format used uniformly by the front-end drop-down list, such as the {label, value, key, desc} format. This format is unrelated to the naming of data fields in the specific back-end service, and the drop-down list can be rendered directly based on this standardized format.

[0049] For example, extracting raw data from response data includes: extracting raw data from the response data based on the response data path (responsePath, i.e., the nested path of the data array in the backend response, such as "data.list"), where the response data path is a multi-level path separated by dots; where each level of the response data path corresponds to a field name of a level in the response data. Specifically, this can be achieved using the path value extraction function (getValueByPath, i.e., the function that extracts the target value from a nested object by the path string): the response data path string (such as "data.list") is decomposed into a key array (such as ["data","list"]), and then the target raw data array is extracted by traversing the response data object level by level to obtain the raw data. For example, if the response data path is configured as "data.list", the path value extraction function will sequentially obtain the data field and then the list field from the response data to obtain the target raw data array; if it is configured as "result.items", the result field and then the items field will be sequentially obtained from the response data to obtain the target raw data array. When no response data path is configured, the response data extraction function (extractDataFromResponse, the function that extracts the target data array from the API response object) can be used to sequentially attempt to extract the array data from the data property of the response data or the response data itself. Therefore, by configuring the response data path, it is possible to adapt to the different nesting structures of response data from different backend services, and the array can be extracted correctly without modifying the source code, regardless of the nesting depth of the target data array.

[0050] For example, converting raw data into raw data of a preset data type can include: detecting the type of each element in the raw data using a data transformation function (transformData, which converts the raw data array into a standardized option format). If the data is a string or a number, each element is converted into an object format. In the converted object format, the value of the display text field name is the value of the element, and the value of the bound value field name is the value of the element. For example, when the backend returns a string array ["City 1", "City 2", "City 3"], the data transformation function automatically converts each string element into an object format. Assuming that labelKey (the display text field name) is configured as "label" and valueKey (the bound value field name) is configured as "value", the converted raw data would be [{label:"City 1", value:"City 1"}, {label:"City 2", value:"City 2"}, {label:"City 3", value:"City 3"}]. For example, when the backend returns a numeric array [1,2,3], the data conversion function automatically converts each numeric element into an object format. The resulting original data is [{label:"1", value:1}, {label:"2", value:2}, {label:"3", value:3}]. If it detects that each element in the original data is already an object type, it maintains the original format and proceeds directly to the subsequent field mapping stage. Therefore, regardless of whether the backend returns a string array, a numeric array, or an object array, it can be uniformly processed as an object array, ensuring that the UI layer always processes data using a consistent field mapping method.

[0051] For example, by configuring the field mapping relationships contained in the attribute mapping configuration object, the data fields of the transformed original data are mapped to fields under the corresponding preset option format of the drop-down list. This can include: extracting the corresponding display text from each data object based on the display text field name (labelKey, i.e., the field name used to extract the option display text) in the attribute mapping configuration object; extracting the corresponding binding value from each data object based on the binding value field name (valueKey, i.e., the field name used to extract the option binding value) in the attribute mapping configuration object; extracting the corresponding unique identifier from each data object based on the unique identifier field name (keyKey, i.e., the field name used to extract the option unique identifier) ​​in the attribute mapping configuration object; and extracting the corresponding description information from each data object based on the description information field name (descKey, i.e., the field name used to extract the option description information) in the attribute mapping configuration object. After extraction, the extracted field values ​​are combined into a preset option format, such as {label: display text, value: binding value, key: unique identifier, desc: description information}.

[0052] In addition, field mapping can provide a fallback mechanism (i.e., an alternative matching mechanism): when no corresponding value is found based on the configured field name, common field names are tried in turn. For example, when the field name configured by labelKey is not matched, the label attribute and name attribute of the data object are tried in turn as the display text; when the field name configured by valueKey is not matched, the value attribute and id attribute of the data object are tried in turn as the binding value; when the field name configured by keyKey is not matched, the id attribute and value attribute of the data object are tried in turn as the unique identifier. For example, assuming that labelKey is configured as "userName" and valueKey is configured as "userId" in the attribute mapping configuration object, and the original data returned by the backend is [{userId:1, userName:"Name1"}, {userId:2, userName:"Name2"}], then the standardized option format after mapping is [{label:"Name1", value:1, key:1}, {label:"Name2", value:2, key:2}]. For example, suppose the backend returns raw data as [{name:"City 1", code:"BJ"}, {name:"City 2", code:"SH"}], and the attribute mapping configuration object has labelKey set to "name" and valueKey set to "code". Then the mapped standardized option format would be [{label:"City 1", value:"BJ", key:"BJ"}, {label:"City 2", value:"SH", key:"SH"}]. Furthermore, if the attribute mapping configuration object has labelKey set to "text", but the data object does not have a text field, the fallback mechanism will automatically attempt to find the label field and then the name field in turn. If the name field is found, its value will be used as the displayed text.

[0053] Therefore, through field mapping configuration and fallback mechanism, regardless of how the backend data fields are named, they can be correctly mapped to a unified preset option format without the need to write specific conversion code for each field naming method.

[0054] For example, rendering the mapped raw data to the dropdown list via the target front-end framework can include: passing the standardized option format data obtained after mapping to the framework adapter layer corresponding to the target front-end framework; the framework adapter layer updates the option data of the dropdown list according to the reactive state management mechanism of the target front-end framework, thereby triggering a UI re-render so that the user can see the updated dropdown list. For example, in the Vue 2 framework, a view update can be triggered by updating the options array in data; in the Vue 3 framework, a view update can be triggered by updating the value of the ref object; in the React framework, a view re-render can be triggered by calling the update function of useState. Thus, regardless of the front-end framework used, the standardized option format data can be correctly rendered to the dropdown list.

[0055] In the embodiment of S130 above, by extracting raw data from the response data, converting the raw data into a preset data type, mapping fields through an attribute mapping configuration object, and rendering through the target front-end framework, a fully automatic conversion from backend response data of arbitrary format to standardized dropdown list options is achieved. Specifically, response data path configuration solves the problem of inconsistent nested structures in responses from different backend services; automatic data type conversion solves the format compatibility problem when the backend returns string arrays or numeric arrays instead of object arrays; and the attribute mapping configuration object and its fallback mechanism solve the problem of inconsistent field naming across different backend services. The combined use of these three adaptive data processing methods ensures that regardless of the format of the data returned by the backend, the component can uniformly process it into a standardized option format. The UI layer does not need to worry about data differences or manually write data adaptation code, eliminating development costs and rendering error risks caused by inconsistent data formats.

[0056] In some embodiments, for ease of understanding of the embodiments described in S110-S130 above, a simple and overall description is provided below using a schematic diagram: like Figure 2 As shown, this remote search method involves three layers: the UI layer, the shared logic layer, and the backend service. The specific data processing flow is as follows: In the UI layer, the target front-end framework first renders the search box and listens for user input events. When the user enters content, the framework captures the input data and passes it to the framework adaptation layer. After receiving the input data, the framework adaptation layer can pass it to the shared logic layer without performing business processing. After receiving the input data, the shared logic layer can construct a search request that meets the backend interface requirements of the backend service through general remote search logic, and send the request to the backend service. The backend service executes the query based on the request parameters in the search request and returns the raw response data to the shared logic layer; After receiving the raw response data, the shared logic layer processes it to obtain data in a standardized option format and returns it to the framework adaptation layer. After receiving standardized data, the framework adaptation layer can update the dropdown state according to the reactive state management mechanism of the target front-end framework (such as updating data in Vue2, updating ref in Vue3, and calling the useState update function in React), triggering a UI re-render. The target front-end framework then renders the standardized option data as a dropdown list in the search box and displays it to the user. This completes the entire remote search process from user input to dropdown list display. The core search logic and data processing logic are implemented uniformly in a shared logic layer, independent of any specific front-end framework, thus achieving cross-framework logic reuse.

[0057] In some embodiments, the technical solution of this application further includes the following steps: integrating the search performance optimization strategy into the shared logic layer; enabling or adjusting the configuration parameters corresponding to the performance optimization strategy; and controlling the enabling or execution conditions of the corresponding remote search link according to the configuration parameters; wherein the search performance optimization strategy includes at least one of the following: debouncing, minimum search length filtering, pagination management, and scrolling loading of drop-down lists.

[0058] For example, integrating search performance optimization strategies into the shared logic layer can mean embedding the implementation code of one or more performance optimization strategies into the remote search logic of the shared logic layer, making these optimization strategies a component of the remote search logic, rather than having the developers manually write and implement them in the framework adaptation layer or business layer.

[0059] For example, the performance optimization strategies described above can be associated with corresponding stages in the remote search logic. For instance, debouncing and minimum search length filtering can be associated with the search triggering stage, pagination management with the request parameter construction and response data processing stages, and scroll loading with the dropdown list interaction stage. When the shared logic layer executes the remote search logic, the corresponding optimization strategies can be automatically enabled or adjusted based on configuration parameters, without requiring developers to write additional code.

[0060] The following sections explain each performance optimization strategy: For example, debouncing can refer to controlling the process of user input triggering a search by using a debouncing function (i.e., a delayed execution function that executes only once after the delay period ends following the last call). Specifically, when a user continuously enters information in the search box, each input triggers a search request. However, the debouncing function can combine multiple consecutive triggers into a single execution: the search request is only sent after the user stops entering information and a preset delay period has elapsed; if the user enters information again within the delay period, the timer is reset, and the user waits again. The configuration parameter for debouncing can be the debouncing delay time (debounceDelay, the delay time parameter of the debouncing function, in milliseconds, default 300ms). Developers can adjust this parameter value to control the waiting time for debouncing. For example, if debounceDelay is set to 500ms, the search request will only be initiated 500ms after the user stops entering information. Debouncing can effectively reduce the large number of invalid requests triggered when users enter information quickly, thus reducing the pressure on backend services.

[0061] For example, minimum search length filtering can refer to checking the length of the input data before triggering a search request. A search request is only allowed if the length of the input data reaches a preset threshold. Specifically, after obtaining user input data, the remote search logic determines whether the length of the input data is greater than or equal to the minimum search length (minSearchLength, the minimum number of characters required to trigger a search, defaulting to 1). If the length of the input data is less than this threshold, the current dropdown list is cleared and the search process ends without sending a search request. If the length of the input data is greater than or equal to this threshold, the subsequent search process continues. The configuration parameter corresponding to the minimum search length can be minSearchLength, and developers can control the minimum number of input characters required to trigger a search by adjusting this parameter value. For example, if minSearchLength is set to 2, a search will not be triggered when the user enters a single character; a search will only be initiated when two or more characters are entered. Minimum search length filtering can prevent short keyword searches from returning too many irrelevant results or causing meaningless search requests.

[0062] For example, pagination management can refer to automatically maintaining the pagination status of search requests in the shared logic layer, enabling remote search logic to acquire and append paginated data. Specifically, the shared logic layer automatically maintains the following pagination states: current page number (currentPage), used to record the currently requested page number, with an initial value of 1; whether there is more data (hasMore), used to record whether there is another page of data available for loading, with an initial value of true; page loading status (pageLoading), used to record whether page loading is currently being performed to prevent concurrent loading requests; last search keyword (lastSearchQuery), used to record the keywords used in the most recent search, keeping the search conditions unchanged during page loading to avoid repeatedly sending requests for the same keywords. When a user initiates a new search, the shared logic layer automatically resets the current page number to 1 and the "whether there is more data" option to true. It then constructs the pagination parameters in the request parameters based on the current page number. When a user triggers page loading, the shared logic layer automatically increments the current page number by 1 and constructs request parameters based on the current page number and the last search keyword. Upon successful request, the returned data is appended to the end of the existing option list, and the layer checks if the returned data volume reaches the page size to determine if there is more data. Pagination state management can be entirely automated by the shared logic layer's remote search logic. Developers do not need to manually maintain pagination-related variables such as page number and loading status in the framework adaptation layer or business layer, nor do they need to manually write code for pagination parameter construction, data appending, and status updates.

[0063] For example, scroll loading of a dropdown list can refer to integrating scroll position detection logic into the shared logic layer, automatically triggering the loading of the next page of data when the dropdown list scrolls to near the bottom. Specifically, after the user expands the dropdown list, the shared logic layer uses the scroll container lookup function (findScrollContainer, i.e., the function that finds the DOM element of the currently visible dropdown list scroll container) to find the currently visible dropdown list scroll container DOM element and binds a scroll listener event to the scroll container; when the user scrolls the dropdown list, the scroll position is calculated in real time, specifically by subtracting the scroll distance already scrolled (scrollTop) from the scroll height (scrollHeight) and then subtracting the visible height of the scroll container (clientHeight) to obtain the distance of the scroll bar from the bottom; when this distance is less than or equal to a preset threshold (e.g., 10 pixels), if there is more data (hasMore is true) and the current page loading state is not in (pageLoading is false), then page loading is automatically triggered. The configuration parameter for scroll loading can be a switch to enable scroll loading (enableScrollLoad), which developers can use to enable or disable the scroll loading function. If scroll loading is disabled, users can only trigger page loading through other means (such as clicking the "Load More" button). With scroll loading, users do not need to click the "Load More" button to automatically load the next page of data when scrolling to the bottom, providing a smoother pagination experience.

[0064] For example, each of the above performance optimization strategies is associated with a corresponding step in the remote search logic. Specifically, debouncing and minimum search length filtering apply to the search triggering step of the remote search logic, executed after obtaining user input information but before constructing request parameters, to determine whether to proceed to the subsequent request construction and sending process; pagination management applies to the request construction and response processing steps of the remote search logic, automatically adding pagination parameters when constructing request parameters, automatically updating the pagination status after receiving response data, and managing the appending or replacing of the option list; scroll loading applies to the interaction step of the remote search logic, binding a scroll listener after the dropdown list expands, and triggering page loading when scrolling to the bottom. All of the above optimization strategies can be implemented in the shared logic layer, and therefore can be shared and used by all framework adaptation layers.

[0065] Through the above embodiments, search performance optimization strategies such as debouncing, minimum search length filtering, pagination management, and scroll loading are integrated into the shared logic layer. Developers only need to enable or adjust the corresponding optimization functions by configuring parameters, without having to manually write the implementation code for the above optimization strategies in the framework adaptation layer or business layer. Compared with the practice in related technologies where developers need to manually implement debouncing, pagination, scroll loading, and other functions for each project, this application integrates the above optimization strategies, so that developers do not need to pay attention to the specific implementation details of each optimization strategy. They can enable or adjust the performance optimization strategies as needed by simply configuring parameters, reducing the amount of boilerplate code writing by about 80%. At the same time, the above optimization strategies are uniformly maintained and updated by the shared logic layer. Upgrades in one place benefit all frameworks simultaneously, reducing maintenance costs. In addition, debouncing reduces the number of invalid requests by about 70% to 90%, minimum search length filtering eliminates meaningless searches for short keywords, automatic pagination management avoids the risk of errors caused by developers manually maintaining page number status, scroll loading provides a smoother pagination experience, and request status control prevents duplicate requests, improving the overall performance and user experience of remote search.

[0066] In some embodiments, the shared logic layer may include at least one of the following modules: The API request client module (the corresponding file path (which can refer to the file path on the electronic device) is remote-select / shared / api.js, which is used to encapsulate APIClient, that is, to encapsulate the client class for sending HTTP requests, providing methods such as get, post, and request); The utility function module (located in remote-select / shared / utils.js, which provides utility functions such as debounce, getValueByPath, transformData, extractDataFromResponse, and findScrollContainer) The constant configuration module (the corresponding file path is remote-select / shared / constants.js, which is used to define the default API configuration object DEFAULT_API_CONFIG, the default property mapping configuration object DEFAULT_PROP_CONFIG, and the event name constant EVENTS, etc.).

[0067] The modules described above can collectively form a shared logic layer, providing general remote search business logic support for multiple front-end frameworks. The file paths mentioned above are merely illustrative and do not constitute specific limitations in this application.

[0068] In some embodiments, the technical solution of this application further includes the following steps: checking whether there is response data matching the input data in the storage unit, the storage unit being used to store historical input data and corresponding historical response data; if there is matching response data in the storage unit, then rendering the matching response data to the drop-down list through the target front-end framework; if there is no matching response data in the storage unit, then executing a search request to the back-end service and receiving the response data returned by the back-end service based on the input data and through the remote search logic common to multiple front-end frameworks in the shared logic layer.

[0069] For example, a storage unit can refer to a cached object (such as a JavaScript object or a Map data structure) maintained locally by the electronic device. Its storage method can be to store historical input data (i.e., the user's historical search keywords) and their corresponding historical response data (i.e., the search results returned by the backend service for that keyword) in the form of key-value pairs. The storage unit can reside in the shared logic layer, managed and maintained uniformly by the shared logic layer, independent of any specific front-end framework, and shared by various framework adaptation layers. The storage capacity of the storage unit can be set according to actual needs; for example, a maximum number of cached entries can be set, and old data is deleted when the number of cached entries exceeds the limit.

[0070] For example, checking whether there is response data matching the input data in the storage unit can include: using the user's current input data (i.e., search keywords) as the query key, searching the storage unit for a cached record that matches the query key. If a cached record with the input data as the key exists in the storage unit, then the response data under that cached record is the matching response data.

[0071] For example, if matching response data exists in the storage unit, there's no need to send a search request to the backend service. Instead, the matching response data is directly treated as valid data for subsequent processing. In this case, the request construction and sending stages in the remote search logic can be skipped, and subsequent steps such as extracting raw data from the response data, data type conversion, and field mapping can be performed directly. Finally, the data is rendered into the dropdown list by the target frontend framework. Because no network requests are needed and data is retrieved directly from the local cache, the response speed is extremely fast, improving the user search experience while reducing the request pressure on the backend service.

[0072] For example, if no matching response data exists in the storage unit (e.g., the keyword has never been cached, the cached record has expired, or the cached record has been deleted), a search request is sent to the backend service, and the response data returned by the backend service is received. The specific processing procedure can be found in the relevant description in embodiment S120, and will not be repeated here. After receiving the response data returned by the backend service, the input data can also be associated with the corresponding response data and stored in the storage unit so that when the same keyword is searched again subsequently, the response data can be directly retrieved from the storage unit without repeatedly sending a search request.

[0073] For example, the cache write and update process for a storage unit may include: after executing remote search logic and receiving response data returned by the backend service, storing the input data as the key and the response data as the value in the storage unit as key-value pairs; if a cache record with the same key already exists in the storage unit, replacing the old response data with the new response data to keep the cached data up-to-date. This ensures that the cached data remains consistent with the backend service data for a reasonable period of time, preventing users from obtaining expired data.

[0074] Through the above embodiments, by maintaining storage units in the shared logic layer to cache historical search keywords and their corresponding search results, when a user's entered search keyword has a matching record in the storage unit, the cached data can be directly used to render the dropdown list without executing a remote search request. This reduces duplicate search requests, improves search response speed, and reduces the request pressure on backend services. Especially for remote search scenarios where search results are relatively stable and users repeatedly search for the same keywords, this solution can significantly improve search efficiency and save network resources.

[0075] In some embodiments, as described above, the shared logic layer can send search requests to the backend service and receive response data via the HTTP protocol. Alternatively, for applications with higher real-time requirements (such as real-time search suggestions or multi-user collaboration scenarios), the shared logic layer can also employ the WebSocket protocol to implement remote searching.

[0076] For example, the shared logic layer can establish a WebSocket connection (i.e., a full-duplex communication connection based on the WebSocket protocol) with the backend service during initialization. When the user enters keywords in the search box, the shared logic layer sends the input information to the backend service through the established WebSocket connection. After receiving the keywords, the backend service performs a real-time search and pushes the search results data to the shared logic layer in real time through the same WebSocket connection. After receiving the pushed response data, the shared logic layer performs subsequent processing such as response data extraction, data type conversion, and field mapping, and finally renders it to the dropdown list through the target frontend framework.

[0077] In some embodiments, the interface configuration object (apiConfig) and property mapping configuration object (propConfig) can be manually configured by the developer according to the format of the backend service interface. Alternatively, the shared logic layer can obtain the interface description file provided by the backend service and automatically generate the configuration objects using JSON Schema. Specifically, the backend service can provide an interface description file conforming to the JSON Schema specification. This file defines the request parameter structure (such as request method, search parameter name, pagination parameter name, etc.), response data structure (such as the nested path of the target array in the response data, the total record number field name, etc.), and data field naming (such as display text field name, bound value field name, etc.) of the backend service interface. The shared logic layer loads this JSON Schema description file during initialization, automatically parses the interface definition information within it, and generates the corresponding interface configuration object (apiConfig) and property mapping configuration object (propConfig) accordingly, thereby automating interface adaptation.

[0078] By employing JSON Schema automatic description instead of manual configuration through the above embodiments, the workload for developers can be further reduced. This is especially true in scenarios requiring integration with numerous backend service interfaces. Developers no longer need to consult interface documentation and manually fill in configuration parameters; instead, the shared logic layer automatically parses the standardized schema file provided by the backend service to generate configuration objects, automating interface adaptation. Furthermore, when a backend service interface changes, only the corresponding JSON Schema description file needs to be updated. The shared logic layer automatically generates a new configuration object upon loading, eliminating the need to modify configuration files in each project individually, further reducing maintenance costs.

[0079] In some embodiments, the remote search logic of the shared logic layer (including request construction, request sending, response extraction, data transformation, etc.) can be executed in the browser's main thread. As another optional implementation, for scenarios with large data processing volumes or complex search logic, at least a portion of the remote search logic of the shared logic layer can be moved to a Web Worker for execution. A Web Worker is a scripting environment that runs independently of the main thread in the browser background; its execution does not block UI rendering and user interaction on the main thread.

[0080] Specifically, after obtaining the user's input data, the main thread (i.e., the thread where the front-end framework resides, responsible for UI rendering and user interaction) sends the input data, interface configuration object (apiConfig), property mapping configuration object (propConfig), and other data to the Web Worker via the postMessage method. After receiving the above data, the Web Worker executes remote search logic in a background thread, including constructing a search request based on the interface configuration object, sending the search request to the backend service, receiving the response data returned by the backend service, extracting the original data according to the response data path, and performing data type conversion and field mapping on the original data. After processing, the Web Worker returns the processed standardized option format data to the main thread via the postMessage method. After receiving the returned data, the main thread renders the data into a dropdown list through the target front-end framework.

[0081] As an optional implementation, a dual-threaded parallel mode can be used between the main thread and the Web Worker: When the user rapidly and continuously inputs data in the search box, the main thread handles debouncing. After debouncing, the search task is sent to the Web Worker. While the Web Worker executes the search request and data processing, the main thread can still respond normally to user interface interactions (such as scrolling the dropdown list, clicking other buttons, etc.). After the search task is completed, the Web Worker returns the results to the main thread, and the main thread updates the dropdown list. With this parallel mode, search requests and data processing do not block the UI rendering thread, and the user interface remains consistently responsive.

[0082] As an optional implementation, there can be one or more Web Workers. When multiple backend service interfaces require concurrent searches, multiple Web Workers can be created to execute different search tasks. After each Worker completes its search independently, it returns the results to the main thread. The main thread then merges the data returned by each Worker and renders it uniformly into the dropdown list.

[0083] Through the above embodiments, the remote search logic of the shared logic layer is moved from the main thread to the Web Worker for execution. This allows time-consuming operations such as sending search requests, processing response data, and format conversion to be completed in the background thread, avoiding blocking of UI rendering and user interaction on the main thread and improving UI responsiveness. The effect is particularly noticeable in scenarios that require processing large amounts of data or have complex search logic.

[0084] The technical solution of this application will be described again below through some embodiments: In some embodiments, in conjunction with the above, such as Figure 3 As shown, the remote search method provided in this application can be implemented through the following steps: Step S1, Initialize configuration: S1-1, Load the interface configuration object, which contains at least one of the following: interface address (url), request method (method), search parameter key name (paramsKey), number of pages per page (pageSize), response data path (responsePath), whether to enable pagination (usePagination), page number parameter key name (pageKey), number of pages per page parameter key name (pageSizeKey), total data volume key name (totalKey), and extra fixed parameters (extraParams). S1-2, Load the attribute mapping configuration object, which contains at least one of the following: display text field name (labelKey), bound value field name (valueKey), unique identifier field name (keyKey), and description information field name (descKey). S1-3 Initialize the API request client (APIClient, which is a client class that encapsulates the sending of HTTP requests). It will preferentially use the custom request function (request prop) passed by the developer. If no function is passed, it will use the built-in axios request logic. S1-4, register the debouncing function (debounce, which is a delayed execution function that is executed only once after the delay time ends after the last call) with the debouncing delay time (debounceDelay, which is the delay time parameter of the debouncing function, in milliseconds, with a default of 300ms).

[0085] Step S2, user input triggers search: S2-1, The user enters keywords in the search box; S2-2, check if the input is empty. If it is empty, trigger the initial data loading (isFocusLoad=true). S2-3: Determine if the input length is greater than or equal to the minimum search length (minSearchLength, which is the minimum number of input characters required to trigger a search, default 1). If it is insufficient, clear the option list and end the search. S2-4, if the keywords meet the above conditions, then enter the anti-shake waiting phase.

[0086] Step S3, construct request parameters after debouncing: S3-1, The search function is executed after the stabilization delay ends; S3-2, Merge extra fixed parameters (extraParams) in the interface configuration object. S3-3: Using the search parameter key name (paramsKey) in the interface configuration object as the key name, the search keyword is mapped as the value. If it is the first focus load (isFocusLoad=true), no search parameter is added. S3-4: Using the page number parameter key name (pageKey) in the interface configuration object as the key name, map the current page number as the value, and using the number of pages parameter key name (pageSizeKey) as the key name, map the number of pages (pageSize) as the value. S3-5, construct a complete request configuration object containing the interface address, request method, and request parameters.

[0087] Step S4: Send an API request and retrieve the response data. S4-1, send an HTTP request through the API Request Client (APIClient), using the interface address, request method and request parameters in the request configuration object; S4-2, determine whether the response path in the interface configuration object is configured. If it is configured, extract data from the nested path using the path value extraction function (getValueByPath, which is the function that extracts the target value from the nested object by the path string). After decomposing the path string (e.g., "data.list" into ["data", "list"]), it iterates through the response object layer by layer to extract the target array. If it is not configured, try to extract the array from the data property of the response data or the response data itself in turn. S4-3 returns the original data array, which may be an array of objects or an array of strings / numbers.

[0088] Step S5, adaptive data format conversion: S5-1 uses the data transformation function (transformData, which converts the original data array into a standardized option format) to detect the data element type. If it is a string or number type, it automatically converts each element into an object format ({valueKey: item value, labelKey: item.toString()}). If it is an object type, it keeps the original format unchanged. S5-2 uses the property mapping configuration object (propConfig) to map fields and extract standardized fields, including display text (getOptionLabel, extract by propConfig.labelKey, if no match is found, try item.label and item.name in turn), bound value (getOptionValue, extract by propConfig.valueKey, if no match is found, try item.value and item.id in turn), unique identifier (getOptionKey, extract by propConfig.keyKey, if no match is found, try item.id and item.value in turn), and description information (getOptionDesc, extract by propConfig.descKey, if no match is found, try item.description in turn). The above extraction process provides a fallback mechanism (i.e., if the configuration field name does not match, try common field names in turn).

[0089] Step S6, update the option list and pagination status management: S6-1: Determine the current requested page number. If it is the first page (page=1), directly replace the option list with the search results. If it is a pagination (page>1), append the search results to the end of the existing option list. S6-2, determine if there is more data. If it is in pagination mode and the current amount of returned data is greater than or equal to the number of pages (apiConfig.pageSize), then hasMore is true. If it is in non-pagination mode, then hasMore is false. S6-3 triggers the search completion event (search event), notifying the upper-level component that the search has been completed. The callback parameters include the search keywords (query), the transformed data (transformedResult), and the current page number (page).

[0090] Step S7, scroll loading (optional, requires enableScrollLoad=true and usePagination=true): S7-1 binds a scroll listener when the dropdown expands, and uses the scroll container lookup function (findScrollContainer, which is the function to find the DOM element of the scroll container of the currently visible dropdown) to find the visible scroll container of the dropdown. It identifies the scroll container DOM structure of Element UI, Element Plus, and Ant Design, and uses a retry mechanism (up to 10 times, with an interval of 100ms each time) to ensure that the container has been rendered. S7-2, listen for scroll events and wheel events, calculate the scroll position (scrollHeight - scrollTop - clientHeight), and determine if the distance from the bottom is less than or equal to 10px; S7-3: Determine the loading conditions. If more data exists (hasMore=true) and the current page loading state is not in (pageLoading=false), then trigger loadMore; otherwise, continue listening. S7-4, when executing "Load More", the current page number (currentPage) is incremented by 1 and then steps S3 to S6 are executed to load the next page of data. The scroll listener is automatically removed when the drop-down list is closed.

[0091] Step S8, Options Keep and Resource Cleanup: S8-1, in multi-select mode, the option is maintained by the option retention function (ensureOptionsExist, which is a function that ensures that the option object corresponding to the selected value exists in the option list). When the externally bound selected value changes, it checks whether the option list contains the corresponding option object. If it is missing, the selected value is automatically converted into an option object and added to the option list to ensure that the selected value always has a corresponding option to be displayed. S8-2 triggers a selection change event. In single-selection mode, it returns the selected value and the corresponding option object. In multi-selection mode, it returns an array of selected values ​​and an array of corresponding option objects. S8-3 performs resource cleanup when components are destroyed, removes scroll listeners (scroll events and wheel events), clears debouncing timers (via the timer variable in the closure), and prevents memory leaks.

[0092] In some embodiments, the remote search method provided in this application involves four modules: Module M1 is a shared logic module containing common business logic independent of the front-end framework. Specifically, module M1 includes an APIClient wrapper (api.js), a utility function set (utils.js), and constant configuration (constants.js). The APIClient wrapper is used to create HTTP request client classes, providing get, post, and request methods. It can preferentially use the custom request function passed in by the developer; if not passed in, it uses the built-in axios request logic (selecting axios.get or axios.post, etc., based on the method parameter). The purpose of this module is to decouple the HTTP request sending mechanism from the search business logic, allowing the search module to only construct the request configuration object without needing to concern itself with the specific implementation of request sending. The utility function set includes a debouncing function (debounce, which takes the function to be executed fn and the delay time delay, and returns the debouncing wrapped function; internally, it uses setTimeout to delay execution, clearing the previous timer with each call to ensure that it only executes once after the delay time ends after the last input), a path value extraction function (getValueByPath, which takes the source object obj and the path string path such as "data.list", breaks down the path into an array of key names, traverses the source object level by level to extract the target value, and returns null if the key does not exist at any level in the path), and a data transformation function (transformData, which takes the raw data array data and the propConfig configuration object, detects the array element type, and automatically converts it to {valueKey: item, labelKey:} if it is a string or number). The functions include: an array of objects in the format item.toString(), which retains the original format if the object is an object; a response data extraction function (extractDataFromResponse, which receives the API response object response and the responsePath path string; if responsePath is configured, it extracts the target data through getValueByPath; if not configured, it attempts to extract array data from response.data and response itself in turn); and a scroll container search function (findScrollContainer, which searches for the currently visible dropdown scroll container DOM element, and checks the scroll container structures of Element UI's .el-select-dropdown__wrap, Element Plus's .el-select__popper, and Ant Design's .rc-virtual-list in turn).Constant configuration is used to define default apiConfig and propConfig configuration objects as well as component event name constants, providing a unified default value and naming convention.

[0093] Module M2 is a configuration-based adaptation module that can parse and use a dual configuration system: the interface configuration object (apiConfig) and the property mapping configuration object (propConfig). Specifically, module M2 includes interface configuration parsing (M2-1) and field mapping configuration parsing (M2-2). Interface configuration parsing is used during the search request construction phase to read parameters from the apiConfig object, such as the interface address (url), request method (method), search parameter key name (paramsKey), page number parameter key name (pageKey), number of pages per page parameter key name (pageSizeKey), number of pages per page (pageSize), and extra fixed parameters (extraParams). It dynamically constructs a request parameter object according to the configured values. paramsKey determines the parameter name for the search keyword (e.g., keyword / q / search), pageKey / pageSizeKey determine the pagination parameter name (e.g., pageNum / page / currentPage, pageSize / rows / limit), and responsePath determines the path for extracting response data (e.g., data.list / result.items). The purpose of this module is to adapt to different backend interfaces through configuration rather than code modification. The field mapping configuration parsing is used to read parameters such as the display text field name (labelKey), bound value field name (valueKey), unique identifier field name (keyKey), and description information field name (descKey) from the propConfig object during the data processing phase. It extracts the values ​​of the corresponding fields from the data object returned by the backend according to the configuration values. Each mapping function provides a fallback mechanism (when the configuration field name does not match, it tries common field names in turn, such as trying item.label and item.name when labelKey does not match). The role of this module is to adapt to different data field names by modifying them through configuration rather than code.

[0094] Module M3 is the search and pagination management module, which manages the entire remote search process and pagination status. Specifically, module M3 includes debouncing search triggering (M3-1), automatic pagination status management (M3-2), and scroll load detection (M3-3). Debouncing search triggering delays the search execution after the user enters keywords using a debouncing wrapper function. The debouncing delay time is controlled by the `debounceDelay` parameter (default 300ms). Empty input triggers initial data loading (`isFocusLoad=true`) without adding search keyword parameters. If the input length is less than `minSearchLength`, the option list is cleared. This module aims to reduce the frequency of invalid requests and provide a smooth search experience. Automatic pagination state management automatically maintains the current page number (currentPage, initially 1), whether there is more data (hasMore, initially true), page loading status (pageLoading, to prevent concurrent requests), and last search keyword (lastSearchQuery, used to maintain search conditions when paginating). Each new search resets currentPage to 1 and hasMore to true, and currentPage increments by 1 when paginating. This module transforms pagination state management from manual maintenance by the developer to automated management by the component. Scroll loading detection binds scroll and wheel event listeners when the dropdown expands, calculating the scroll position (scrollHeight - scrollTop - clientHeight) in real time. When the distance from the bottom is less than or equal to 10px, hasMore is true, and pageLoading is false, loadMore is automatically triggered to load the next page. A retry mechanism (maximum 10 times, 100ms interval) ensures the dropdown DOM has been rendered before binding the listener. The listener is automatically removed when the dropdown is closed. This module provides a click-free pagination loading experience.

[0095] Module M4 is the adaptive data processing module, handling the fully automatic transformation from backend data to UI options. Specifically, module M4 includes nested response path extraction (M4-1), automatic data type conversion (M4-2), and field mapping conversion (M4-3). Nested response path extraction uses the `getValueByPath` function to automatically extract data from multi-level paths separated by dots, adapting to the nested response structures of different backend services. Automatic data type conversion uses the `transformData` function to detect the data element type and automatically convert strings or numbers to object formats, adapting to the data return formats of different backend services. Field mapping conversion uses `propConfig` configuration to map arbitrary field names to a unified label / value / key / desc structure and provides a fallback mechanism to adapt to the field naming conventions of different backend services.

[0096] In some embodiments, to facilitate understanding of the framework adaptation layer, the framework adaptation layer will be introduced again below: the framework adaptation layer may include the Vue2 adaptation layer, the Vue3 adaptation layer, and the React adaptation layer.

[0097] The Vue 2 adapter layer uses the Options API syntax, which includes returning reactive data via `data()`, creating computed properties via `computed`, creating listeners via `watch`, defining methods via `methods`, and managing the lifecycle via `created` and `beforeDestroy`. UI components use the `el-select` component from the Element UI component library and have the `remote`, `filterable`, and `remote-method` properties set. The Vue 2 adapter layer triggers events via `this.$emit` and sends requests via `this.$axios` (axios is typically mounted on the Vue instance in Vue 2 projects). Scroll listeners are removed in `beforeDestroy` when components are destroyed.

[0098] The Vue 3 adapter layer uses the Composition API syntax, including creating reactive references via `ref`, computed properties via `computed`, listeners via `watch`, and managing lifecycles via `onMounted` and `onBeforeUnmount`. UI components use the `el-select` component from the Element Plus component library, with the `remote`, `filterable`, and `remote-method` properties set. The Vue 3 adapter layer triggers events via the `emit` function, sends requests directly via axios, and removes scroll listeners in `onBeforeUnmount` when the component is destroyed.

[0099] The React adapter layer uses Hooks syntax, including managing state through `useState`, handling side effects through `useEffect`, and caching functions through `useCallback`. UI components use the `Select` component from the Ant Design component library, with `showSearch`, `allowClear`, `filterOption=false`, and `onSearch` properties set. The React adapter layer triggers events through prop callback functions (such as `onChange`, `onSearch`, and `onFocus`), sends requests directly through axios, handles `initialData` listening and value synchronization in `useEffect`, and React automatically cleans up side effects when the component is destroyed.

[0100] The three adaptation layers mentioned above are completely identical in the search process (i.e., steps S1 to S8), differing only in the responsive state management method and the selection of UI components. The core business logic is provided by the shared logic layer.

[0101] In some embodiments, such as Figure 4 As shown, the data processing relationships and execution order among the above modules are as follows: When a user enters keywords in the search box, the system first enters the debouncing search triggering stage of module M3 (search and pagination management module). The system will wait for a configurable delay time (default 300 milliseconds) and check whether the input length meets the minimum search length requirement, thereby filtering out invalid or too frequent requests. After the debouncing is successful, the process enters the interface configuration parsing stage of module M2 (configuration adaptation module). The system reads parameters such as `url`, `method`, `paramsKey`, `pageKey`, `pageSizeKey`, and `extraParams` from the `apiConfig` configuration object, and dynamically constructs a complete request object containing search keywords, current page number, number of items per page, and other fixed parameters according to the configuration values. The process then moves to the APIClient request sending of module M1 (shared logic module). The system prioritizes using the custom request function passed in by the developer. If no custom function is available, the built-in axios client is used to send the request to the backend service according to the configured request method (GET / POST / PUT). After the backend returns response data, the process enters the nested response path extraction of module M4 (data adaptive processing module). The system uses the `getValueByPath` function to extract the raw data array from the response object according to the `responsePath` configuration (such as `data.list` or `result.items`). If no path is configured, it will automatically try to extract from `response.data` or `response` itself. After the raw data is extracted, it enters the M4 data type automatic conversion stage. The system uses the `transformData` function to detect the data element type. If it is a string or a number array, it is automatically converted into an object array in the format `{valueKey: item,labelKey: item.toString()}`. If it is an object array, it retains the original format. Next, the system enters the field mapping and transformation stage of M4. Through the `labelKey`, `valueKey`, `keyKey`, and `descKey` parameters in the `propConfig` configuration, the system extracts the corresponding field values ​​from each data object and, with the help of the fallback mechanism (trying common field names such as `label`, `name`, `id`, etc. in turn when the configuration field does not match), converts all data into a standardized option format. After the data conversion is complete, the process returns to the option list update in module M3. The system determines the page number based on the current request—if it is the first page, the entire option list is directly replaced; if it is a page, the search results are appended to the end of the existing list. At the same time, the pagination status of M3 is automatically managed and updated with internal states such as `currentPage` and `hasMore`, and it determines whether there is more data based on whether the amount of returned data has reached `pageSize`. Next, the scroll loading detection phase of M3 is entered (this phase is an optional function, requiring `enableScrollLoad` and `usePagination` to both be true). The system uses the `findScrollContainer` function to find the scroll container of the drop-down list, binds a scroll listener, and when the user scrolls to the bottom and `hasMore` is true and `pageLoading` is false, `loadMore` is automatically triggered. After the page number is incremented, the system returns to the M2 configuration parsing phase and executes the subsequent process in a loop to load the next page of data. Once a complete search request is completed, the process enters the event triggering stage of module M1. The system triggers the `search` event to notify the upper-level component. The callback parameters include the search keywords, the converted data, and the current page number. When a user makes a selection, the options in M3 are retained, especially in multi-select mode. The system uses the `ensureOptionsExist` function to ensure that the option object corresponding to the selected value always exists in the option list. If it is missing, the selected value is automatically converted into an option object to fill it in. Finally, when the component is destroyed, M3 performs resource cleanup. The system removes the scroll listener (scroll / wheel event), clears the debouncing timer, prevents memory leaks, and ensures that the component exits cleanly.

[0102] In some embodiments, the remote search method provided in this application can be presented as a search selector interface on the product side. Users can enter keywords in the search input box, and the drop-down list can display matching results in real time; each item in the option list can display the main label text and optional description information; in single-selection mode, the user clicks on an option to select it, and in multi-selection mode, the selected options can be displayed as labels in the input box; when there are many options, scrolling to the bottom will automatically load more options (without needing to click the "Load More" button); a "Searching..." prompt can be displayed during the search process; a "No data available" prompt can be displayed when there are no matching results; users can clear the selected content with one click by clicking the clear button.

[0103] On the technical side, after each user enters a keyword, the system executes the following data processing flow: a 300ms debouncing wait to reduce invalid requests; constructing request parameters (e.g., keyword is 'q', pageNum is 1, pageSize is 10, extraParams is {type:'city'}) to achieve configurable parameter mapping; sending an HTTP POST request to / api / search via APIClient; receiving response data from the backend (e.g., {code:0, data:{list:[{id:1, name:'City1',code:'bj'}], total:50}}); extracting data.list based on the response data path to achieve nested path extraction; mapping fields via propConfig (e.g., name mapped to labelKey, code mapped to valueKey, id mapped to keyKey); updating the option list to achieve reactive state updates; and triggering the search event for upper-layer components to listen to.

[0104] Figure 5 A schematic diagram of a remote search device provided in an embodiment of this application. For example... Figure 5 As shown, the remote search device 200 includes: The input acquisition module 210 is used to acquire input data into the search box through a target front-end framework among multiple front-end frameworks; The data request module 220 is used to send search requests to the backend service and receive response data returned by the backend service based on the input data and through the remote search logic common to multiple frontend frameworks in the shared logic layer. The response rendering module 230 is used to render the dropdown list of the search box through the target front-end framework based on the response data.

[0105] In some embodiments, the data request module 220 is specifically used for: Load the interface configuration object; By configuring the interface object, the input data is mapped to the data format corresponding to the backend service to obtain the search request; Send the search request to the backend service; The interface configuration object is used to configure the parameter format of the corresponding interface request for the backend service.

[0106] In some embodiments, the parameters configured by the interface configuration object include at least one of the following: The backend service's interface address, the search request method, the parameter names of the input data in the search request, the number of data records returned in a single request, the response data path, the parameter names of each page number in the search request, the parameter names of the number of data records per page in the search request, the field names corresponding to the total number of records in the response data, any additional request parameters that need to be carried, and the indicator parameters for whether pagination is enabled.

[0107] In some embodiments, the response rendering module 230 is specifically used for: Extract the raw data from the response data; Convert the original data into original data under the preset data type; By configuring the field mapping relationship contained in the attribute mapping configuration object, the data fields of the converted original data are mapped to the fields under the corresponding preset option format of the drop-down list; The target front-end framework renders the mapped raw data into the dropdown list.

[0108] In some embodiments, the response rendering module 230 is specifically used for: Based on the response data path, extract the original data from the response data. The response data path is a multi-level path separated by dots. In the response data path, each level of the path corresponds to a field name of a level in the response data.

[0109] In some embodiments, the remote search device 200 further includes a performance optimization module for: Integrate search performance optimization strategies into the shared logic layer; Enable or adjust the configuration parameters corresponding to the performance optimization strategy; Based on the configuration parameters, control the enabling or execution conditions of the corresponding remote search process; The search performance optimization strategies include at least one of the following: debouncing, minimum search length filtering, pagination management, and scrolling loading of dropdown lists.

[0110] In some embodiments, the remote search device 200 further includes a matching storage module for: Check if there is response data in the storage unit that matches the input data. The storage unit is used to store historical input data and corresponding historical response data. If matching response data exists in the storage unit, the matching response data will be rendered to the dropdown list through the target front-end framework; If no matching response data is found in the storage unit, the system executes a remote search logic common to multiple front-end frameworks in the shared logic layer, based on the input data, to send a search request to the backend service and receive the response data returned by the backend service.

[0111] It should be understood that the device embodiments and method embodiments can correspond to each other, and similar descriptions can be referred to the method embodiments. To avoid repetition, further details will not be provided here. Specifically, Figure 5 The apparatus 200 shown can execute the above-described method embodiments, and the aforementioned and other operations and / or functions of each module in the apparatus 200 are respectively for implementing the corresponding processes in the above-described methods. For the sake of brevity, they will not be described in detail here.

[0112] The apparatus 200 of this application embodiment has been described above from the perspective of functional modules in conjunction with the accompanying drawings. It should be understood that this functional module can be implemented in hardware, in software instructions, or in a combination of hardware and software modules. Specifically, the steps of the method embodiments in this application can be completed by integrated logic circuits in the processor's hardware and / or by software instructions. The steps of the method disclosed in this application embodiment can be directly embodied as being executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. Optionally, the software module can be located in a mature storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps in the above method embodiments.

[0113] Figure 6 A schematic diagram of an electronic device provided in an embodiment of this application.

[0114] like Figure 6 As shown, the electronic device 300 may include: The system includes a memory 310 and a processor 320. The memory 310 stores computer programs and transfers the program code to the processor 320. In other words, the processor 320 can retrieve and run the computer program from the memory 310 to implement the methods described in the embodiments of this application.

[0115] For example, the processor 320 can be used to execute the above-described method embodiments according to instructions in the computer program.

[0116] In some embodiments of this application, the processor 320 may include, but is not limited to: General-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0117] In some embodiments of this application, the memory 310 includes, but is not limited to: Volatile memory and / or non-volatile memory. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DR RAM).

[0118] In some embodiments of this application, the computer program may be divided into one or more modules, which are stored in the memory 310 and executed by the processor 320 to perform the method provided in this application. The one or more modules may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the electronic device.

[0119] like Figure 6 As shown, the electronic device may also include: Transceiver 330, which can be connected to processor 320 or memory 310.

[0120] The processor 320 can control the transceiver 330 to communicate with other devices; specifically, it can send information or data to other devices or receive information or data sent by other devices. The transceiver 330 may include a transmitter and a receiver. The transceiver 330 may further include antennas, and the number of antennas may be one or more.

[0121] It should be understood that the various components in the electronic device are connected through a bus system, which includes a data bus, a power bus, a control bus, and a status signal bus.

[0122] This application also provides a computer storage medium storing a computer program thereon, which, when executed by a computer, enables the computer to perform the methods of the above-described method embodiments. Alternatively, embodiments of this application also provide a computer program product containing instructions that, when executed by a computer, cause the computer to perform the methods of the above-described method embodiments.

[0123] When implemented using software, it can be implemented entirely or partially as a computer program product. This computer program product includes one or more computer instructions. When these computer program instructions are loaded and executed on a computer, the computer can perform all or part of the corresponding processes in the methods of the embodiments of this application, producing the functions achievable by the methods of the embodiments of this application. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., digital video discs (DVDs)), or semiconductor media (e.g., solid state disks (SSDs)).

[0124] Those skilled in the art will recognize that the modules and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0125] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or modules may be electrical, mechanical, or other forms.

[0126] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. For example, the functional modules in the various embodiments of this application may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.

[0127] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.

Claims

1. A remote search method, characterized in that, include: The input data is obtained from the target front-end framework among multiple front-end frameworks and then entered into the search box. Based on the input data, a search request is sent to the backend service and the response data returned by the backend service is received through the remote search logic common to the multiple frontend frameworks in the shared logic layer; Based on the response data, the dropdown list of the search box is rendered through the target front-end framework.

2. The method according to claim 1, characterized in that, The step of sending a search request to the backend service based on the input data, through the remote search logic common to the multiple frontend frameworks in the shared logic layer, includes: Load the interface configuration object; The input data is mapped to the data format corresponding to the backend service through the interface configuration object to obtain the search request; The search request is sent to the backend service; The interface configuration object is used to configure the parameter format of the interface request corresponding to the backend service.

3. The method according to claim 2, characterized in that, The parameters configured in the interface configuration object include at least one of the following: The interface address of the backend service, the request method of the search request, the parameter name of the input data in the search request, the number of data records returned in a single request, the response data path, the parameter name of each page number in the search request, the parameter name of the number of data records per page in the search request, the field name corresponding to the total number of records in the response data, the additional request parameters that need to be carried, and the indicator parameter for whether pagination is enabled.

4. The method according to claim 1, characterized in that, The step of rendering the dropdown list of the search box through the target front-end framework based on the response data includes: Extract the original data from the response data; Convert the original data into original data under a preset data type; By configuring the field mapping relationship contained in the attribute mapping configuration object, the data fields of the converted original data are mapped to the fields under the corresponding preset option format of the drop-down list; The target front-end framework renders the mapped raw data onto the dropdown list.

5. The method according to claim 4, characterized in that, The step of extracting the original data from the response data includes: Based on the response data path, the original data is extracted from the response data, wherein the response data path is a multi-level path separated by dots; In this context, each level of the response data path corresponds to a field name of a level in the response data.

6. The method according to any one of claims 1-5, characterized in that, Also includes: Integrate search performance optimization strategies into the shared logic layer; Enable or adjust the configuration parameters corresponding to the performance optimization strategy; Based on the configuration parameters, control the activation or execution conditions of the corresponding remote search process; The search performance optimization strategies include at least one of the following: debouncing, minimum search length filtering, pagination management, and scrolling loading of drop-down lists.

7. The method according to any one of claims 1-5, characterized in that, Also includes: Check whether there is response data in the storage unit that matches the input data. The storage unit is used to store historical input data and corresponding historical response data. If the matching response data exists in the storage unit, the matching response data is rendered to the drop-down list through the target front-end framework; If the matching response data is not found in the storage unit, then the process of sending a search request to the backend service and receiving the response data returned by the backend service is executed based on the input data and through the remote search logic common to the multiple frontend frameworks in the shared logic layer.

8. A remote search device, characterized in that, include: The input acquisition module is used to acquire input data into the search box from the target front-end framework among multiple front-end frameworks; The data request module is used to send a search request to the backend service and receive the response data returned by the backend service based on the input data and through the remote search logic common to the multiple frontend frameworks in the shared logic layer. The response rendering module is used to render the drop-down list of the search box through the target front-end framework based on the response data.

9. An electronic device, characterized in that, include: processor; as well as Memory for storing the executable instructions of the processor; The processor is configured to execute the method of any one of claims 1-7 by executing the executable instructions.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1-7.