A data indicator program construction method across multi-source computing environments and related devices
By constructing a data metric program across multi-source computing environments, and utilizing predefined formulas and caching or adapter transformations to generate executable programs, the adaptability problem of data metric programs is solved, enabling flexible migration and deployment in different environments, and improving maintainability and scalability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHONGQING CHANGAN AUTOMOBILE CO LTD
- Filing Date
- 2023-06-30
- Publication Date
- 2026-06-19
AI Technical Summary
In existing technologies, data metrics programs are usually designed for a single computing environment, which cannot adapt to diverse computing needs. This results in the need to rewrite the program when migrating or upgrading the environment, which is costly.
By acquiring the data metrics to be processed, processing is carried out using predefined data metric calculation formulas to generate execution instructions, and the execution program is generated by using cache or adapter conversion relationships to adapt to different computing environments.
It enables flexible migration and deployment of data indicator programs in multi-source computing environments, reducing redundant development work and improving maintainability and scalability.
Smart Images

Figure CN116661802B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of big data processing technology, and in particular to a method, system, smart terminal, and computer-readable storage medium for constructing data indicator programs across multi-source computing environments. Background Technology
[0002] In the era of big data, the calculation and analysis of data metrics are becoming increasingly important. However, current data metric programs are typically designed for single computing environments and cannot adapt to diverse computing needs. A calculation program written in one syntax cannot run in other environments. When migrating metrics or upgrading the computing environment, it is necessary to rewrite the original program, which is extremely costly. Therefore, building suitable data metric programs for multi-source computing environments has become an urgent issue.
[0003] Therefore, existing technologies still need to be improved and developed. Summary of the Invention
[0004] The main objective of this application is to provide a method, system, smart terminal, and computer-readable storage medium for constructing data indicator programs across multiple computing environments, aiming to solve the problem that existing data indicator programs are designed for a single computing environment and cannot adapt to diverse computing needs.
[0005] The first aspect of this application provides a method for constructing a data indicator program across a multi-source computing environment, comprising the following steps: obtaining a data indicator to be processed; processing the data indicator to be processed according to a predefined data indicator calculation formula to obtain a calculation formula for the data indicator to be processed; precompiling the calculation formula for the data indicator to be processed to obtain an execution instruction; calculating the encrypted value of the execution instruction; if an encrypted value identical to the encrypted value of the execution instruction exists in the cache, retrieving the execution program of the execution instruction from the cache and sending the execution program to the execution environment for execution; if no encrypted value identical to the encrypted value of the execution instruction exists in the cache, processing the execution instruction according to a predefined adapter conversion relationship to obtain a specific instruction for the execution environment and verifying it; after verification, compiling the specific instruction to obtain an execution program for the specific instruction and sending the execution program to the execution environment for execution.
[0006] Based on the above technical means, the embodiments of this application can process the data indicators to be processed to obtain an executable program that can run in the execution environment, and the program implements the content of the data indicators to be processed. Therefore, through the above technical means, the embodiments of this application enable the data indicators and the corresponding executable programs to be executed in different execution environments, thereby solving the problem that the data indicator programs in the prior art are designed for a single computing environment and cannot adapt to diverse computing needs.
[0007] Optionally, in one embodiment of this application, the step of obtaining the data indicator to be processed, and processing the data indicator to be processed according to a predefined data indicator calculation formula abstract description to obtain the data indicator calculation formula, further includes: defining the data indicator calculation formula abstract description according to the constraints of the operation, wherein the operation includes arithmetic operation, aggregation operation, logical operation, comparison operation, date operation and string operation, and the constraints include operation name, purpose and applicable data type.
[0008] Based on the above technical means, the embodiments of this application can predefine the corresponding data indicator calculation formula abstract description before acquiring the data indicator to be processed. This allows the embodiments of the present invention to directly process the data indicator to be processed using the predefined data indicator calculation formula abstract description after acquisition, facilitating rapid acquisition of the data indicator calculation formula and significantly saving the implementation process of the embodiments of the present invention. Furthermore, the data indicator calculation formula abstract description includes multiple operations, making the data indicator calculation formula abstract description used in the embodiments of this application more complete and accurate.
[0009] Optionally, in one embodiment of this application, the step of pre-compiling the calculation formula of the data index to be processed to obtain execution instructions specifically includes: splitting the calculation formula of the data index to be processed and pre-compiling it to obtain multiple independent instructions; the execution instructions include all the independent instructions obtained from the calculation formula of the data index to be processed.
[0010] Based on the above technical means, the embodiments of this application can decompose and compile the calculation formula of data indicators into execution instructions. The execution instructions contain multiple independent instructions, so the processing of the instruction can be completed in just one step, thereby achieving the effect of simplifying the calculation formula of data indicators.
[0011] Optionally, in one embodiment of this application, the step of precompiling the calculation formula of the data index to be processed to obtain the execution instruction, calculating the encrypted value of the execution instruction, further includes: obtaining a cache, traversing the encrypted values in the cache, comparing the encrypted value of the execution instruction with the encrypted values in the cache, and determining whether there is an encrypted value in the cache that is the same as the encrypted value of the execution instruction.
[0012] Based on the above technical means, the embodiments of this application search in the cache for whether there is an encrypted value that is the same as the encrypted value of the execution instruction, so as to determine whether the same execution instruction has been processed in the cache. Therefore, if the same execution instruction has been processed in the cache, the cached data can be directly called, so as not to generate the execution program again and save computing memory.
[0013] Optionally, in one embodiment of this application, the step of obtaining the cache, traversing the encrypted values in the cache, and comparing the encrypted value of the execution instruction with the encrypted values in the cache specifically includes: the encrypted value in the cache corresponds to a unique execution instruction and execution program.
[0014] Based on the above technical means, the embodiments of this application can determine a unique execution instruction and execution program based on the encrypted value in the cache, thereby making the execution program obtained by the embodiments of this application based on the encrypted value more accurate.
[0015] Optionally, in one embodiment of this application, the method for constructing data index programs across multi-source computing environments further includes: recording each execution program sent to the execution environment for execution, binding the data index calculation formula to be processed, the encrypted value of the execution instruction, and the execution program corresponding to each execution program, and storing them in a cache.
[0016] Based on the above technical means, the embodiments of this application can record the processing results of each data indicator to be processed, and bind the calculation formula of the data indicator to be processed, the encrypted value of the execution instruction, and the execution program corresponding to each execution program, and store them in the cache. This allows the embodiments of this application to cache the processing results of unfamiliar data indicators to be processed each time, so that when the embodiments of this application encounter data indicators to be processed that have been processed before, they can directly obtain the corresponding execution program from the cache through the uniquely determined encrypted value, without having to go through the compilation and conversion process of the execution program again, thereby achieving the effect of saving the calculation process and making the embodiments of this application faster and more accurate in the implementation process.
[0017] Optionally, in one embodiment of this application, the step of processing the execution instructions according to the predefined adapter conversion relationship further includes: defining the adapter interface of the computing engine according to the target environment, and registering the adapter conversion relationship according to the adapter interface.
[0018] Based on the above technical means, the embodiments of this application can process execution instructions through pre-set adapter conversion relationships, so that execution instructions that do not exist in the cache can also obtain the corresponding execution program through pre-defined conversion relationships.
[0019] A second aspect of this application provides a data indicator program construction system for multi-source computing environments. The system includes: a first data processing module for acquiring a data indicator to be processed, processing the data indicator according to a predefined data indicator calculation formula, and obtaining a calculation formula for the data indicator to be processed; a second data processing module for pre-compiling the calculation formula for the data indicator to be processed to obtain an execution instruction, and calculating the encrypted value of the execution instruction; a first program sending module for retrieving the execution program of the execution instruction from the cache if an encrypted value identical to the encrypted value of the execution instruction exists in the cache, and sending the execution program to the execution environment for execution; and a second program sending module for processing the execution instruction according to a predefined adapter conversion relationship if no encrypted value identical to the encrypted value of the execution instruction exists in the cache, obtaining and verifying the specific instruction of the execution environment, compiling the specific instruction of the execution environment after verification, obtaining the execution program of the specific instruction, and sending the execution program to the execution environment for execution.
[0020] Optionally, in one embodiment of this application, the data indicator program construction system across multi-source computing environments further includes: a data indicator calculation formula abstract description pre-defined unit, used to define the data indicator calculation formula abstract description according to the constraints of the operation, wherein the operation includes arithmetic operation, aggregation operation, logical operation, comparison operation, date operation and string operation, and the constraints include operation name, purpose and applicable data type.
[0021] Optionally, in one embodiment of this application, the second data processing module includes: a formula splitting and pre-compilation unit, used to split the calculation formula of the data index to be processed and pre-compile it to obtain multiple independent instructions; and an execution instruction acquisition unit, wherein the execution instructions include all the independent instructions obtained from the calculation formula of the data index to be processed.
[0022] Optionally, in one embodiment of this application, the data indicator program construction system across multi-source computing environments further includes: a cache comparison unit, used to obtain a cache, traverse the encrypted values in the cache, and compare the encrypted value of the execution instruction with the encrypted values in the cache; and an encrypted value judgment unit, used to determine whether there is an encrypted value in the cache that is the same as the encrypted value of the execution instruction.
[0023] Optionally, in one embodiment of this application, the cache comparison unit further includes a corresponding unit, wherein the encrypted value in the cache corresponds to a unique execution instruction and execution program.
[0024] Optionally, in one embodiment of this application, the data indicator program construction system across multi-source computing environments further includes a cache unit, which is used to record each execution program sent to the execution environment for execution, and bind the data indicator calculation formula to be processed, the encrypted value of the execution instruction and the execution program corresponding to each execution program, and store them in the cache.
[0025] Optionally, in one embodiment of this application, the data metric program construction system across multi-source computing environments further includes a conversion relationship definition unit, used to define the adapter interface of the computing engine according to the target environment, and register the adapter conversion relationship according to the adapter interface.
[0026] A third aspect of this application provides a smart terminal, the smart terminal including: a memory, a processor, and a data indicator program construction program for a multi-source computing environment stored in the memory and executable on the processor. When the data indicator program construction program for a multi-source computing environment is executed by the processor, it implements the steps of the data indicator program construction method for a multi-source computing environment as described in the above embodiments.
[0027] A fourth aspect of this application provides a computer-readable storage medium storing a data indicator program construction program for a multi-source computing environment. When executed by a processor, the data indicator program construction program for a multi-source computing environment implements the steps of the data indicator program construction method for a multi-source computing environment as described in the above embodiments.
[0028] The beneficial effects of this application are:
[0029] This application embodiment employs a data indicator program construction method across multiple computing environments. This method allows data indicators to be processed to generate executable programs that can be run in different environments. This enables flexible migration and deployment of data indicator programs across different computing environments, reducing repetitive development work and improving the maintainability and scalability of the data indicator programs. In other words, it solves the problem in existing technologies where data indicator programs are designed for a single computing environment and cannot adapt to diverse computing needs. Furthermore, in this application embodiment, for executable programs corresponding to data indicators existing in the cache, there is no need to process them again through adapter conversion; instead, the corresponding executable program is directly obtained from the cache. For executable programs corresponding to data indicators not existing in the cache, after processing to obtain the corresponding executable program, the corresponding executable program and its encrypted value are saved. This allows this application embodiment to quickly process each data indicator after processing a sufficient number of data indicators by utilizing the cached content.
[0030] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0031] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0032] Figure 1 This is a flowchart of a preferred embodiment of the data metric program construction method across multi-source computing environments according to this application;
[0033] Figure 2 This is a flowchart illustrating the specific implementation steps of the data indicator program construction method across multi-source computing environments in a preferred embodiment of the present application.
[0034] Figure 3 This is a schematic diagram of a preferred embodiment of the data index program construction system for multi-source computing environments in this application;
[0035] Figure 4 This is a schematic diagram of a preferred embodiment of the smart terminal of this application.
[0036] Among them, 10 A data metrics program construction system for multi-source computing environments; 100 First data processing module, 200 The second data processing module, 300-the first program sending module and 400 Second program sending module; 501 Memory, 502 Processor and 503 Communication interface. Detailed Implementation
[0037] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.
[0038] The following description, with reference to the accompanying drawings, outlines a method and related apparatus for constructing data indicator programs across multiple computing environments according to embodiments of this application. Addressing the problem mentioned in the background art that data indicator programs are designed for a single computing environment and cannot adapt to diverse computing needs, and that computing programs written in one syntax cannot run in other environments, necessitating rewriting of the original program when migrating indicators or upgrading the computing environment, resulting in significant costs, this application provides a method for constructing data indicator programs across multiple computing environments. In this method, based on the acquired data indicators to be processed, a corresponding executable program running in the execution environment can be obtained. This solves the technical problem in the related art that data indicator programs are designed for a single computing environment and cannot adapt to diverse computing needs.
[0039] Specifically, Figure 1 This is a flowchart illustrating a method for constructing data metrics across a multi-source computing environment, as provided in an embodiment of this application.
[0040] like Figure 1 As shown, the method for constructing data metrics across a multi-source computing environment includes the following steps:
[0041] In step S101, the data indicators to be processed are obtained, and the data indicators to be processed are processed according to the abstract description of the predefined data indicator calculation formula to obtain the data indicator calculation formula.
[0042] Among them, data metrics can quantify a certain event and form numbers to measure targets. For example, active user metrics and new user metrics are data metrics. The above data metrics are processed to obtain the calculation formula of the data metrics, which is to express the specific calculation method of the data metrics in the form of a formula. For example, for the data metric "website conversion rate", the corresponding data metric calculation formula is website conversion rate = number of visits with corresponding actions / total number of visits. Arithmetic operations are used in this calculation formula.
[0043] Furthermore, the step of acquiring the data indicators to be processed, and processing the data indicators according to a predefined data indicator calculation formula to obtain the data indicator calculation formula, also includes:
[0044] The data index calculation formula is defined based on the constraints of the operation. The operation includes arithmetic operations (addition, subtraction, multiplication, and division), aggregate operations (such as summation, average, etc.), logical operations (AND, OR, NOT), comparison operations (greater than, less than, etc.), date operations (such as calculating the past year, tomorrow, etc.), and string operations (such as calculating length). The constraints include the operation name, purpose, and applicable data type.
[0045] In other words, in this embodiment of the application, the data indicator calculation formula is first predefined and abstractly described, wherein...
[0046] The operations used to define the abstract description of the calculation formula for data indicators also include custom operations. The aforementioned custom operations are operation rules that exclude the above-mentioned operation rules and are set by the user according to the actual situation. For example, if a custom date operation is defined to calculate the date of the third working day of each month, the corresponding operation can be set accordingly.
[0047] In one implementation, the calculation formula of the data indicator to be processed is abstractly described and verified to ensure its correctness. This verification includes lexical and syntactic verification, specifically determining whether the calculation formula matches the computational language in the abstract description. If the verification passes, the calculation formula is pre-compiled; otherwise, an error message is displayed, and the calculation formula is corrected according to the abstract description.
[0048] In step S102, the calculation formula for the data index to be processed is pre-compiled to obtain the execution instruction, and the encrypted value of the execution instruction is calculated.
[0049] Furthermore, the step of pre-compiling the calculation formula of the data index to be processed to obtain execution instructions specifically includes: splitting the calculation formula of the data index to be processed into multiple independent instructions; the execution instructions include all the independent instructions obtained from the calculation formula of the data index to be processed.
[0050] Specifically, the above-mentioned data indicator calculation formula is split into independent processes that perform only one calculation. These processes are then pre-compiled to obtain independent execution instructions. For example, if the data indicator calculation formula contains the content "number of successful orders", it is split into "get successful orders" and "sum", and then the content is pre-compiled for the first time to obtain independent instructions.
[0051] After receiving the execution instruction, the encrypted value of the execution instruction is calculated, wherein the execution instruction contains all the independent instructions obtained by the calculation formula of the data index to be processed; therefore, the corresponding encrypted value also contains the encrypted value of all the independent instructions obtained by the calculation formula of the data index to be processed.
[0052] In one implementation, the encrypted value is an MD5 value obtained using the MD5 algorithm (Message-Digest Algorithm 5).
[0053] Further, the process of pre-compiling the calculation formula for the data indicator to be processed to obtain an execution instruction, calculating the encrypted value of the execution instruction, and then further includes: obtaining a cache, traversing the encrypted values in the cache, comparing the encrypted value of the execution instruction with the encrypted values in the cache, and determining whether there is an encrypted value in the cache that is the same as the encrypted value of the execution instruction. Specifically, obtaining the cache, traversing the encrypted values in the cache, and comparing the encrypted value of the execution instruction with the encrypted values in the cache includes: each encrypted value in the cache corresponds to a unique execution data indicator formula and execution program.
[0054] Specifically, after retrieving the cache, the cache stores the calculation formula for the data metrics to be processed, the encrypted value of the execution instruction, and the execution program corresponding to each program execution. Therefore, after retrieving the cache, the encrypted values in the cache can be traversed, and the encrypted value of the execution instruction can be compared with the encrypted value in the cache. Furthermore, the encrypted value in the cache corresponds to a unique execution data metric formula and execution program, and the encrypted value in the cache is the encrypted value of the execution instruction corresponding to each program execution.
[0055] In step S103, if there is an encrypted value in the cache that is the same as the encrypted value of the execution instruction, then the execution program of the execution instruction is obtained from the cache and the execution program is sent to the execution environment for execution.
[0056] It is understandable that, since the cache stores the calculation formula of the data index to be processed, the encrypted value of the execution instruction, and the execution program corresponding to each execution program, when there is an encrypted value in the cache that is the same as the encrypted value of the execution instruction, it can be assumed that the calculation formula of the data index to be processed has been processed previously and the relevant information has been saved in the cache. Therefore, the execution program of the execution instruction can be obtained from the cache and sent to the execution environment for execution.
[0057] By retrieving the executable program of the execution instruction from the cache and sending the executable program to the execution environment for execution, the embodiments of this application can avoid the process of repeatedly generating the executable program, thus saving computational resources.
[0058] In step S104, if there is no encrypted value in the cache that is the same as the encrypted value of the execution instruction, the execution instruction is processed according to the predefined adapter conversion relationship to obtain the specific instruction of the execution environment and verify it. After the verification is valid, the specific instruction is compiled to obtain the execution program of the specific instruction, and the execution program is sent to the execution environment for execution.
[0059] It is understandable that when the cache does not contain an encrypted value identical to the encrypted value of the execution instruction, it indicates that the same calculation formula for the data metrics to be processed has not been processed previously, thus requiring corresponding processing to generate an execution program. Specifically, the execution instruction is processed according to a predefined adapter conversion relationship to obtain and verify the specific instructions for the execution environment. This verification specifically involves checking the syntax and lexical rules of the target environment corresponding to the execution program. If the checks are valid, the specific instructions are compiled to obtain the execution program for the specific instructions, which is then sent to the execution environment for execution. If a discrepancy is found, an exception is thrown. Since the execution instruction contains multiple independent instructions, the specific instructions also contain multiple conversion-independent instructions. When compiling these multiple conversion-independent instructions, they are first linked and merged, and then compiled accordingly to obtain the execution program for the specific instructions.
[0060] Furthermore, before processing the execution instructions according to the predefined adapter conversion relationship, the method further includes: defining an adapter interface for the computing engine according to the target environment, and registering the adapter conversion relationship according to the adapter interface. This embodiment of the invention addresses environments with multiple computing engines by setting adapter interfaces for the computing engines and registering adapter conversion relationships through these interfaces. Specifically, based on the abstract description of the corresponding computing type according to the data indicator calculation formula, an adapter interface corresponding to that computing type is set to convert the adapter conversion relationship registered through the adapter interface into a type that can be operated in the target environment (i.e., the computing engine). The adapter interface consists of three parts: interface name, parameters and parameter types, and return value and return value type.
[0061] In one embodiment, the method for constructing data indicator programs across multi-source computing environments further includes: recording each execution program sent to the execution environment for execution, binding the calculation formula of the data indicator to be processed, the encrypted value of the execution instruction, and the execution program corresponding to each execution program, and storing them in a cache.
[0062] Specifically, for any encrypted value in the cache that is identical to the encrypted value of the execution instruction, the execution instruction is processed according to a predefined adapter conversion relationship to obtain the specific instruction of the execution environment and verify it. After the verification is valid, the specific instruction is compiled to obtain the execution program. The encrypted value of its execution instruction is also calculated, and the calculation formula of the data index to be processed corresponding to the execution program, the encrypted value of the execution instruction, and the execution program are bound together and stored in the cache.
[0063] The following describes an implementation process based on the steps of the data metric program construction method for cross-source computing environments described in this application, such as... Figure 2 As shown:
[0064] Step S21: Define an abstract description of the data indicator calculation formula and build an adapter;
[0065] Step S22: Obtain the data indicators to be processed and obtain the calculation formula for the data indicators to be processed;
[0066] Step S23: Detect the calculation formula of the data index to be processed. After the detection is passed, pre-compile the calculation formula of the data index to be processed.
[0067] Step S24.1: During execution, the method of obtaining the execution program is determined by the encrypted value; if an encrypted value identical to the encrypted value of the execution instruction exists in the cache, proceed to step S26; otherwise, proceed to step S24.2.
[0068] Step S24.2: Convert the execution instructions to obtain the specific instructions of the execution environment and verify them. If the verification is valid, proceed to step S25.
[0069] Step S25: Link and compile the specific instructions to obtain the executable program of the specific instructions, and cache the corresponding information;
[0070] Step S26: Send the executable program to the execution environment for execution.
[0071] In summary, the data indicator program construction method across multiple computing environments in this application embodiment allows the data indicators to be processed to obtain executable programs that can be executed in the execution environment through the method of this application embodiment. This enables flexible migration and deployment of data indicator programs between different computing environments, reduces repetitive development work, and improves the maintainability and scalability of data indicator programs. In other words, it solves the problem that data indicator programs in the prior art are designed for a single computing environment and cannot adapt to diverse computing needs.
[0072] Next, referring to the accompanying drawings, a data index program construction system for cross-source computing environments proposed in this application is described.
[0073] Figure 3 This is a block diagram of a data metric program construction system across a multi-source computing environment according to an embodiment of this application.
[0074] like Figure 3 As shown, the data indicator program construction system 10 across a multi-source computing environment includes: a first data processing module 100, a second data processing module 200, a first program sending module 300, and a second program sending module 400.
[0075] The first data processing module 100 is used to acquire the data indicators to be processed, and to process the data indicators to be processed according to the predefined data indicator calculation formula to obtain the data indicator calculation formula.
[0076] The second data processing module 200 is used to pre-compile the calculation formula of the data index to be processed, obtain the execution instruction, and calculate the encrypted value of the execution instruction.
[0077] The first program sending module 300 is used to retrieve the execution program of the execution instruction from the cache if there is an encrypted value in the cache that is the same as the encrypted value of the execution instruction, and send the execution program to the execution environment for execution.
[0078] The second program sending module 400 is used to process the execution instruction according to a predefined adapter conversion relationship if there is no encrypted value in the cache that is the same as the encrypted value of the execution instruction, obtain the specific instruction of the execution environment and verify it. After the verification is valid, the specific instruction of the execution environment is compiled to obtain the execution program of the specific instruction, and the execution program is sent to the execution environment for execution.
[0079] Optionally, in one embodiment of this application, the data indicator program construction system across multi-source computing environments further includes: a data indicator calculation formula abstract description pre-defined unit.
[0080] The data indicator calculation formula abstract description predefined unit is used to define the data indicator calculation formula abstract description according to the constraints of the operation. The operation includes arithmetic operation, aggregation operation, logical operation, comparison operation, date operation and string operation. The constraints include operation name, purpose and applicable data type.
[0081] Optionally, in one embodiment of this application, the second data processing module includes: a formula splitting pre-compilation unit and an execution instruction acquisition unit.
[0082] The formula splitting pre-compilation unit is used to split the calculation formula of the data index to be processed into multiple independent instructions.
[0083] An execution instruction acquisition unit, wherein the execution instructions include all independent instructions obtained from the calculation formula of the data index to be processed.
[0084] Optionally, in one embodiment of this application, the data indicator program construction system across multi-source computing environments further includes a cache comparison unit.
[0085] The cache comparison unit is used to obtain the cache, traverse the encrypted values in the cache, and compare the encrypted value of the execution instruction with the encrypted value in the cache; the encrypted value judgment unit is used to determine whether there is an encrypted value in the cache that is the same as the encrypted value of the execution instruction.
[0086] Optionally, in one embodiment of this application, the cache comparison unit further includes a corresponding unit.
[0087] In this context, the encrypted value in the cache of the corresponding unit corresponds to a unique execution instruction and execution program.
[0088] Optionally, in one embodiment of this application, the data metrics program construction system across multi-source computing environments further includes a caching unit.
[0089] The cache unit is used to record the execution program sent to the execution environment each time. It binds the calculation formula of the data indicators to be processed, the encrypted value of the execution instruction and the execution program corresponding to each execution program and stores them in the cache.
[0090] Optionally, in one embodiment of this application, the data index program construction system across multi-source computing environments further includes a transformation relationship definition unit.
[0091] The conversion relationship definition unit is used to define the adapter interface of the computing engine according to the target environment, and register the adapter conversion relationship according to the adapter interface.
[0092] It should be noted that the foregoing explanation of the data indicator program construction method embodiment across multi-source computing environments also applies to the data indicator program construction system across multi-source computing environments in this embodiment, and will not be repeated here.
[0093] The data indicator program construction system proposed in the embodiments of this application can enable the corresponding data indicator to be processed to obtain an executable program that can be executed in the execution environment through the method of the embodiments of this application. This allows for flexible migration and deployment of data indicator running programs between different computing environments, reduces repetitive development work, and improves the maintainability and scalability of data indicator programs. In other words, it solves the problem that data indicator programs are designed for a single computing environment and cannot adapt to diverse computing needs.
[0094] This solves the technical problem that data metrics programs are designed for a single computing environment and cannot adapt to diverse computing needs.
[0095] Figure 4 A block diagram illustrating the internal structure of a smart terminal provided in an embodiment of this application. The smart terminal may include:
[0096] The memory 501, the processor 502, and the computer program stored on the memory 501 and capable of running on the processor 502.
[0097] When the processor 502 executes the program, it implements the data index program construction method for cross-multi-source computing environments provided in the above embodiments.
[0098] Furthermore, smart terminals also include:
[0099] Communication interface 503 is used for communication between memory 501 and processor 502.
[0100] The memory 501 is used to store computer programs that can run on the processor 502.
[0101] Memory 501 may include high-speed RAM memory, and may also include non-volatile memory. volatile memory), for example, at least one disk storage.
[0102] If the memory 501, processor 502, and communication interface 503 are implemented independently, then the communication interface 503, memory 501, and processor 502 can be interconnected via a bus to complete communication between them. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EIS) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, Figure 4 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0103] Optionally, in a specific implementation, if the memory 501, processor 502, and communication interface 503 are integrated on a single chip, then the memory 501, processor 502, and communication interface 503 can communicate with each other through an internal interface.
[0104] Processor 502 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of this application.
[0105] This embodiment also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method for constructing data metrics programs across multi-source computing environments.
[0106] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0107] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0108] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or N executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.
[0109] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable storage medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable storage medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable storage medium could be paper or other suitable media on which the program can be printed, since the program can be obtained electronically by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.
[0110] It should be understood that the various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0111] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0112] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0113] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of this application.
[0114] It should be understood that the application of this application is not limited to the examples above. Those skilled in the art can make improvements or modifications based on the above description, and all such improvements and modifications should fall within the protection scope of the appended claims.
Claims
1. A method for constructing data metric programs across multi-source computing environments, characterized in that, The method for constructing data metrics programs across multi-source computing environments includes: Obtain the data indicators to be processed, and process the data indicators according to the predefined data indicator calculation formula to obtain the data indicator calculation formula. The calculation formula for the data index to be processed is pre-compiled to obtain the execution instruction, and the encrypted value of the execution instruction is calculated. If an encrypted value identical to the encrypted value of the execution instruction exists in the cache, then the execution program of the execution instruction is retrieved from the cache and sent to the execution environment for execution; If no encrypted value matching the encrypted value of the execution instruction exists in the cache, the execution instruction is processed according to a predefined adapter conversion relationship to obtain the specific instruction for the execution environment and verify it. If the verification is valid, the specific instruction is compiled to obtain the execution program of the specific instruction, and the execution program is sent to the execution environment for execution.
2. The method for constructing data metrics programs across multi-source computing environments according to claim 1, characterized in that, The process of acquiring the data metrics to be processed, and processing the data metrics according to a predefined data metric calculation formula to obtain the calculation formula for the data metrics to be processed, also includes: The data index calculation formula is defined based on the constraints of the operation. The operation includes arithmetic operation, aggregation operation, logical operation, comparison operation, date operation and string operation. The constraints include operation name, purpose and applicable data type.
3. The method for constructing data metrics across multi-source computing environments according to claim 1, characterized in that, The pre-compilation of the calculation formula for the data index to be processed to obtain the execution instruction specifically includes: The calculation formula for the data indicators to be processed is broken down and pre-compiled to obtain multiple independent instructions; The execution instructions include all the independent instructions obtained from the calculation formula of the data index to be processed.
4. The method for constructing data metrics programs across multi-source computing environments according to claim 1, characterized in that, The process of pre-compiling the calculation formula for the data index to be processed to obtain execution instructions, calculating the encrypted value of the execution instructions, and then further including: Retrieve the cache, iterate through the encrypted values in the cache, and compare the encrypted value of the execution instruction with the encrypted value in the cache; Determine whether there exists an encrypted value in the cache that is the same as the encrypted value of the execution instruction.
5. The method for constructing data metrics programs across multi-source computing environments according to claim 4, characterized in that, The step of retrieving the cache, traversing the encrypted values in the cache, and comparing the encrypted value of the execution instruction with the encrypted values in the cache, specifically includes: The encrypted value in the cache corresponds to a unique execution instruction and execution program.
6. The method for constructing data metrics programs across multi-source computing environments according to claim 1, characterized in that, The method for constructing data metrics programs across multi-source computing environments further includes: Each time an executable program is sent to the execution environment, it is recorded. The calculation formula of the data indicators to be processed, the encrypted value of the execution instruction, and the executable program corresponding to each executable program are bound and stored in the cache.
7. The method for constructing data metrics programs across multi-source computing environments according to claim 1, characterized in that, The process of processing the execution instructions according to the predefined adapter conversion relationship also includes, prior to: Define the adapter interface of the computing engine according to the target environment, and register the adapter conversion relationship according to the adapter interface.
8. A data metric program construction system for multi-source computing environments, characterized in that, The data metric program construction system across multi-source computing environments includes: The first data processing module is used to acquire the data indicators to be processed, and to process the data indicators to be processed according to the predefined data indicator calculation formula to obtain the data indicator calculation formula. The second data processing module is used to pre-compile the calculation formula of the data index to be processed, obtain the execution instruction, and calculate the encrypted value of the execution instruction; The first program sending module is used to retrieve the execution program of the execution instruction from the cache if there is an encrypted value in the cache that is the same as the encrypted value of the execution instruction, and send the execution program to the execution environment for execution. The second program sending module is used to process the execution instruction according to a predefined adapter conversion relationship if there is no encrypted value in the cache that is the same as the encrypted value of the execution instruction, obtain the specific instruction of the execution environment and verify it. After the verification is valid, the specific instruction of the execution environment is compiled to obtain the execution program of the specific instruction, and the execution program is sent to the execution environment for execution.
9. A smart terminal, characterized in that, The smart terminal includes a memory, a processor, and a data indicator program construction program for a multi-source computing environment stored in the memory and executable on the processor. When the data indicator program construction program for a multi-source computing environment is executed by the processor, it implements the steps of the data indicator program construction method for a multi-source computing environment as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a data indicator program construction program for a multi-source computing environment, which, when executed by a processor, implements the steps of the data indicator program construction method for a multi-source computing environment as described in any one of claims 1-7.