Data retrieval method and computing equipment
By introducing pre-set computing scripts into the search instructions, the computing device can retrieve and process data from multiple data sources, solving the problem that data cannot be used directly in the prior art, achieving efficient data retrieval and processing, and simplifying the operation process.
Patent Information
- Application Number
- CN202510525624.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-24
- Publication Date
- 2025-08-05
AI Technical Summary
In the field of big data, when users conduct massive data correlation analysis, the data retrieved by simple SQL statements cannot be used directly, and further processing and calculations are required to meet the needs of specific business scenarios. The existing technology lacks efficient data retrieval and processing methods.
By determining the search statements in the search instruction and the pre-set calculation script, the computing device can retrieve the first result from multiple data sources and process it based on the calculation script to generate a second search result that meets the requirements, simplifying the complex calculation script writing process.
It improves data retrieval efficiency, simplifies the operation process, so that users do not need to repeatedly write complex calculation scripts, and realizes efficient processing of the first search results.
Smart Images

Figure CN120429432A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computing, and in particular to a data retrieval method and computing device. Background Art
[0002] In the big data world, data is stored from numerous sources and in various formats. When users conduct correlation analysis on this massive amount of data, the data retrieved using simple SQL statements is often not directly usable. To meet specific business needs, users generally need to further process and calculate the retrieved data to obtain the desired data. Summary of the Invention
[0003] The embodiments of the present application provide a data retrieval method and a computing device, which can improve retrieval efficiency.
[0004] In a first aspect, an embodiment of the present application provides a data retrieval method, which is applied to a computing device. The method includes: determining a retrieval instruction, the retrieval instruction includes at least a retrieval statement and a preset calculation script, and the calculation script is used to process the retrieval results according to a preset calculation logic; searching one or more data sources based on the retrieval statement to determine a first retrieval result; and processing the first retrieval result based on the calculation script to determine a second retrieval result.
[0005] In the above method, the search instruction includes a search statement and a pre-set calculation script. The computing device can obtain a first search result based on the search statement. Furthermore, the computing device can process the first search result based on the calculation script to obtain a second search result. In this process, the processing and calculation of the first search result can be completed based on the calculation script without the need for additional program development, thus simplifying the operation.
[0006] In an embodiment of the present application, the calculation script includes at least input parameter information, calculation logic or output parameter information. The input parameter information is used to represent the information that needs to be calculated, the calculation logic is used to calculate the input parameter information, and the output parameter information is used to represent the information that needs to be output.
[0007] It is understood that a calculation script includes input parameter information, calculation logic, and output parameter information. In different search scenarios, the calculation script can be reused by simply setting the input parameter information, calculation logic, and output parameter information. This provides convenience for users, eliminating the need to repeatedly write complex calculation scripts.
[0008] In an embodiment of the present application, the first search result is processed based on the calculation script to determine the second search result, including: processing the first search result based on the input parameter information to obtain the data to be processed; processing the data to be processed based on the calculation logic to obtain the processing result; processing the processing result based on the output parameter information to obtain the second search result.
[0009] In an embodiment of the present application, the input parameter information includes at least first field information, and the first field information is at least used to represent the field name and / or field value that needs to be calculated.
[0010] In an embodiment of the present application, the first search result includes at least one first search result data item, the first search result data item corresponds to the data source, and the first search result is processed based on the input parameter information to obtain the data to be processed, including: based on the first field information, determining the data to be processed from at least one first search result data item.
[0011] In an embodiment of the present application, the processing result includes one or more return values, and the output parameter information includes at least second field information, and the second field information is at least used to indicate the return value corresponding to the data source that needs to be output.
[0012] In an embodiment of the present application, the second search result includes the return value corresponding to one or more data sources. The processing result is processed based on the output parameter information to obtain the second search result, including: determining the second search result from the processing result based on the second field information.
[0013] In an embodiment of the present application, the calculation logic includes at least one or more of data conversion calculations, mathematical operation calculations, and string processing calculations on the input parameter information.
[0014] In an embodiment of the present application, the calculation script introduces a search statement based at least on keyword information, and the keyword information is used to call the calculation script.
[0015] It is understandable that the computing device can determine a pre-set computing script based on the keyword information. Thus, when processing the first search result, the user does not need to write a complex computing script. Complex processing of the first search result can be achieved simply by using the keyword information, and the operation process is very simple.
[0016] In a second aspect, an embodiment of the present application provides a computing device, comprising: a memory for storing computer-readable instructions; and a processor for executing the computer-readable instructions so that the computing device executes a data retrieval method. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The above and other purposes, features, and advantages of the present application will become more apparent through a more detailed description of the embodiments of the present application in conjunction with the accompanying drawings. The accompanying drawings are intended to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the present application and do not constitute a limitation of the present application. In the drawings, the same reference numerals generally represent the same components or steps.
[0018] Figure 1A schematic diagram of a system application architecture according to an embodiment of the present application is schematically illustrated.
[0019] Figure 2 The following schematically illustrates a flow chart of a data retrieval method according to an embodiment of the present application.
[0020] Figure 3 A flowchart for determining a second search result based on a calculation script according to an embodiment of the present application is schematically illustrated.
[0021] Figure 4 The following schematically illustrates a block diagram of a computing device according to an embodiment of the present application. DETAILED DESCRIPTION
[0022] In order to make the purpose, technical solutions and advantages of this application more apparent, the following exemplary embodiments of this application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of this application, rather than all the embodiments of this application, and it should be understood that this application is not limited to the exemplary embodiments described herein.
[0023] The implementation of the embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0024] Please refer to Figure 1 , which shows a schematic diagram of a system application architecture of an embodiment of the present application.
[0025] like Figure 1 As shown, the computing device 101 and the network device 102 can transmit data to each other and communicate.
[0026] In some embodiments, computing device 101 may have data processing, logical operation, and storage capabilities. For example, computing device 101 may include computing devices such as a server, tablet computer, desktop computer, laptop computer, notebook computer, computing node, or netbook computer. The server may be a rack server, blade server, or tower server, among other types of servers. The server may include one or more computing nodes, each of which includes at least one CPU. When a server includes multiple computing nodes, the multiple CPUs in the multiple computing nodes share a common operating system.
[0027] In some embodiments, the network device 102 may be a device having a data storage function, such as a local hard disk. The network device 102 may store a variety of data information. The storage method of the network device 102 may be read-only memory (ROM) or random access memory (RAM), such as dynamic random access memory (DRAM) or static random access memory (SRAM).
[0028] In some embodiments, a user may access the cross-source search system running on the computing device 101 through a browser and enter a search instruction. Based on the search instruction, the computing device 101 searches for data in one or more databases and / or data sources that are configured on different network devices 102, and returns the search results to the user.
[0029] In some embodiments, the computing device 101 may parse a search instruction input by a user and, based on the search statement in the search instruction, search one or more data sources to determine a first search result. Furthermore, the computing device 101 may process the first search result based on a calculation script pre-set in the search instruction to determine a second search result.
[0030] In some cases, the user needs to integrate the first search results. When this process involves complex algorithms, formulas, data processing logic, or mathematical models, the computing device 101 cannot directly integrate the first search results based on a search statement, such as an SQL search statement. Therefore, the computing device 101 can process the first search results using a pre-set calculation script to determine the second search results, thereby meeting the requirement for complex data processing of the first search results.
[0031] Please refer to the following Figure 2 The computing device of an embodiment of the present application determines the second search result based on the search instruction.
[0032] Figure 2 This is a flow chart of a data retrieval method provided in an embodiment of the present application. Figure 2 As shown, the data retrieval method is applied to a computing device, including S201, S202 and S203:
[0033] S201: Determine a search instruction, where the search instruction includes at least a search statement and a preset calculation script, and the calculation script is used to process the search results according to a preset calculation logic.
[0034] In an embodiment of the present application, a computing device may determine a search instruction input by a user. The search instruction may include a structured query language (SQL), a Python statement, or the like. Furthermore, the search instruction includes at least a search statement and a pre-set calculation script. The search statement may be an SQL query statement. The calculation script may be pre-written, and the user may directly reference the calculation script when inputting the search instruction into the computing device.
[0035] In some embodiments, the calculation script may include calculation logic. When a computing device executes a search statement to obtain multiple data in different formats from multiple different data sources or information systems, the computing device may further query the multiple data in different formats based on the calculation logic in the calculation script, thereby obtaining a second search result from the multiple data in different formats.
[0036] S202: Search one or more data sources based on the search statement to determine a first search result.
[0037] In the embodiment of the present application, the computing device can determine the first search result from different databases and data sources through the search statement. It is understandable that the data in the first search result comes from many sources and in different formats.
[0038] S203: Process the first search result based on the calculation script to determine a second search result.
[0039] In an embodiment of the present application, the first search result can be further processed by a calculation script in the search instruction. In some embodiments, the calculation script can be written in Python. In other embodiments, the calculation script can also be written in other languages, such as Bash (Shell Script), Perl, etc.
[0040] In the embodiments of the present application, the first search results may include a variety of data from different data sources and in different formats. This data is often not usable directly, for example, because the format is not uniform or does not meet the final calculation requirements. Based on this, the first search results can be further processed using a calculation script.
[0041] In an embodiment of the present application, the calculation script includes at least input parameter information, calculation logic or output parameter information. The input parameter information is used to represent the information that needs to be calculated, the calculation logic is used to calculate the input parameter information, and the output parameter information is used to represent the information that needs to be output.
[0042] In some embodiments, the first search result may include multiple first search result data items, each corresponding to a data source. A first search result data item may include a row of related data. For example, the first search result events list includes multiple first search result data items. An event is an element in the events list, representing a row of data in the first search result. Based on this, the input information may be the information contained in the event.
[0043] In an embodiment of the present application, the input parameter information includes at least first field information, and the first field information is at least used to represent the field name and / or field value that needs to be calculated.
[0044] In some embodiments, the calculation script supports the input of the first field information that needs to be calculated, for example, the first field information includes the field name field, and / or the field value value, etc. It is understandable that the first field information can be determined from the multiple first search result data items included in the first search result. For example, the field information included in the first search result data item event includes field names such as name, age, and height. If further calculation of height is required, the first field information in the input parameter information in the calculation script can be "field name: height". Then, the computing device can use the relevant data in the first search result with the field name of height as input parameters for calculation based on the calculation script.
[0045] In the embodiment of the present application, the calculation script may further include calculation logic, and the computing device may perform calculations on the relevant data based on the calculation logic.
[0046] In an embodiment of the present application, the calculation logic includes at least one or more of data conversion calculations, mathematical operation calculations, and string processing calculations on the input parameter information.
[0047] In some embodiments, the calculation logic may be a data conversion calculation performed on the data determined based on the input parameter information. For example, normalization, standardization calculation, encoding conversion calculation, etc. The calculation logic may also be a mathematical operation calculation performed on the data determined based on the input parameter information. For example, basic arithmetic operations, mean calculation, correlation analysis, mathematical function application, etc. The calculation logic may also be a string processing calculation performed on the data determined based on the input parameter information. For example, string conversion, string matching, etc. In addition, the calculation logic may also include sorting and search calculations, deep learning calculations, etc.
[0048] In some embodiments, the calculation script may further include multiple calculation logics, based on which more complex calculation processing can be performed on the first search result that is more suitable for the search target.
[0049] In an embodiment of the present application, the calculation script may further include parameter information. The computing device may determine the second search result based on the parameter information.
[0050] In some embodiments, the output parameter information may include second field information, which is used to at least indicate the return value corresponding to the data source to be output. The second field information may be a field name. For example, if the second field information is the field name "value", the second search result may be the data corresponding to "value". For another example, if the second field information is the field name "events", the second search result may be the data corresponding to "events".
[0051] According to the embodiments of the present application, a calculation script includes input parameter information, calculation logic, and output parameter information. In different search scenarios, the calculation script can be reused by simply setting the input parameter information, calculation logic, and output parameter information. This provides convenience for users, eliminating the need to repeatedly write complex calculation scripts.
[0052] In an embodiment of the present application, the calculation script introduces a search statement based at least on keyword information, and the keyword information is used to call the calculation script.
[0053] In an embodiment of the present application, a user may call a calculation script through keyword information when writing a search instruction. When parsing the search instruction, the computing device may read the keyword information and call the calculation script based on the keyword information.
[0054] In some embodiments, the keyword information may include a keyword, such as "calculate." The computing device reads "calculate" and parses the information following the keyword "calculate." Furthermore, the computing device may determine the input parameter information, calculation logic, and output parameter information of the calculation script from the information following the keyword "calculate." In some embodiments, the keyword information may include a keyword identifier, such as a pipe character "|," and a keyword, such as "calculate."
[0055] In some embodiments, the information after the keyword calculate is a pre-set calculation script. By parsing the calculation script, the input parameter information, calculation logic, and output parameter information can be determined. In some embodiments, the information after the keyword calculate is the name information and input parameter information of the pre-set calculation script. In this case, after the computing device reads the keyword calculate, it can obtain the name information and input parameter information of the calculation script after the keyword calculate. Furthermore, the computing device can call the calculation script content based on the name information of the calculation script and determine the input parameter information, calculation logic, and output parameter information.
[0056] The following is an example of a calculation script that introduces a search statement based on keyword information:
[0057] data_source native
[0058] |make
[0059] |custom value="test"
[0060] |calculate base64_encode(value)
[0061] The final second search results are as follows:
[0062] value=dGVzdF9iYXNlNjQ
[0063] From the above content, it can be seen that the computing device can read the pipe character "|" and the keyword "calculate". Furthermore, in response to reading the keyword information, the computing device can obtain the content after the keyword "calculate", such as the above-mentioned "base64_encode(value). It should be noted that the "base64_encode" here is the name information of a pre-set calculation script, and "value" is the input parameter information of the calculation script. Therefore, the computing device can call the corresponding calculation script based on the name information "base64_encode" of the calculation script.
[0064] It should be noted that the above “value=dGVzdF9iYXNlNjQ” is for example only, and the specific data can be determined based on the specific embodiment.
[0065] In addition, the following is an example of an original search statement that does not reference a calculation script based on keywords:
[0066] data_source native
[0067] |make
[0068] |custom value="test_base64"
[0069] The final search results are as follows:
[0070] value=test_base64
[0071] It can be seen that in this application, completely different search results can be determined by introducing calculation scripts through keywords.
[0072] According to an embodiment of the present application, when a user specifies a search instruction, they can use keyword information to introduce a pre-set calculation script into the search statement. This eliminates the need to write a complex calculation script when processing the first search result; instead, the complex processing of the first search result can be achieved simply by using keyword information, resulting in a very simple operation process. Furthermore, the developed calculation script is universal and highly adaptable across different searches, allowing it to be directly called upon for the same or similar scenarios using keyword information, eliminating the need for repeated development.
[0073] According to an embodiment of the present application, a search instruction includes a search statement and a pre-set calculation script. The computing device can obtain a first search result based on the search statement. Furthermore, the computing device can also process the first search result based on the calculation script to obtain a second search result. In this process, the processing and calculation of the first search result can be completed based on the calculation script without the need for additional program development, which is simple to operate.
[0074] In the embodiment of the present application, the above S203 may include S301, S302 and S303, such as Figure 3 shown. Figure 3 A flowchart for determining a second search result based on a calculation script is provided in an embodiment of the present application.
[0075] S301: Process the first search result based on the input parameter information to obtain data to be processed.
[0076] In an embodiment of the present application, the first search result may include at least one first search result data item. The first search result data item corresponds to a data source and may be a row of search data, including multiple field names and field values.
[0077] In an embodiment of the present application, the computing device can determine the data to be processed from at least one first retrieval result data item based on the first field information in the input parameter information. In some embodiments, the first retrieval result data item may include multiple field information, and the first field information in the input parameter information is the field information of the data to be calculated. The first field information may be part of the field information among the multiple field information included in the first retrieval result data item. Thus, the computing device can determine the data related to the first field information from the first retrieval result as the data to be processed based on the first field information of the input parameter information.
[0078] S302: Process the data to be processed based on the calculation logic to obtain a processing result.
[0079] In an embodiment of the present application, the processing result includes return values corresponding to one or more data sources.
[0080] S303: Process the processing result based on the output parameter information to obtain a second search result.
[0081] In an embodiment of the present application, the output parameter information may include second field information, and the second field information is used to at least indicate the return value corresponding to the data source to be output. For example, the second field information may include a field name, and the field name to be output can be determined based on the second field information, and the data to be output can be further determined based on the field name.
[0082] In embodiments of the present application, the second search result includes return values corresponding to one or more data sources. In some embodiments, the first search result may be determined based on one or more data sources, corresponding to the one or more data sources, and the second search result is a processing result obtained by processing the first search result based on a calculation script. That is, the calculation script may perform calculations on the first search result, and therefore, the second search result may also be a search result corresponding to one or more data sources.
[0083] In the embodiment of the present application, the above S303 includes: determining a second search result from the processing result based on the second field information.
[0084] In an embodiment of the present application, the computing device may process the data to be processed based on computing logic to obtain a processing result. Furthermore, the computing device may determine a second search result based on the second field information. For example, the computing device may use the field name in the second field information to determine the data corresponding to the field name from the processing result, and output the data when outputting the second search result.
[0085] In an embodiment of the present application, a user can pre-write a calculation script based on the Python language. For example, the input parameter information, calculation logic, and output parameter information of the calculation script can be determined. For example, the user can write the input parameter information, calculation logic, and output parameter information according to the agreed code format. In some embodiments, the user can also write the name information, function description information, input parameter description information, output parameter description information, usage method, example information, etc. of the calculation script.
[0086] For example, in response to a user clicking a "New" button, the computing device can create a text box for a user-defined calculation script. The computing device can retrieve the name, function description, input and output parameter information of the user-written calculation script to facilitate the user to correctly pass parameters when calling it. The computing device can also retrieve usage instructions and example information for the user-written calculation script to facilitate the user's reading and use.
[0087] In an embodiment of the present application, in response to the user completing the writing of the calculation script, the computing device can also save the calculation script so that the user can directly call it during subsequent operations without the need for secondary writing.
[0088] The following is an example of a calculation script:
[0089]
[0090] In the calculation script above, the content after the "#" can be information about the input and output parameters. For example, "#1. Must be a subclass of calculateBase" indicates that the TestCalculate class in the calculation script must inherit from the CalculateBase class to inherit its properties and methods.
[0091] In the above calculation script, lines 3-6 are the constructor, which specifies the input parameters to be calculated. For example, they specify the first field information in the input parameters: field and value. Furthermore, "self.field = field" specifies that the incoming parameter field is assigned to the instance attribute self.field, so that this value can be accessed through self.field. For example, "self.value = value" assigns the incoming parameter value to the instance attribute self.value, which can be subsequently accessed through self.value.
[0092] In the above calculation script, lines 7-10 are the calculation logic. They define the calculate method, where self represents the class instance, and events can be a data set passed in from the outside, such as data obtained from a cross-source search, i.e., the first search result. "for event in events" iterates through the passed events list, with event representing each element in events in turn, each element representing a row of data. "event[self.field] = self.value" calculates field and value, and for each event in events, assigns the value of self.value to the field named self.field.
[0093] In the above calculation script, line 11 outputs parameter information. For example, if "events" is output, the second field information is "events." It is understood that other content can also be output. For example, if the second field information is named "field" and the field name is "return field", the value corresponding to "field" can be output.
[0094] Here is another example calculation script:
[0095]
[0096] In an embodiment of the present application, the user sets the name of the calculation script to be: base64_encode, and sets the function description of the calculation script to: perform base64 encoding conversion on a string.
[0097] The first line of the above calculation script imports the module: import base64. Importing the base64 module implements base64 encoding processing of specific fields in the incoming data.
[0098] In lines 3-5 of the calculation script above, class TestCalculate(CalculateBase): defines the TestCalculate class, which inherits from CalculateBase, indicating that it must follow the specifications or interface set by the CalculateBase class. def__init__(self, field): is the class constructor, which accepts the parameter field (input information) and assigns the parameter field to the instance attribute self.field, which specifies the target field to be Base64-encoded.
[0099] In lines 7-11 of the calculation script above, def calculate(self, events): defines the calculation logic and receives events (the data set obtained by the cross-source search) as a parameter, which is the first search result. for event in events: iterates over each data item event in events.
[0100] The calculation logic is as follows: byte_string = event[self.field].encode('utf-8'): Gets the value of the field specified by self.field in event and converts it to a byte string using UTF-8 encoding format. encoded_data = base64.b64encode(byte_string): Calls the b64encode function of the base64 module to perform Base64 encoding on the byte string, resulting in the encoded byte string encoded_data.
[0101] event[self.field] = encoded_data.decode('utf-8') : decodes the encoded byte string back into a string in UTF-8 format and reassigns it to the field specified by self.field in event , completing the base64 encoding conversion of the field value.
[0102] In line 12 of the above calculation script, return events: returns the processed events data set. The data included in events is the second search result.
[0103] Figure 4 The following schematically illustrates a block diagram of a computing device according to an embodiment of the present application.
[0104] like Figure 4 As shown, a computing device 400 according to an embodiment of the present application includes a memory 401 and a processor 402; the memory 401 is used to store computer program instructions; the processor 402 is used to run computer-readable instructions, so that the computing device executes the above-mentioned data retrieval method.
[0105] The data retrieval method and computing device according to an embodiment of the present application have been described above with reference to the accompanying drawings. The method determines a user-written search instruction, which includes at least a search statement and a pre-set calculation script, determines a first search result based on the search statement, and processes the first search result based on the calculation script to determine a second search result. Thus, the first search result can be processed using the calculation script without the need for developing additional programs to process the first search result, simplifying the operation process.
[0106] The basic principles of the present application have been described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, and effects mentioned in this application are merely illustrative and not restrictive, and it should not be assumed that these advantages, strengths, and effects are required of each embodiment of this application. In addition, the specific details of the above application are merely illustrative and for ease of understanding, and are not restrictive. The above details do not limit this application to being implemented by adopting the above specific details.
[0107] The block diagrams of the devices, devices, equipment, and systems involved in this application are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As will be appreciated by those skilled in the art, these devices, devices, equipment, and systems can be connected, arranged, or configured in any manner. Words such as "include," "comprise," "have," and the like are open-ended words, meaning "including but not limited to," and can be used interchangeably therewith. The words "or" and "and" used herein refer to the words "and / or" and can be used interchangeably therewith, unless the context clearly indicates otherwise. The word "such as" used herein refers to the phrase "such as but not limited to," and can be used interchangeably therewith.
[0108] Additionally, as used herein, "or" used in a list of items beginning with "at least one" indicates a separate list, so that, for example, a list of "at least one of A, B, or C" means A or B or C, or AB or AC or BC, or ABC (i.e., A and B and C). Furthermore, the word "exemplary" does not mean that the example described is preferred or better than other examples.
[0109] It should also be noted that in the system and method of the present application, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present application.
[0110] Various changes, substitutions, and modifications of the techniques described herein may be made without departing from the teachings defined by the appended claims. Furthermore, the scope of the claims herein is not limited to the specific aspects of the processes, machines, manufactures, compositions of things, means, methods, and actions described above. Currently existing or later developed processes, machines, manufactures, compositions of things, means, methods, or actions that perform substantially the same functions or achieve substantially the same results as the corresponding aspects described herein may be utilized. Accordingly, the appended claims include within their scope such processes, machines, manufactures, compositions of things, means, methods, or actions.
[0111] The above description of the claimed aspects is provided to enable any person skilled in the art to make or use the present application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present application. Therefore, the present application is not intended to be limited to the aspects shown herein, but rather to the widest scope consistent with the principles and novel features of the present application.
[0112] The above description has been provided for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present application to the form in which it is applied. Although a number of example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.
Claims
1. A data retrieval method, characterized in that: Applied to a computing device, the method includes: Determine a search instruction, wherein the search instruction includes at least a search statement and a preset calculation script, wherein the calculation script is used to process the search results according to a preset calculation logic; Search one or more data sources based on the search statement to determine a first search result; and The first search result is processed based on the calculation script to determine a second search result.
2. The data retrieval method according to claim 1, wherein: The calculation script includes at least input parameter information, calculation logic or output parameter information, the input parameter information is used to represent the information that needs to be calculated, the calculation logic is used to calculate the input parameter information, and the output parameter information is used to represent the information that needs to be output.
3. The data retrieval method according to claim 2, characterized in that: The processing of the first search result based on the calculation script to determine the second search result includes: Processing the first search result based on the input parameter information to obtain data to be processed; Processing the data to be processed based on the calculation logic to obtain a processing result; The processing result is processed based on the output parameter information to obtain a second search result.
4. The data retrieval method according to claim 3, wherein: The input parameter information includes at least first field information, and the first field information is at least used to represent the field name and / or field value that needs to be calculated.
5. The data retrieval method according to claim 4, characterized in that: The first search result includes at least one first search result data item, the first search result data item corresponds to the data source, and the processing of the first search result based on the input parameter information to obtain data to be processed includes: Based on the first field information, data to be processed is determined from at least one first search result data item.
6. The data retrieval method according to claim 3, characterized in that: The processing result includes one or more return values, and the output parameter information includes at least second field information, and the second field information is at least used to indicate the return value corresponding to the data source that needs to be output.
7. The data retrieval method according to claim 6, characterized in that: The second search result includes return values corresponding to one or more data sources, and the processing result is processed based on the output parameter information to obtain the second search result, including: The second search result is determined from the processing result based on the second field information.
8. The data retrieval method according to any one of claims 1 to 7, characterized in that: The calculation logic includes at least one or more of data conversion calculation, mathematical operation calculation, and string processing calculation on the input parameter information.
9. The data retrieval method according to any one of claims 1 to 8, characterized in that: The calculation script introduces the search statement based on at least keyword information, and the keyword information is used to call the calculation script.
10. A computing device, characterized in that include: a memory for storing computer-readable instructions; as well as A processor is configured to execute the computer-readable instructions so that the computing device performs the data retrieval method according to any one of claims 1 to 9.