Model segmentation retrieval method and device based on multiple data sources and medium
By receiving user query requests in the low-code development platform, determining multiple data sources and performing segmented processing, the problem of low data query efficiency of multi-source model is solved, efficient query and optimized resource utilization are achieved, and development efficiency and user experience are improved.
Patent Information
- Application Number
- CN202510160766.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-13
- Publication Date
- 2025-05-13
AI Technical Summary
When existing low-code development platforms process multi-source model data, it is difficult to achieve efficient querying, resulting in a decrease in query speed and excessive system resource usage, which affects development efficiency and user experience.
By receiving user query requests, multiple data sources that meet the target model data in each data source are determined, and segmented processing is performed, the starting index and number of fetches are calculated, the data source query order is optimized, and unnecessary data transmission and processing are reduced.
It improves the front-end response speed, optimizes the user experience, supports efficient cross-data source query, improves development efficiency, reduces system resource consumption, and ensures stable system operation.
Smart Images

Figure CN119988433A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a model segmentation retrieval method, device and medium based on multiple data sources. Background Art
[0002] In the field of low-code modeling, application development platforms provide developers with an efficient R&D environment. By integrating model data from different sources, developers can quickly build and deploy application systems. With the continuous development of business systems, the functions are becoming more and more complex, and the amount and types of model data are also increasing. These model data usually come from multiple data sources, such as local files, design time and runtime data in databases, and model data pushed by third parties. Developers need to frequently query and reference these model data during the development process to complete the implementation of business functions.
[0003] However, existing low-code development platforms face significant technical challenges when processing multi-source model data. First, because model data is scattered across multiple data sources, it is difficult for developers to accurately obtain the data they need to display from the database through a single query statement. Usually, developers can only query all data based on simple conditions, and then perform keyword filtering and paging queries in memory. This method will cause a significant decrease in query speed in the case of large amounts of data, and it is difficult to meet developers' requirements for page response speed, especially in scenarios with high real-time requirements.
[0004] Secondly, due to the strict requirements on the accuracy of model data, each query needs to obtain data from the data source in real time. This leads to frequent transmission and filtering of large amounts of data between the database and system memory, which not only occupies a large amount of system resources, but also may affect the normal development and use of other business functions, thereby reducing overall development efficiency and user experience.
[0005] In addition, when developers use the integrated development environment (IDE) of the low-code development platform for development, they usually need to reference model data from different data sources to complete business functions. Since the query and selection of the model are mainly oriented to business functions without distinguishing the data source, when the front end displays the data, it will query all the metadata that meets the query conditions from different data sources. When the amount of data is large, the front-end interface is prone to freeze during the rendering process, further affecting development efficiency and user experience. Summary of the invention
[0006] The embodiments of the present application provide a model segmentation retrieval method, device and medium based on multiple data sources to solve the above-mentioned technical problems.
[0007] On the one hand, an embodiment of the present application provides a model segmentation retrieval method based on multiple data sources, the method comprising: receiving a user's query request, and determining, according to the query request, multiple data sources in each data source that meet the query conditions corresponding to the target model data; wherein the query request includes the query conditions and paging parameters; segmenting the multiple data sources, dividing each data segment after the division into a corresponding unique identifier, and calculating the starting index of the target model data according to the paging parameters, and determining the starting data source; calculating the starting index and the number of data fetches corresponding to each data source to search in the corresponding data source, and caching the retrieval results in the memory; performing keyword filtering and sorting on the retrieval results in the cache to generate a final query result, and returning the final query result to the front end for display.
[0008] In one implementation of the present application, the starting index of the target model data is calculated according to the paging parameters, and the starting data source is determined, specifically including: calculating the starting index corresponding to the target model data according to the page number and the number of single-page entries in the paging parameters, and when the starting index is less than or equal to the number of design-time metadata, determining the starting data source to be the design-time metadata; when the starting index is greater than the number of design-time metadata, and less than or equal to the sum of the number of design-time metadata and platform runtime metadata, determining the starting data source to be the platform runtime metadata; when the starting index is greater than the sum of the number of design-time metadata and platform runtime metadata, and less than or equal to the sum of the number of design-time metadata, platform runtime metadata and customer-customized metadata, determining the starting data source to be customer-customized metadata.
[0009] In one implementation of the present application, the starting index and the number of data fetches corresponding to each data source are calculated, specifically including: when the starting data source matches the number of data fetches, determining the starting index corresponding to the current data source as the starting index of the target model data, and determining the number of data fetches as the number of single-page entries; when the starting data source does not match the number of data fetches, determining the starting index of the current data source as the starting index of the target model data, and determining the number of data fetches as the specified number; for the next data source of the current data source, determining the starting index of the next data source as 0, and determining the number of data fetches as the difference between the number of single-page entries and the specified number.
[0010] In one implementation of the present application, multiple data sources are segmented and each data segment is divided into a corresponding unique identifier, specifically including: according to a preset segmentation rule, the data in each data source is divided into multiple data segments, and corresponding metadata information is generated for each data segment; wherein the metadata information includes the data segment identifier, the data segment size, the data segment type, and the data source information to which the data segment belongs.
[0011] In one implementation of the present application, after receiving a query request from a user and determining, based on the query request, multiple data sources in each data source that meet the query conditions corresponding to the target model data, the method also includes: determining, based on historical records, the user usage frequency corresponding to each data source in the multiple data sources; and sorting the multiple data sources according to the user usage frequency to determine the query priority corresponding to the multiple data sources.
[0012] In one implementation of the present application, a search is performed in the corresponding data source, and the search results are cached in the memory, specifically including: for each data source, a sub-query request corresponding to the data source is generated according to the starting index and the number of data fetched corresponding to the data source, and the sub-query request is distributed to the corresponding data source; the search results returned by the data source are received, and the search results are merged; the merged search results are cached in the memory, and expired search results in the cache are periodically cleared based on the timestamp.
[0013] In one implementation of the present application, keyword filtering and sorting are performed on the search results in the cache to generate a final query result, which specifically includes: determining the keywords in the query conditions, and filtering the search results in the cache based on the keywords; sorting the filtered search results according to preset sorting rules to generate the corresponding final query results.
[0014] In one implementation of the present application, based on a query request, multiple data sources that meet the query conditions corresponding to the target model data are determined in each data source, specifically including: determining the multiple data sources involved in the target model data based on the model type and data source identifier in the query conditions; if the data source identifier is not specified, retrieving the target model data from all available data sources.
[0015] On the other hand, the embodiment of the present application further provides a model segmentation retrieval device based on multiple data sources, the device comprising:
[0016] at least one processor;
[0017] and, a memory communicatively coupled to the at least one processor;
[0018] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute a model segmentation retrieval method based on multiple data sources as described above.
[0019] On the other hand, an embodiment of the present application further provides a non-volatile computer storage medium storing computer executable instructions, which, when executed, implement a model segmentation retrieval method based on multiple data sources as described above.
[0020] The present application provides a model segmentation retrieval method, device and medium based on multiple data sources, which at least have the following beneficial effects:
[0021] 1. Improve the front-end response speed and optimize the user experience: When querying a multi-data source model on a traditional low-code development platform, since the data source is not distinguished and a full query is performed, when the amount of data is huge, the front-end interface rendering is very likely to be stuck. Based on the front-end paging information, the present invention clarifies the data source to be queried and the amount of data returned before the query, avoiding deserialization and filtering operations of large amounts of data in memory. This enables developers to quickly obtain correct and effective model data, greatly improves the response speed of the front-end interface, and significantly improves the user experience of developers when using the low-code development platform IDE for development, making the development process smoother and more efficient.
[0022] 2. Accurately adapt to multiple data sources and enhance data acquisition flexibility: The present invention has the ability to adapt to multiple model data sources, including locally developed metadata files, runtime metadata developed and deployed by the team, metadata customized and extended at runtime, and metadata pushed by IDP. This feature enables the low-code development platform to respond flexibly to complex and diverse data sources, whether it is design-time metadata in the personal development stage, or team collaboration, runtime extension, and externally pushed data, it can be effectively integrated and utilized to provide developers with comprehensive data support and meet the data needs in different development scenarios.
[0023] 3. Support efficient query across data sources and improve development efficiency: During the IDE development process of the low-code development platform, developers often need to reference models from different data sources to complete business functions. The present invention supports keyword filtering queries and paging queries across data sources. Developers do not need to perform tedious query operations in multiple data sources separately, nor do they need to manually integrate data from different data sources. Through simple query instructions, eligible model data can be quickly located, and data can be gradually acquired according to paging requirements, which greatly saves development time, improves development efficiency, and speeds up the realization of business functions.
[0024] 4. Optimize resource utilization and ensure stable system operation: Traditional model data query methods, due to the frequent transmission and filtering of large amounts of data between the database and system memory, seriously occupy system resources and may affect the normal development and use of other business functions. The model segmented retrieval mechanism of the present invention reduces unnecessary data transmission and processing, reduces the consumption of system resources, ensures the stable operation of the system, avoids interference with other businesses due to data query operations, and ensures the efficient and stable operation of the entire low-code development platform through reasonable arrangement and precise query of data sources.
[0025] 5. Optimize query order based on user frequency to meet actual needs: The present invention prioritizes data sources according to user usage frequency, and queries all metadata in the order of local design metadata, platform-provided runtime metadata, and customer-customized metadata. This optimization based on actual usage enables developers to prioritize data with higher usage frequency when querying data, further improving the efficiency of data acquisition, better meeting the actual needs of low-code development, and providing developers with more convenient and efficient data query services. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0027] Figure 1 A schematic diagram of a flow chart of a model segmentation retrieval method based on multiple data sources provided in an embodiment of the present application;
[0028] Figure 2 A schematic diagram of the internal structure of a model segmentation retrieval device based on multiple data sources provided in an embodiment of the present application. DETAILED DESCRIPTION
[0029] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0030] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.
[0031] Figure 1 A flowchart of a model segmentation retrieval method based on multiple data sources provided in an embodiment of the present application.
[0032] The analysis method involved in the embodiments of the present application may be implemented by a terminal device or a server, and the present application does not impose any special restrictions on this. For the convenience of understanding and description, the following embodiments are described in detail by taking a server as an example.
[0033] It should be noted that the server may be a single device or a system consisting of multiple devices, that is, a distributed server, and this application does not make any specific limitation on this.
[0034] like Figure 1As shown, the embodiment of the present application provides a model segmentation retrieval method based on multiple data sources, including:
[0035] Step 101: Receive a query request from a user, and determine, according to the query request, multiple data sources that meet the query conditions corresponding to the target model data in each data source.
[0036] First of all, it should be noted that the query request in the embodiment of the present application includes query conditions and paging parameters.
[0037] In one embodiment of the present application, in order to implement segmented model retrieval based on multiple data sources, after receiving a user's query request, multiple data sources that meet the query conditions corresponding to the target model data are determined in each data source according to the query request.
[0038] Specifically, the multiple data sources involved in the target model data are determined according to the model type and data source identifier in the query condition; if the data source identifier is not specified, the target model data is retrieved from all available data sources.
[0039] Furthermore, based on historical records, the user usage frequency corresponding to each data source in the multiple data sources is determined; according to the user usage frequency, the multiple data sources are sorted to determine the query priority corresponding to the multiple data sources; wherein the query priority is: design-time metadata>platform runtime metadata>customer-customized metadata.
[0040] In one embodiment, the server of the low-code development platform continuously listens for user operations from the front-end development environment (such as IDE). When the developer initiates a model data query operation on the interface, the system receives a query request containing query conditions and paging parameters. For example, the developer is building a customer relationship management system and needs to obtain customer model data. The query condition may be set to "the customer type is an enterprise customer and the region is East China", and the paging parameter is set to "the page number is 2, and the number of items per page is 10". After receiving the request, the system parses the model type and data source identifier (if specified) in the query condition. If the data source identifier is not specified, the system retrieves the target model data from all available data sources, namely the design-time metadata stored in the local file, the platform runtime metadata in the database, and the customer-customized metadata. Taking customer model data as an example, the local file may store the initially designed customer model framework, the platform runtime metadata of the database contains customer transaction information accumulated in daily business, and the customer-customized metadata may be customer attribute information extended for specific business needs. The system determines the multiple data sources involved by matching the query conditions. For example, if it finds that the platform runtime metadata in the local file and the database both contain data that meets the conditions of "customer type is corporate customer and region is East China", the system will determine these two data sources as the data sources that meet the query conditions corresponding to the target model data.
[0041] In one embodiment, the system will count the usage frequency of each data source in past query operations based on the history record module. The history record module can be a database table that records the data source, query time and other information involved in each query operation. By analyzing these data, the user usage frequency corresponding to each data source in the multiple data sources is determined. For example, after a period of data statistics, it is found that in customer model data queries, the usage frequency of local design metadata is the highest, followed by platform runtime metadata, and the lowest is customer customized metadata.
[0042] According to the statistical results, multiple data sources are sorted according to the rule of design-time metadata > platform runtime metadata > customer-customized metadata to determine the query priority. This means that in the subsequent query process, the system will prioritize the query from the local design-time metadata, which meets the needs of developers for quick acquisition of commonly used data.
[0043] Step 102: segment the multiple data sources, divide each data segment into a corresponding unique identifier, and calculate the starting index of the target model data according to the paging parameters to determine the starting data source.
[0044] In one implementation of the present application, multiple data sources are segmented and each data segment is divided into a corresponding unique identifier, specifically including: according to a preset segmentation rule, the data in each data source is divided into multiple data segments, and corresponding metadata information is generated for each data segment; wherein the metadata information includes the data segment identifier, the data segment size, the data segment type, and the data source information to which the data segment belongs.
[0045] In one implementation of the present application, the starting index of the target model data is calculated according to the paging parameters, and the starting data source is determined, specifically including: calculating the starting index corresponding to the target model data according to the page number and the number of single-page entries in the paging parameters, and when the starting index is less than or equal to the number of design-time metadata, determining the starting data source to be the design-time metadata; when the starting index is greater than the number of design-time metadata, and less than or equal to the sum of the number of design-time metadata and platform runtime metadata, determining the starting data source to be the platform runtime metadata; when the starting index is greater than the sum of the number of design-time metadata and platform runtime metadata, and less than or equal to the sum of the number of design-time metadata, platform runtime metadata and customer-customized metadata, determining the starting data source to be customer-customized metadata.
[0046] In one embodiment, the system processes the determined multiple data sources according to preset segmentation rules. For example, the size of each data segment is set to 100 data records (which can be adjusted according to the actual data volume and performance requirements). Taking the customer model data stored in the local design-time metadata as an example, assuming that there are 500 customer model records in the data source, the system will divide it into 5 data segments. While dividing the data segments, corresponding metadata information is generated for each data segment. These metadata information include a data segment identifier, which is used to uniquely identify the data segment, such as "DS001-01" represents the first data segment of the first data source; the data segment size, which records the number of data records contained in the data segment; the data segment type, indicating whether it is design-time metadata, runtime metadata or customized metadata; and the data source information to which the data segment belongs, such as "local file-customer model design-time metadata". Through these metadata information, the system can quickly locate and manage each data segment.
[0047] In one embodiment, the starting index corresponding to the target model data is calculated based on the page number and the number of single-page entries in the paging parameters. For example, in the above example of "page number is 2, number of single-page entries is 10", the starting index beginIndex = (2-1) × 10 = 10. Next, the system obtains the number of design-time metadata m1, the number of platform runtime metadata m2, and the number of customer-customized metadata m3 (these numbers can be obtained by pre-statistics or real-time query of the data source). Assume that statistics show that the number m1 of design-time metadata that meets the query conditions is 15, the number m2 of platform runtime metadata that meets the conditions is 20, and the number m3 of customer-customized metadata that meets the conditions is 5. Since the starting index 10 is less than or equal to m1 (15), it is determined that the starting data source is the design-time metadata.
[0048] Step 103: Calculate the starting index and the number of data to be retrieved corresponding to each data source, perform a search in the corresponding data source, and cache the search results in the memory.
[0049] In one implementation of the present application, the starting index and the number of data fetches corresponding to each data source are calculated, specifically including: when the starting data source matches the number of data fetches, determining the starting index corresponding to the current data source as the starting index of the target model data, and determining the number of data fetches as the number of single-page entries; when the starting data source does not match the number of data fetches, determining the starting index of the current data source as the starting index of the target model data, and determining the number of data fetches as the specified number; for the next data source of the current data source, determining the starting index of the next data source as 0, and determining the number of data fetches as the difference between the number of single-page entries and the specified number.
[0050] In one implementation of the present application, a search is performed in the corresponding data source, and the search results are cached in the memory, specifically including: for each data source, a sub-query request corresponding to the data source is generated according to the starting index and the number of data fetched corresponding to the data source, and the sub-query request is distributed to the corresponding data source; the search results returned by the data source are received, and the search results are merged; the merged search results are cached in the memory, and expired search results in the cache are periodically cleared based on the timestamp.
[0051] In one embodiment, after determining that the starting data source is the design-time metadata, determine whether the starting data source matches the number of data to be retrieved. Because the number of items on a single page is 10, and the number of data that meets the conditions in the design-time metadata is 15, which meets the number of data to be retrieved, the starting index corresponding to the current data source (design-time metadata) is determined to be 10, and the number of data to be retrieved is 10. If the starting data source does not meet the number of data to be retrieved, for example, if the number of data that meets the conditions in the design-time metadata is only 8, then the starting index of the current data source (design-time metadata) is determined to be 10, and the number of data to be retrieved is 8 (specified number). For the next data source (platform runtime metadata), determine its starting index to be 0, and the number of data to be retrieved is the difference between the number of items on a single page, 10, and the specified number, 8, i.e., 2 items.
[0052] In one embodiment, for each data source, the system generates a subquery request based on the calculated starting index and the number of data to be retrieved. For design-time metadata, the generated subquery request may be "from the customer model design-time metadata in the local file, starting from the 10th record, obtain 10 data that meet the conditions of 'customer type is an enterprise customer and the region is East China'". The system distributes the subquery request to the corresponding data source. After receiving the request, the local file system or database performs a query operation and returns the retrieval result. For example, the local file system returns 10 customer model data records that meet the conditions. The system receives the retrieval results returned by each data source and merges them, and caches the merged retrieval results in memory. In order to ensure the validity of the cached data, the system regularly cleans up expired retrieval results in the cache based on the timestamp. For example, the validity period of the cached data is set to 1 hour, and the cached data that exceeds 1 hour will be deleted to ensure that the latest data is obtained in the next query.
[0053] Step 104: filter and sort the search results in the cache by keywords to generate final query results, and return the final query results to the front end for display.
[0054] In one implementation of the present application, keyword filtering and sorting are performed on the search results in the cache to generate a final query result, which specifically includes: determining the keywords in the query conditions, and filtering the search results in the cache based on the keywords; sorting the filtered search results according to preset sorting rules to generate the corresponding final query results.
[0055] In one embodiment, the system extracts keywords from the query conditions, such as "corporate customers" and "East China region", and filters the search results in the cache according to these keywords to remove data records that do not meet the conditions. Then, according to the preset sorting rules, such as sorting the filtered search results in ascending order by customer number, the corresponding final query results are generated. Finally, the system returns the final query results to the front-end development environment for display, and the developer can see the qualified and sorted customer model data on the IDE interface, such as customer name, contact information, transaction records and other information, which is convenient for subsequent system development work.
[0056] The above is an embodiment of the method proposed in this application. Based on the same inventive concept, the embodiment of this application also provides a model segmentation retrieval device based on multiple data sources, and its structure is as follows: Figure 2 shown.
[0057] Figure 2 The internal structure diagram of a model segmentation retrieval device based on multiple data sources provided in an embodiment of the present application is shown in FIG. Figure 2 As shown, the device includes:
[0058] at least one processor;
[0059] and, a memory communicatively coupled to the at least one processor;
[0060] The memory stores instructions that can be executed by at least one processor, and the instructions are executed by at least one processor to enable the at least one processor to:
[0061] Receive a query request from a user, and determine multiple data sources that meet the query conditions corresponding to the target model data in each data source according to the query request; wherein the query request includes the query conditions and paging parameters;
[0062] Segment the multiple data sources, assign corresponding unique identifiers to each data segment, and calculate the starting index of the target model data according to the paging parameters to determine the starting data source;
[0063] Calculate the starting index and number of data to retrieve for each data source, search the corresponding data source, and cache the search results in memory;
[0064] The search results in the cache are filtered and sorted by keywords to generate the final query results, which are then returned to the front end for display.
[0065] The present application also provides a non-volatile computer storage medium storing computer executable instructions. When the computer executable instructions are executed, they can:
[0066] Receive a query request from a user, and determine multiple data sources that meet the query conditions corresponding to the target model data in each data source according to the query request; wherein the query request includes the query conditions and paging parameters;
[0067] Segment the multiple data sources, assign corresponding unique identifiers to each data segment, and calculate the starting index of the target model data according to the paging parameters to determine the starting data source;
[0068] Calculate the starting index and number of data to retrieve for each data source, search the corresponding data source, and cache the search results in memory;
[0069] The search results in the cache are filtered and sorted by keywords to generate the final query results, which are then returned to the front end for display.
[0070] Each embodiment in this application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0071] The above describes specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0072] The devices and media provided in the embodiments of the present application correspond one-to-one to the methods. Therefore, the devices and media also have similar beneficial technical effects as the corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media will not be repeated here.
[0073] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0074] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0075] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0076] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0077] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0078] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0079] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0080] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0081] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A model segmentation retrieval method based on multiple data sources, characterized in that: The method comprises: Receive a query request from a user, and determine multiple data sources that meet the query conditions corresponding to the target model data in each data source according to the query request; wherein the query request includes the query conditions and paging parameters; Segmenting the multiple data sources, dividing each data segment into a corresponding unique identifier, and calculating the starting index of the target model data according to the paging parameter to determine the starting data source; Calculate the starting index and number of data to retrieve for each data source, search the corresponding data source, and cache the search results in memory; The search results in the cache are filtered and sorted by keywords to generate final query results, which are then returned to the front end for display.
2. According to claim 1, a model segmentation retrieval method based on multiple data sources is characterized in that: Calculating the starting index of the target model data according to the paging parameters and determining the starting data source specifically includes: Calculate the starting index corresponding to the target model data according to the page number and the number of single-page entries in the paging parameters, and determine that the starting data source is the design-time metadata when the starting index is less than or equal to the number of design-time metadata; When the starting index is greater than the number of design-time metadata and less than or equal to the sum of the number of design-time metadata and the platform runtime metadata, determining that the starting data source is the platform runtime metadata; When the starting index is greater than the sum of the design-time metadata quantity and the platform runtime metadata, and less than or equal to the sum of the design-time metadata quantity, the platform runtime metadata and the customer customized metadata, it is determined that the starting data source is the customer customized metadata.
3. The model segmentation retrieval method based on multiple data sources according to claim 1 is characterized in that: Calculate the starting index and number of data points corresponding to each data source, including: When the starting data source matches the number of data fetched, the starting index corresponding to the current data source is determined to be the starting index of the target model data, and the number of data fetched is determined to be the number of entries on a single page; When the starting data source does not match the number of data to be retrieved, determining the starting index of the current data source as the starting index of the target model data, and determining the number of data to be retrieved as the specified number; For the next data source of the current data source, the starting index of the next data source is determined to be 0, and the number of data to be obtained is determined to be the difference between the number of entries on the single page and the specified number.
4. The model segmentation retrieval method based on multiple data sources according to claim 1 is characterized in that: The multiple data sources are segmented to give each segmented data a corresponding unique identifier, specifically including: According to the preset segmentation rules, the data in each data source is divided into multiple data segments, and corresponding metadata information is generated for each data segment; The metadata information includes a data segment identifier, a data segment size, a data segment type, and data source information to which the data segment belongs.
5. The model segmentation retrieval method based on multiple data sources according to claim 1 is characterized in that: After receiving a query request from a user and determining multiple data sources that meet the query conditions corresponding to the target model data in each data source according to the query request, the method further includes: Based on the historical records, determine the user usage frequency corresponding to each data source in the multiple data sources; The multiple data sources are sorted according to the user usage frequency to determine the query priority corresponding to the multiple data sources.
6. A model segmentation retrieval method based on multiple data sources according to claim 1, characterized in that: Search the corresponding data source and cache the search results in memory, including: For each data source, generate a sub-query request corresponding to the data source according to the starting index and the number of data fetched corresponding to the data source, and distribute the sub-query request to the corresponding data source; Receiving the search results returned by the data source and merging the search results; The merged search results can be cached in memory, and expired search results in the cache can be cleaned up regularly based on timestamps.
7. The model segmentation retrieval method based on multiple data sources according to claim 1 is characterized in that: Filter and sort the search results in the cache by keywords to generate the final query results, including: Determine the keywords in the query condition, and filter the search results in the cache according to the keywords; According to the preset sorting rules, the filtered search results are sorted to generate the corresponding final query results.
8. The model segmentation retrieval method based on multiple data sources according to claim 1 is characterized in that: According to the query request, multiple data sources that meet the query conditions corresponding to the target model data are determined in each data source, specifically including: Determine the multiple data sources involved in the target model data according to the model type and data source identifier in the query condition; If the data source identifier is not specified, the target model data is retrieved from all available data sources.
9. A model segmentation retrieval device based on multiple data sources, characterized in that: The device comprises: at least one processor; and, a memory communicatively coupled to the at least one processor; Wherein, the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute a model segmentation retrieval method based on multiple data sources as described in any one of claims 1-8.
10. A non-volatile computer storage medium storing computer executable instructions, characterized in that: When the computer executable instructions are executed, a model segmentation retrieval method based on multiple data sources as described in any one of claims 1 to 8 is implemented.