Method and device for calling file information and medium
By optimizing the file information calling method through the scoring value and selecting the optimal calling path, the problem of poor flexibility in the existing technology is solved, and efficient and accurate data calling and analysis is achieved.
Patent Information
- Application Number
- CN202511181411.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-22
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2045-08-22
AI Technical Summary
Existing technologies have poor flexibility in file information calling, making it difficult to accurately select the optimal calling path, affecting efficiency and data quality.
By calculating the number of data tables and time difference for each combination, the scoring value is used to select the optimal call path, and the call process is optimized by combining the number of fields and the update time of the data table.
It improves the efficiency of file calling and the accuracy of data analysis, reduces the occupation of data computing resources, and ensures the timeliness and comprehensiveness of data.
Smart Images

Figure CN120687414A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of file calling technology, and in particular to a method, device and medium for calling file information. Background Art
[0002] In many fields such as finance, public security, and healthcare, the system usually needs to call information from different fields from multiple data sources - database tables, API interfaces, file storage, etc., and perform combined calculations according to business rules to evaluate the user's status. For example, in the financial field, it is necessary to combine multiple user information to calculate risk scores, and in the public security field, it is necessary to query multiple user data to analyze behavioral trajectories. At present, the commonly used file information calling methods include: the system pre-defines a fixed combination of fields, and selects one of them each time the call is made, but the flexibility is poor, or the calling path is manually specified, but the changes in the data table cannot be accurately known, making it difficult to accurately select the optimal calling path. When the same business goal can be achieved through a combination of multiple fields, the existing technology lacks an automatic evaluation mechanism, which affects the efficiency of file calling and data quality.
[0003] Therefore, there is an urgent need to provide a file information calling method that has high file calling efficiency and is conducive to improving the accuracy of user evaluation. Summary of the Invention
[0004] In response to the above technical problems, the present invention provides a method, device and medium for calling file information. By considering the number of data tables corresponding to each combination and the time difference between different data tables, the efficiency of file calling and the accuracy of data analysis and evaluation are improved from the two dimensions of called data volume and timeliness.
[0005] According to a first aspect of the present invention, a method for calling file information is provided, comprising the following steps: S100, based on several combinations of call fields to be selected in the file information call request text and the identifier of the stored data table corresponding to each call field to be selected obtained in advance, calculate a first selection score value for each combination of call fields to be selected.
[0006] S200, for any call field to be selected, if the stored data table corresponding to the call field to be selected is unique, the corresponding stored data table is determined as the target data table corresponding to the call field to be selected itself; if the stored data table corresponding to the call field to be selected is not unique, the target data table corresponding to the call field to be selected is filtered out.
[0007] S300 , for a plurality of target data tables corresponding to any combination of call fields to be selected, according to the update time of each target data table, calculate a second selection score value corresponding to the combination of call fields to be selected.
[0008] S400 , calculating a final selection score value for each combination of call fields to be selected based on the first selection score value and the second selection score value corresponding to each combination of call fields to be selected.
[0009] S500 , obtaining a plurality of to-be-selected call fields in a to-be-selected call field combination corresponding to the maximum final selection score value, and calling a file where a target data table corresponding to each obtained to-be-selected call field is located.
[0010] According to a second aspect of the present invention, a non-transitory computer-readable storage medium is provided, in which at least one instruction or at least one program is stored. The at least one instruction or the at least one program is loaded and executed by a processor to implement the above-mentioned file information calling method.
[0011] According to a third aspect of the present invention, there is provided an electronic device comprising a processor and the above-mentioned non-transitory computer-readable storage medium.
[0012] The present invention has at least the following beneficial effects: The present invention provides a method for calling file information. First, based on several combinations of call fields to be selected in a file information call request text and identifiers of stored data tables corresponding to each call field to be selected, a first selection score value of each combination is obtained respectively. By analyzing the number of fields corresponding to each combination and the corresponding data table, it is beneficial to reduce the amount of called data while ensuring data comprehensiveness; then, the target data table corresponding to each call field to be selected is determined, and a second selection score value of the combination is obtained according to the update time of each target data table. By considering the time difference between different data tables, the called file has better timeliness; based on the first selection score value and the second selection score value, a final selection score value of each combination of call fields to be selected is obtained, and based on the final selection score value, the combination of call fields to be selected is selected to realize file calling. The present invention takes into account the two dimensions of call data volume and timeliness, which is beneficial to reducing data computing resources and improving file calling efficiency and the accuracy of data analysis and evaluation. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0014] Figure 1The present invention provides a flowchart of a method for calling file information. DETAILED DESCRIPTION
[0015] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making any creative efforts shall fall within the scope of protection of the present invention.
[0016] The present invention provides a method for calling file information, such as Figure 1 As shown, the method includes the following steps: S100. Based on the multiple combinations of fields to be selected in the file information retrieval request text and the pre-acquired identifiers of the stored data tables corresponding to each field to be selected, a first selection score is calculated for each combination of fields to be selected. In this embodiment, there are at least two combinations of fields to be selected. For example, a bank may need to retrieve a user's multi-dimensional data to calculate the user's risk score or conduct asset management. Two combinations of fields are provided: Combination A includes fields such as credit score and transaction volume in the past three months, and Combination B includes fields such as asset valuation, debt ratio, and career stability. The file information retrieval request text also includes instructions for selecting a method and retrieving the required files based on the selected method.
[0017] Furthermore, the identifier of the stored data table corresponding to each to-be-selected call field is obtained through the following steps: S10: Obtain a field-data table storage address mapping table stored in a preset database; the field-data table storage address mapping table is updated in real time. For example, when a new data table is stored for the same field, the mapping table is updated promptly based on the storage location of the new data table.
[0018] S20, searching the data table storage address corresponding to each to-be-selected calling field from the field-data table storage address mapping relationship table, and using the data table storage address corresponding to each to-be-selected calling field as an identifier of the stored data table corresponding to each to-be-selected calling field.
[0019] By establishing a mapping relationship table between field and data table storage address, users can quickly understand the storage address and number of data tables corresponding to each field to be selected and called while occupying very little storage space, which is conducive to screening out more required data tables for calling.
[0020] In a specific embodiment, the first selection score of the to-be-selected call field combination is calculated by the following steps: S101 , assigning an initial score to each combination of call fields to be selected according to the number of call fields to be selected in each combination of call fields to be selected; the initial score is inversely proportional to the number of call fields to be selected.
[0021] In a specific implementation, when the first combination of call fields to be selected includes three call fields to be selected, and the second combination of call fields to be selected includes four call fields to be selected, the initial score of the first combination of call fields to be selected is greater than the initial score of the second combination of call fields to be selected. This embodiment does not limit the specific method for determining the initial score. For example, the specific score setting can be determined based on the inverse of the number of call fields to be selected included in the combination of call fields to be selected.
[0022] S102, based on the stored data tables corresponding to each to-be-selected call field, analyzing the number of to-be-selected call fields in each stored data table that belong to the same to-be-selected call field combination, and determining the minimum number of stored data tables corresponding to each to-be-selected call field combination.
[0023] To facilitate understanding of the solution, an example is given below: the combination of fields to be selected and called corresponds to field one to be selected and called, field two to be selected and called, and field three to be selected and called. The stored data table one contains field one to be selected and called, and field two to be selected and called. The stored data table two contains field one to be selected and called, field two to be selected and called, and field three to be selected and called. The stored data table three contains field two to be selected and called. Only calling the stored data table two can meet the calling requirements, and the number of stored data tables called is minimized.
[0024] S103, assigning a correlation score to each to-be-selected combination of call fields according to the number of stored data tables called at least for each to-be-selected combination of call fields; the correlation score is inversely proportional to the number of stored data tables called at least.
[0025] S104: Determine the sum of the initial score and the associated score corresponding to the to-be-selected call field combination as the first selection score value of the to-be-selected call field combination.
[0026] As mentioned above, the fewer the number of call fields to be selected and the fewer the number of stored data tables to be called, the higher the first selection score value. Through this setting method, the selected combination of call fields to be selected tends to contain fewer call fields and call fewer stored data tables, which is beneficial to improving the file calling efficiency and reducing the computing resources occupied during data analysis.
[0027] S200, for any to-be-selected call field, if the stored data table corresponding to the to-be-selected call field is unique, the corresponding stored data table is determined as the target data table corresponding to the to-be-selected call field itself; if the stored data table corresponding to the to-be-selected call field is not unique, the target data table corresponding to the to-be-selected call field is filtered out; it can be understood that: the stored data table corresponding to the to-be-selected call field is unique means that the to-be-selected call field only exists in one stored data table.
[0028] Specifically, if the stored data table corresponding to the to-be-selected call field is not unique, screening out the target data table corresponding to the to-be-selected call field includes the following steps: S201 : If the stored data table corresponding to the to-be-selected call field is not unique, obtain the data source of each stored data table corresponding to the to-be-selected call field and the preset importance level corresponding to the data source.
[0029] S202, when the number of stored data tables corresponding to the highest preset importance level among the preset importance levels corresponding to each data source is 1, the stored data table corresponding to the highest preset importance level is used as the target data table corresponding to the field to be selected for calling; it can be understood that: the preset importance levels of the multiple data sources corresponding to the field to be selected for calling are high and low, and there is only one data source corresponding to the highest preset importance level.
[0030] S203, when the number of stored data tables corresponding to the highest preset importance level among the preset importance levels corresponding to each data source is greater than 1, based on the number of records under the call field to be selected in each stored data table, the stored data table corresponding to the largest number of records is used as the target data table corresponding to the call field to be selected.
[0031] As mentioned above, when a field to be selected corresponds to multiple stored data tables, priority is given to the data source to which the data table belongs, which has a higher preset importance level, that is, a higher authority level. For example, central bank data is higher than third-party data, which is conducive to calling out more accurate data. If there are multiple data tables corresponding to the highest preset importance level among multiple preset importance levels, the field corresponding to the largest number of records is selected to make the statistical data more comprehensive.
[0032] S300 , for a plurality of target data tables corresponding to any combination of call fields to be selected, according to the update time of each target data table, calculate a second selection score value corresponding to the combination of call fields to be selected.
[0033] Specifically, the second choice score corresponding to the to-be-selected call field combination is calculated through the following steps: S301, traverse all the call fields to be selected in the combination mode of the call fields to be selected, obtain the update timestamp in the target data table corresponding to each call field to be selected, and select the latest update timestamp as the reference time.
[0034] S302, calculating the time difference between the update timestamp of the target data table corresponding to each to-be-selected call field and the reference time; it can be understood that the time difference refers to the length of time between the update timestamp and the reference time.
[0035] S303: Substitute each time difference into a preset exponential decay model, and use the output result as the timeliness score of the corresponding to-be-selected call field.
[0036] Among them, the preset exponential decay model meets the following conditions: , where S i S represents the timeliness score of the i-th field to be selected, max is the preset maximum scoring threshold, λ is the preset attenuation coefficient, ΔT i The time difference between the update timestamp of the target data table corresponding to the i-th selected call field and the reference time. In a specific implementation, the maximum scoring threshold can be set to 100 or 10, and the preset attenuation coefficient is between 0 and 1. Those skilled in the art can set it according to the desired attenuation speed, which will not be detailed here.
[0037] S304: Determine the average value of the timeliness scores of all the call fields to be selected in the call field combination to be selected as the second selection score value corresponding to the call field combination to be selected.
[0038] As mentioned above, when calculating the second-choice score value, not only the update time of the target data table is considered, but also the update time difference between different fields is introduced. The larger the time difference, the more asynchronous the field update. Only data in the same period can be more matched, making the statistical analysis of the data more accurate. Therefore, the second-choice score value is calculated in the above way, which affects the final selection score value of the combination of fields to be selected from the dimension of timeliness, so that more accurate and reliable data analysis and evaluation can be achieved based on the final called file.
[0039] S400 , calculating a final selection score value for each combination of call fields to be selected based on the first selection score value and the second selection score value corresponding to each combination of call fields to be selected.
[0040] Specifically, step S400 includes the following steps: S401, input the file information call request text into the preset classification model, and obtain the task label corresponding to the file information call request text; the task label includes a statistical analysis task and a real-time task; it can be understood that: the preset classification model is a pre-trained binary classification model, and the training data set includes a request text sample set and a task label corresponding to each request text sample; those skilled in the art are aware of the training process of the classification model and will not repeat it here.
[0041] At step S402, if the task tag corresponding to the file information request text is a statistical analysis task, the preset indicator weight assigned to the first selected score value is greater than the preset indicator weight assigned to the second selected score value. Those skilled in the art may set specific preset indicator weight values based on actual needs, or determine the preset indicator weight values based on the confidence level output by a preset classification model.
[0042] S403: If the task tag corresponding to the file information call request text is a real-time task, the preset indicator weight assigned to the first selection score value is less than the preset indicator weight assigned to the second selection score value.
[0043] S404: Normalize the first selection score value and the second selection score value corresponding to the call field combination to be selected, respectively. Calculate a weighted sum of the processed first selection score value and the second selection score value, and the preset indicator weights corresponding to the first selection score value and the second selection score value, respectively, to obtain a final selection score value for the call field combination to be selected.
[0044] As described above, when calculating the final selection score value, different indicator weights are set for the first selection score value and the second selection score value according to the task type corresponding to the file information call request text. If the request text is a real-time task, a higher indicator weight is assigned to the second selection score value, which is conducive to screening out a more real-time call field combination. If the request text is a statistical analysis task, a higher indicator weight is assigned to the first selection score value, so that fewer data tables are screened out and each data table contains as many fields to be called as possible. Since the fields in the same data table are synchronously statistical data, the statistical analysis of the data is more accurate.
[0045] S500 , obtaining a plurality of to-be-selected call fields in a to-be-selected call field combination corresponding to the maximum final selection score value, and calling a file where a target data table corresponding to each obtained to-be-selected call field is located.
[0046] By selecting the largest final selection score value to call the file, query first and then call, the query only takes up a small amount of data computing resources, while the call involves file size and file transfer, etc. The above method reduces the number of target data tables called, that is, reduces the call path, improves the call efficiency and the data screening efficiency after the call, and the target data table called has more records and the data update time is relatively recent, which is conducive to comprehensive and reliable analysis of the data.
[0047] In another embodiment, the method further comprises the steps of: S1: If there is only one combination of fields to be selected in the file information call request text, obtain the target data table corresponding to each field to be selected in the combination of fields to be selected. This is the same as the method of obtaining the target data table in step S200 and will not be repeated here.
[0048] S2, calling the file where the target data table corresponding to each acquired field to be selected is located.
[0049] An embodiment of the present invention also provides a non-transitory computer-readable storage medium, which can be set in an electronic device to store at least one instruction or at least one program related to implementing a method in a method embodiment. The at least one instruction or the at least one program is loaded and executed by the processor to implement the file information calling method provided in the above embodiment.
[0050] An embodiment of the present invention further provides an electronic device including a processor and the aforementioned non-transitory computer-readable storage medium.
[0051] Although some specific embodiments of the present invention have been described in detail by way of example, it should be understood by those skilled in the art that the above examples are for illustration only and are not intended to limit the scope of the present invention. It should also be understood by those skilled in the art that various modifications may be made to the embodiments without departing from the scope and spirit of the present invention. The scope of the present invention is defined by the appended claims.
Claims
1. A method for calling file information, characterized in that: The method comprises the following steps: S100, calculating a first selection score for each combination of call fields to be selected based on a plurality of combinations of call fields to be selected in the file information call request text and a pre-acquired identifier of a stored data table corresponding to each combination of call fields to be selected; S200, for any to-be-selected call field, if the stored data table corresponding to the to-be-selected call field is unique, determine the corresponding stored data table as the target data table corresponding to the to-be-selected call field itself; If the stored data table corresponding to the to-be-selected call field is not unique, filter out the target data table corresponding to the to-be-selected call field; S300, for a plurality of target data tables corresponding to any one of the to-be-selected call field combinations, calculate a second selection score corresponding to the to-be-selected call field combination itself according to the update time of each target data table; S400, calculating a final selection score for each combination of call fields to be selected based on the first selection score and the second selection score corresponding to each combination of call fields to be selected; S500 , obtaining a plurality of to-be-selected call fields in a to-be-selected call field combination corresponding to the maximum final selection score value, and calling a file where a target data table corresponding to each obtained to-be-selected call field is located.
2. The method for calling file information according to claim 1, characterized in that: Obtain the ID of the stored data table corresponding to each field to be selected by following these steps: S10, obtaining a mapping relationship table between fields and data table storage addresses stored in a preset database; The mapping relationship table between the field and the data table storage address is updated in real time; S20, searching the data table storage address corresponding to each to-be-selected calling field from the field-data table storage address mapping relationship table, and using the data table storage address corresponding to each to-be-selected calling field as an identifier of the stored data table corresponding to each to-be-selected calling field.
3. The method for calling file information according to claim 1, characterized in that: In step S100, the first selection score of the call field combination to be selected is calculated by the following steps: S101, assigning an initial score to each combination of call fields to be selected according to the number of call fields to be selected in each combination of call fields to be selected; the initial score is inversely proportional to the number of call fields to be selected; S102, analyzing the number of to-be-selected call fields in each stored data table that belong to the same combination of to-be-selected call fields based on the stored data tables corresponding to each to-be-selected call field, and determining the minimum number of stored data tables corresponding to each combination of to-be-selected call fields; S103, assigning a correlation score to each to-be-selected combination of call fields based on the number of stored data tables that are called at least for each to-be-selected combination of call fields; the correlation score is inversely proportional to the number of stored data tables that are called at least; S104: Determine the sum of the initial score and the associated score corresponding to the to-be-selected call field combination as the first selection score value of the to-be-selected call field combination.
4. The method for calling file information according to claim 1, wherein: In step S200, if the stored data table corresponding to the to-be-selected call field is not unique, screening out the target data table corresponding to the to-be-selected call field includes the following steps: S201, if the stored data table corresponding to the to-be-selected call field is not unique, obtain the data source of each stored data table corresponding to the to-be-selected call field and the preset importance level corresponding to the data source; S202, when the number of stored data tables corresponding to the highest preset importance level among the preset importance levels corresponding to each data source is 1, the stored data table corresponding to the highest preset importance level is used as the target data table corresponding to the field to be selected and called; S203, when the number of stored data tables corresponding to the highest preset importance level among the preset importance levels corresponding to each data source is greater than 1, based on the number of records under the call field to be selected in each stored data table, the stored data table corresponding to the largest number of records is used as the target data table corresponding to the call field to be selected.
5. The method for calling file information according to claim 1, characterized in that: In step S300, the second selection score corresponding to the to-be-selected call field combination is calculated by the following steps: S301, traverse all the call fields to be selected in the combination of call fields to be selected, obtain the update timestamp in the target data table corresponding to each call field to be selected, and select the most recent update timestamp as the reference time; S302, calculating the time difference between the update timestamp of the target data table corresponding to each to-be-selected call field and the reference time; S303, substituting each time difference into a preset exponential decay model, and using the output result as the timeliness score of the corresponding to-be-selected call field; S304: Determine the average value of the timeliness scores of all the call fields to be selected in the call field combination to be selected as the second selection score value corresponding to the call field combination to be selected.
6. The method for calling file information according to claim 1, characterized in that: Step S400 includes the following steps: S401: Input the file information call request text into a preset classification model to obtain a task tag corresponding to the file information call request text; the task tag includes a statistical analysis task and a real-time task; S402: If the task tag corresponding to the file information call request text is a statistical analysis task, the preset indicator weight assigned to the first selected score value is greater than the preset indicator weight assigned to the second selected score value; S403: If the task tag corresponding to the file information call request text is a real-time task, the preset indicator weight assigned to the first selection score value is less than the preset indicator weight assigned to the second selection score value; S404: Normalize the first selection score value and the second selection score value corresponding to the call field combination to be selected, respectively. Calculate a weighted sum of the processed first selection score value and the second selection score value, and the preset indicator weights corresponding to the first selection score value and the second selection score value, respectively, to obtain a final selection score value for the call field combination to be selected.
7. The method for calling file information according to claim 1, characterized in that: The method further comprises the steps of: S1, if there is only one combination of call fields to be selected in the file information call request text, obtaining a target data table corresponding to each call field to be selected in the combination of call fields to be selected; S2, calling the file where the target data table corresponding to each acquired field to be selected is located.
8. A non-transitory computer-readable storage medium, wherein at least one instruction or at least one program is stored in the storage medium, characterized in that: The at least one instruction or the at least one program segment is loaded and executed by a processor to implement the file information calling method according to any one of claims 1 to 7.
9. An electronic device, characterized in that: The device comprises a processor and the non-transitory computer-readable storage medium as claimed in claim 8.
Citation Information
Patent Citations
Data acquisition method, device, computer equipment and storage medium
CN110609954A
Information calling method and device, electronic equipment and readable storage medium
CN113411400A
File acquisition method and device, computer equipment and storage medium
CN114036187A
Database information screening method and system, storage medium and electronic equipment
CN114547109A
Field data set screening management method and system and storage medium
CN116226214A