Optimization method of JMP data scheduling link and related device
By obtaining scheduling tasks on the JMP platform and calling interfaces in turn, data loading and cache refreshing from the bottom table to the front-end application is realized, the problem of complex scheduling links is solved, and scheduling efficiency and development efficiency are improved.
Patent Information
- Application Number
- CN202411234342.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-04
- Publication Date
- 2024-12-03
AI Technical Summary
On the JMP platform, the data scheduling link from the bottom table to the front-end application is too complex and multiple scheduling jobs are required, resulting in inscheduling efficiency.
By obtaining the data source, bottom table and accounting date in the scheduling task, and calling the load task construction interface, accounting date and cache refresh interface in turn, the data is loaded from the bottom table to the Kylin middleware and refreshed to the cache of the application page, simplifying scheduling process.
Complete multiple original scheduling processes in one job, simplifying the data loading link, improving development efficiency and scheduling efficiency, and reducing job configuration time.
Smart Images

Figure CN119065748A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of software technology, and in particular to an optimization method and related device for a JMP data scheduling link. Background Art
[0002] When developing data, it is necessary to configure relevant scheduling jobs for the developed base table on the Job Manager Platform (JMP) platform to load the data of the base table into the relevant middleware first, and then load it from the middleware to the front-end application.
[0003] Generally speaking, each base table will be configured with a periodic batch job in units of days or months. The relevant data loading job will be configured downstream of the periodic batch job to load the data of the base table after the batch job is completed into the middleware. In this way, when the front-end application queries data from the middleware, its efficiency is much higher than that of querying data from the base table. In addition, the accounting date and cache refresh job of the application-side page must be configured downstream of the data loading job to implement data updates on the application-side page.
[0004] Therefore, the entire process of scheduling JMP data scheduling chain jobs from the base table to the front-end application is too complicated. Each base table in the development process needs to be configured with at least three scheduling jobs, which will obviously greatly reduce the scheduling efficiency. Summary of the invention
[0005] In view of the above problems, the present application provides a JMP data scheduling link optimization method and related devices to achieve the purpose of improving the scheduling efficiency of the JMP data scheduling link. The specific scheme is as follows:
[0006] The first aspect of the present application provides a method for optimizing a JMP data scheduling link, the method comprising:
[0007] Obtaining a scheduling task, wherein the scheduling task includes a first identifier corresponding to a data source, a second identifier corresponding to a base table, and an accounting date;
[0008] In the case where the first identifier indicates that the data source is Kylin middleware, calling a loading task construction interface based on the second identifier to realize construction of a loading task for loading the data of the base table into the Kylin middleware;
[0009] The accounting date and cache refresh interface are called based on the accounting date to query the first target data under the accounting date from the Kylin middleware and refresh the first target data to the cache of the application-side page.
[0010] In a possible implementation, the JMP data scheduling link optimization method further includes:
[0011] Obtain and parse the first call status code returned by the loading task construction interface;
[0012] Determine whether the loading task construction interface is successfully called according to the first calling status code;
[0013] If the loading task construction interface is successfully called, the step of calling the accounting date and cache refresh interface based on the accounting date is executed;
[0014] If the loading task construction interface is not called successfully, an exception error is output.
[0015] In a possible implementation, the JMP data scheduling link optimization method further includes:
[0016] If the loading task construction interface is successfully called, the loading task status return interface is called to monitor the construction status of the loading task;
[0017] Obtain and parse the task construction code returned by the loading task status return interface;
[0018] If the task construction code is not empty and the task construction code indicates that the loading task is successfully constructed, executing the step of calling the accounting date and cache refresh interface based on the accounting date;
[0019] When the task construction code is not empty and the task construction code indicates that the loading task construction fails, an exception error is output.
[0020] In a possible implementation, the scheduling task further includes a state polling time and a state waiting time, and the optimization method of the JMP data scheduling link further includes:
[0021] When the task construction code is not empty and the construction status indicates that the loading task is being constructed, waiting is performed according to the status polling time, and when the first time of waiting reaches the status polling time, returning to execute the step of calling the loading task status return interface;
[0022] When the task construction code is empty, wait according to the status waiting time, and when the second waiting time reaches the status waiting time, return to execute the step of calling the loading task status return interface.
[0023] In a possible implementation, the JMP data scheduling link optimization method further includes:
[0024] When the first identifier indicates that the data source is not the Kylin middleware, the accounting date and cache refresh interface is called based on the second identifier and the accounting date to query the second target data under the accounting date from the base table and refresh the second target data to the cache of the application-side page.
[0025] In a possible implementation, the JMP data scheduling link optimization method further includes:
[0026] Obtain and parse the accounting date and the second call status code returned by the cache refresh interface;
[0027] Determine whether the accounting date and cache refresh interface are successfully called according to the second call status code;
[0028] If the accounting date and cache refresh interface call is successful, the task call is terminated;
[0029] If the accounting date and cache refresh interface are not called successfully, an exception error is output.
[0030] A second aspect of the present application provides an optimization device for a JMP data scheduling link, the optimization device for a JMP data scheduling link comprising:
[0031] A task acquisition module, used to acquire a scheduling task, wherein the scheduling task includes a first identifier corresponding to a data source, a second identifier corresponding to a base table, and an accounting date;
[0032] A task scheduling module is used to call the loading task construction interface based on the second identifier to realize the construction of a loading task for loading the data of the base table into the Kylin middleware when the first identifier indicates that the data source is the Kylin middleware; and to call the accounting date and cache refresh interface based on the accounting date to realize the query of the first target data under the accounting date from the Kylin middleware and the refresh of the first target data to the cache of the application-side page.
[0033] The third aspect of the present application provides a computer program product, including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements the optimization method of the JMP data scheduling link of the above-mentioned first aspect or any implementation method of the first aspect.
[0034] A third aspect of the present application provides an electronic device, comprising at least one processor and a memory connected to the processor, wherein:
[0035] The memory is used to store computer programs;
[0036] The processor is used to execute the computer program so that the electronic device can implement the optimization method of the JMP data scheduling link of the above-mentioned first aspect or any implementation method of the first aspect.
[0037] The fourth aspect of the present application provides a computer storage medium, which carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement the optimization method of the JMP data scheduling link of the above-mentioned first aspect or any implementation method of the first aspect.
[0038] By means of the above technical scheme, the present application provides a method and related device for optimizing the JMP data scheduling link, including: obtaining a scheduling task, wherein the scheduling task includes a first identifier corresponding to the data source, a second identifier corresponding to the base table, and an accounting date; when the first identifier indicates that the data source is Kylin middleware, calling the loading task construction interface based on the second identifier to realize the construction of a loading task for loading the data of the base table into the Kylin middleware; calling the accounting date and cache refresh interface based on the accounting date to realize querying the first target data under the accounting date from the Kylin middleware and refreshing the first target data to the cache of the application-side page. The present application calls different interfaces in sequence according to the JMP job link scheduling process to complete the original scheduling process of at least three jobs in one job, which not only simplifies the link process of JMP data loading and makes the entire scheduling link clearer, but also saves the job configuration time of each base table, and improves the development work and scheduling efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0040] Figure 1 A schematic diagram of a flow chart of a JMP data scheduling link optimization method provided in an embodiment of the present application;
[0041] Figure 2 Another flowchart of a JMP data scheduling link optimization method provided in an embodiment of the present application;
[0042] Figure 3 Another flowchart of a JMP data scheduling link optimization method provided in an embodiment of the present application;
[0043] Figure 4 Another flowchart of a JMP data scheduling link optimization method provided in an embodiment of the present application;
[0044] Figure 5 A schematic diagram of the structure of an optimization device for a JMP data scheduling link provided in an embodiment of the present application;
[0045] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0046] The following describes the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. The terms used in the implementation method section of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application.
[0047] The embodiments of the present application are described below in conjunction with the accompanying drawings. Those skilled in the art will appreciate that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0048] The terms "first", "second" etc. in the specification of the application and the above-mentioned drawings are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable in appropriate circumstances, and this is only to describe the distinction mode adopted by the objects of the same attributes when describing in the embodiments of the application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0049] After research, the inventor found that the entire link process of loading the data in the base table to the front-end application on the JMP platform is essentially a process of calling different interfaces in sequence. Taking Kylin middleware as an example, the daily loading job of the Segment task of Kylin middleware is essentially realized by calling the Segment loading task construction interface, that is, the base table data completed by the daily batch run can be loaded into the Kylin middleware through the Segment loading task construction interface. In addition, the accounting date and cache refresh job of the application-side page is essentially realized by calling the accounting date and cache refresh interface, that is, the accounting date and cache refresh interface can be used to query the data of the day from the Kylin middleware according to the refreshed accounting date and refresh the cache of the application-side page. In other words, as long as the parameters passed in are kept consistent when calling these interfaces in sequence, the calls of these interfaces can be realized simultaneously in the scheduling job of a script.
[0050] Based on this, in order to further improve the work efficiency of the data side when configuring JMP daily scheduling jobs, simplify the link process of configuring multiple JMP scheduling jobs when loading data from the base table through the middleware to the front-end application, and optimize the process of configuring at least three scheduling jobs when loading data, the embodiment of the present application provides a JMP data scheduling link optimization method. In order to unify the parameter transmission of the above interface, by configuring the data source, base table and accounting date as the incoming parameters of the new scheduling job in the scheduling task, only one job needs to be configured to complete the multiple jobs in the above data loading link, which simplifies the process of the data loading link, reduces the workload of configuring JMP jobs, and improves the productivity of developers. The following is a detailed introduction to the JMP data scheduling link optimization method of the embodiment of the present application in conjunction with the accompanying drawings.
[0051] See also Figure 1 , Figure 1 A schematic diagram of a flow chart of a JMP data scheduling link optimization method provided in an embodiment of the present application. Figure 1 As shown, a JMP data scheduling link optimization method provided in an embodiment of the present application can be implemented through a Python script, including steps S10 to S30, and these steps are described in detail below.
[0052] S10, obtaining a scheduling task, wherein the scheduling task includes a first identifier corresponding to the data source, a second identifier corresponding to the base table, and an accounting date.
[0053] In the embodiment of the present application, a scheduling task is configured for each scheduling process of loading data from the base table to the front-end application, and the scheduling task includes a first representation corresponding to the data source, a second identifier corresponding to the base table, and an accounting date.
[0054] S20, when the first identifier indicates that the data source is Kylin middleware, calling the loading task construction interface based on the second identifier to realize construction of a loading task for loading the data of the base table into the Kylin middleware.
[0055] In the embodiment of the present application, the first identifier is used to mark the data source, so the type of the data source can be determined based on the first identifier. If the first identifier indicates that the data source is Kylin middleware, the second identifier used to mark the base table can be passed into the loading task construction interface to call the loading task construction interface. Specifically, the subprocess.check_output function provided by the Python script can be used to implement the call of the task construction interface. By calling the loading task construction interface, the loading task corresponding to this scheduling task can be constructed, and the loading task is used to load the data of the base table into the Kylin middleware.
[0056] Specifically, in the process of loading the data of the bottom table into the Kylin middleware, firstly, the mapping relationship table between the bottom table and the Kylin model stored in the database is retrieved. A bottom table can establish a mapping relationship with one or more Kylin models; then, at least one Kylin model corresponding to the second identifier is queried from the mapping relationship table as the target Kylin model; further, the target Kylin model loads the bottom data into the cube of the day.
[0057] S30, calling the accounting date and cache refresh interface based on the accounting date to query the first target data under the accounting date from the Kylin middleware and refresh the first target data to the cache of the application-side page.
[0058] In the embodiment of the present application, through the times package provided by the Python script, the accounting date can be processed using the time processing functions in the times package to meet the job scheduling of different periods such as days or months. Taking the periodic batch operation as a month as an example, it is stipulated that the data in the base table is batch loaded into the Kylin middleware on the 15th of each month. When the accounting date is August 16, 2024, the time processing functions in the times package can be used to process the accounting date to July 15, 2024, that is, the new accounting date of July 15, 2024 is obtained.
[0059] After using the time processing functions in the times package to process the accounting date to obtain a new accounting date, the new accounting date can be passed to the accounting date and cache refresh interface to call the accounting date and cache refresh interface. Specifically, the subprocess.check_output function provided by the Python script can be used to call the accounting date and cache refresh interface. By calling the accounting date and cache refresh interface, the first target data under the new accounting date is loaded from the Kylin middleware. Specifically, the first target data can be loaded from the cube under the new accounting date in the Kylin model, and finally the first target data is refreshed to the cache of the application page.
[0060] In a possible implementation, the calling status of the loading task construction interface is obtained in time to improve the scheduling efficiency. Figure 2 , Figure 2 Another flow chart of a JMP data scheduling link optimization method provided in an embodiment of the present application. Figure 2 As shown, a JMP data scheduling link optimization method provided in an embodiment of the present application may also include steps S40 to S60, and these steps are described in detail below.
[0061] S40, obtaining and parsing the first calling status code returned by the loading task construction interface.
[0062] In the embodiment of the present application, the loading task construction interface can return its corresponding first call status code, and the first call status code can be parsed and obtained using the json.loads provided by the Python script.
[0063] S50, judging whether the loading task construction interface is successfully called according to the first calling status code; if so, executing step S30; if not, executing step S60.
[0064] In an embodiment of the present application, if the first call status code is "000000", indicating that the loading task construction interface call is successful, then step S30 is executed; otherwise, if the first call status code is not "000000", indicating that the loading task construction interface call fails, then step S60 is executed.
[0065] S60, output abnormality error.
[0066] In the embodiment of the present application, the failure of calling the loading task construction interface may be due to the fact that the base table is not queried, the mapping relationship between the base table and the Kylin model does not exist, network failure, etc. In this case, an exception can be thrown and an error can be reported for the scheduling job to output an exception error.
[0067] In a possible implementation, in order to obtain the construction status of the loading task in time and determine whether the loading task is successfully built, the scheduling efficiency is improved. Figure 3 , Figure 3 Another flow chart of a JMP data scheduling link optimization method provided in an embodiment of the present application. Figure 3 As shown, a JMP data scheduling link optimization method provided in an embodiment of the present application may also include steps S70 to S90, and these steps are described in detail below.
[0068] S70, if the loading task construction interface is successfully called, the loading task status return interface is called to monitor the construction status of the loading task.
[0069] In the embodiment of the present application, if the loading task construction interface is successfully called, the subprocess.check_output function provided by the Python script is used to call the loading task status return interface. By calling the loading task status return interface, the construction status of the loading task can be monitored.
[0070] S80, obtain and parse the task construction code returned by the loading task status return interface. If the task construction code is not empty and the task construction code indicates that the loading task is successfully constructed, execute step S30; if the task construction code is not empty and the task construction code indicates that the loading task fails to be constructed, execute step S90.
[0071] In the embodiment of the present application, the loading task status return interface can return its corresponding task construction code, and the json.loads provided by the Python script can parse and obtain the task construction code.
[0072] If the task construction code is not empty and the task construction code is "FINISHED", it means that the loading task is successfully constructed, and then step S30 is executed.
[0073] S90, output abnormality error.
[0074] In the embodiment of the present application, when the task construction code is not empty and the task construction code is any one of "ERROR", "TIMEOUT", "DISCARDED" and "STOPPED", it means that the loading task construction has failed, and an exception can be thrown and an error can be reported to schedule the job, thereby outputting an exception error. Among them, the task construction code "ERROR" indicates that an error has occurred in the loading task construction, the task construction code "TIMEOUT" indicates that the loading task construction has timed out, the task construction code "DISCARDED" indicates that the loading task construction has been canceled, and the task construction code "STOPPED" indicates that the loading task construction has been stopped.
[0075] On this basis, in order to achieve flexible scheduling, the scheduling task also includes a state polling time and a state waiting time. The optimization method of a JMP data scheduling link provided in an embodiment of the present application also includes the following steps:
[0076] When the task construction code is not empty and the construction status indicates that the loading task is being constructed, the system waits according to the status polling time, and when the first waiting time reaches the status polling time, the system returns to execute step S70.
[0077] When the task construction code is empty, the process waits according to the state waiting time, and when the second waiting time reaches the state waiting time, the process returns to step S70.
[0078] In the embodiment of the present application, when the task construction code is not empty and the task construction code is other than the above-mentioned "FINISHED", "ERROR", "TIMEOUT", "DISCARDED" and "STOPPED" (such as "RUNNING"), the waiting state polling time can be followed, and when the waiting state polling time is reached at the first time, the execution returns to step S70, i.e., the loading task state return interface is re-called. Among them, the task construction code "RUNNING" indicates that the loading task is being constructed.
[0079] In addition, the task construction code is empty, indicating that the loading task status return interface has not returned any task construction code. At this time, you can wait according to the status waiting time, and when the second waiting time reaches the status waiting time, return to execute step S70, that is, re-call the loading task status return interface.
[0080] In a possible implementation, if the data source is not Kylin middleware, the accounting date and cache refresh interfaces can be called directly. Figure 4 , Figure 4 Another flow chart of a JMP data scheduling link optimization method provided in an embodiment of the present application. Figure 4 As shown, a JMP data scheduling link optimization method provided in an embodiment of the present application may further include step S100, which is described in detail below.
[0081] S100, when the first identifier indicates that the data source is not Kylin middleware, the accounting date and cache refresh interface is called based on the second identifier and the accounting date to query the second target data under the accounting date from the base table and refresh the second target data to the cache of the application-side page.
[0082] In an embodiment of the present application, if the first identifier indicates that the data source is not Kylin middleware, for example, the data source is a base table (such as an Impala base table), then the accounting date can be processed using the time processing function in the times package to meet the job scheduling of different periods such as days or months to obtain a new accounting date. The process of obtaining the new accounting date will not be repeated.
[0083] The second identifier and the new accounting date are passed to the accounting date and cache refresh interface to call the accounting date and cache refresh interface. Specifically, the subprocess.check_output function provided by the Python script can be used to call the accounting date and cache refresh interface. The second target data under the new accounting date is loaded from the base table by calling the accounting date and cache refresh interface, and the second target data is refreshed to the cache of the application page.
[0084] In a possible implementation, in order to obtain the accounting date and the calling status of the cache refresh interface in a timely manner to improve the scheduling efficiency, the optimization method of the JMP data scheduling link provided by the embodiment of the present application also includes the following steps:
[0085] Obtain and parse the second call status code returned by the accounting date and cache refresh interface; determine whether the accounting date and cache refresh interface are called successfully based on the second call status code; if the accounting date and cache refresh interface are called successfully, end the task call; if the accounting date and cache refresh interface are not called successfully, output an exception error.
[0086] In an embodiment of the present application, the accounting date and cache refresh interface can return its corresponding second call status code, and the second call status code can be parsed and obtained using the json.loads provided by the Python script.
[0087] If the second call status code is "000000", it means that the accounting date and cache refresh interface calls are successful, and the task call can be ended at this time; conversely, if the second call status code is not "000000", it means that the accounting date and cache refresh interface calls have failed, and an exception can be thrown and an error can be reported for the scheduling job to output the exception error.
[0088] Through the above description, an optimization method for a JMP data scheduling link provided by an embodiment of the present application only needs to configure a job on the JMP platform and pass in the scheduling task to complete the entire link process of loading data from the base table to the front-end application and updating the application-side page data. Specifically, a python script is used to call the loading task construction interface, the loading task status return interface, the accounting date and the cache refresh interface in sequence in one script according to the link scheduling process of the original JMP job, and the original scheduling process of at least three jobs is completed in one job. This not only simplifies the link process of JMP data loading and makes the entire scheduling link clearer, but also saves the job configuration time of each base table, improving the development work and scheduling efficiency.
[0089] The above introduces a JMP data scheduling link optimization method provided by an embodiment of the present application. The following will introduce a device for executing the above JMP data scheduling link optimization method.
[0090] See also Figure 5 , Figure 5 A schematic diagram of the structure of an optimization device for a JMP data scheduling link provided in an embodiment of the present application. Figure 5 As shown, the optimization device of the JMP data scheduling link includes:
[0091] The task acquisition module 10 is used to acquire a scheduling task, wherein the scheduling task includes a first identifier corresponding to the data source, a second identifier corresponding to the base table, and an accounting date;
[0092] The task scheduling module 20 is used to call the loading task construction interface based on the second identifier to realize the construction of a loading task for loading the data of the base table into the Kylin middleware when the first identifier represents that the data source is the Kylin middleware; and call the accounting date and cache refresh interface based on the accounting date to realize the query of the first target data under the accounting date from the Kylin middleware and refresh the first target data to the cache of the application-side page.
[0093] In a possible implementation, the task scheduling module 20 is further configured to:
[0094] Obtain and parse the first call status code returned by the loading task construction interface; determine whether the loading task construction interface is successfully called based on the first call status code; if the loading task construction interface is successfully called, execute the step of calling the accounting date and cache refresh interface based on the accounting date; if the loading task construction interface is not successfully called, output an exception error.
[0095] In a possible implementation, the task scheduling module 20 is further configured to:
[0096] If the loading task construction interface is called successfully, call the loading task status return interface to monitor the construction status of the loading task; obtain and parse the task construction code returned by the loading task status return interface; when the task construction code is not empty and the task construction code indicates that the loading task is successfully built, execute the step of calling the accounting date and cache refresh interface based on the accounting date; when the task construction code is not empty and the task construction code indicates that the loading task fails to build, output an exception error.
[0097] In a possible implementation, the scheduling task further includes a status polling time and a status waiting time, and the task scheduling module 20 is further used to:
[0098] When the task build code is not empty and the build status indicates that the loading task is being built, wait according to the status polling time, and when the status polling time is reached during the first waiting time, return to execute the step of calling the loading task status return interface; when the task build code is empty, wait according to the status waiting time, and when the status waiting time is reached during the second waiting time, return to execute the step of calling the loading task status return interface.
[0099] In a possible implementation, the task scheduling module 20 is further configured to:
[0100] When the first identifier indicates that the data source is not Kylin middleware, the accounting date and cache refresh interface is called based on the second identifier and the accounting date to query the second target data under the accounting date from the base table and refresh the second target data to the cache of the application page.
[0101] In a possible implementation, the task scheduling module 20 is further configured to:
[0102] Obtain and parse the second call status code returned by the accounting date and cache refresh interface; determine whether the accounting date and cache refresh interface are called successfully based on the second call status code; if the accounting date and cache refresh interface are called successfully, end the task call; if the accounting date and cache refresh interface are not called successfully, output an exception error.
[0103] It should be noted that the detailed functions of each module in the embodiment of the present application can be found in the corresponding public part of the above-mentioned JMP data scheduling link optimization method embodiment, which will not be repeated here.
[0104] The present application also provides an electronic device in an embodiment. Figure 6 , Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device in the embodiment of the present application may include but is not limited to fixed terminals such as mobile phones, laptops, PDAs (personal digital assistants), PADs (tablet computers), desktop computers, etc. Figure 6 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0105] like Figure 6 As shown, the electronic device may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 to a random access memory (RAM) 603. When the electronic device is powered on, various programs and data required for the operation of the electronic device are also stored in the RAM 603. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0106] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a memory card, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although Figure 6 An electronic device having various devices is shown, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0107] An embodiment of the present application also provides a computer program product including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements any one of the JMP data scheduling link optimization methods provided in the embodiments of the present application.
[0108] A computer-readable storage medium is also provided in an embodiment of the present application. The storage medium carries one or more computer programs. When one or more computer programs are executed by an electronic device, the electronic device can implement any JMP data scheduling link optimization method provided in an embodiment of the present application.
[0109] It should also be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the device embodiments provided by the present application, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.
[0110] Through the description of the above implementation mode, the technicians in the field can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components, etc. In general, all functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present application, software program implementation is a better implementation mode in more cases. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a ROM, a RAM, a disk or an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a training device, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0111] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.
[0112] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a training device, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, training device, or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.
Claims
1. A JMP data scheduling link optimization method, It is characterized in that The optimization method of the JMP data scheduling link includes: Obtaining a scheduling task, wherein the scheduling task includes a first identifier corresponding to a data source, a second identifier corresponding to a base table, and an accounting date; In the case where the first identifier indicates that the data source is Kylin middleware, calling a loading task construction interface based on the second identifier to realize construction of a loading task for loading the data of the base table into the Kylin middleware; The accounting date and cache refresh interface are called based on the accounting date to query the first target data under the accounting date from the Kylin middleware and refresh the first target data to the cache of the application-side page.
2. The optimization method of the JMP data scheduling link according to claim 1, It is characterized in that The optimization method of the JMP data scheduling link also includes: Obtain and parse the first call status code returned by the loading task construction interface; Determine whether the loading task construction interface is successfully called according to the first calling status code; If the loading task construction interface is successfully called, the step of calling the accounting date and cache refresh interface based on the accounting date is executed; If the loading task construction interface is not called successfully, an exception error is output.
3. The optimization method of the JMP data scheduling link according to claim 2, It is characterized in that The optimization method of the JMP data scheduling link also includes: If the loading task construction interface is successfully called, the loading task status return interface is called to monitor the construction status of the loading task; Obtain and parse the task construction code returned by the loading task status return interface; If the task construction code is not empty and the task construction code indicates that the loading task is successfully constructed, executing the step of calling the accounting date and cache refresh interface based on the accounting date; When the task construction code is not empty and the task construction code indicates that the loading task construction fails, an exception error is output.
4. The optimization method for the JMP data scheduling link according to claim 3, It is characterized in that The scheduling task also includes a state polling time and a state waiting time, and the optimization method of the JMP data scheduling link also includes: When the task construction code is not empty and the construction status indicates that the loading task is being constructed, waiting is performed according to the status polling time, and when the first time of waiting reaches the status polling time, returning to execute the step of calling the loading task status return interface; When the task construction code is empty, wait according to the status waiting time, and when the second waiting time reaches the status waiting time, return to execute the step of calling the loading task status return interface.
5. The optimization method of the JMP data scheduling link according to claim 1, It is characterized in that The optimization method of the JMP data scheduling link also includes: When the first identifier indicates that the data source is not the Kylin middleware, the accounting date and cache refresh interface is called based on the second identifier and the accounting date to query the second target data under the accounting date from the base table and refresh the second target data to the cache of the application-side page.
6. The optimization method of the JMP data scheduling link according to claim 1 or 5, It is characterized in that The optimization method of the JMP data scheduling link also includes: Obtain and parse the accounting date and the second call status code returned by the cache refresh interface; Determine whether the accounting date and cache refresh interface are successfully called according to the second call status code; If the accounting date and cache refresh interface call is successful, the task call is terminated; If the accounting date and cache refresh interface are not called successfully, an exception error is output.
7. An optimization device for a JMP data scheduling link, It is characterized in that The optimization device of the JMP data scheduling link includes: A task acquisition module, used to acquire a scheduling task, wherein the scheduling task includes a first identifier corresponding to a data source, a second identifier corresponding to a base table, and an accounting date; A task scheduling module is used to call the loading task construction interface based on the second identifier to realize the construction of a loading task for loading the data of the base table into the Kylin middleware when the first identifier indicates that the data source is the Kylin middleware; and to call the accounting date and cache refresh interface based on the accounting date to realize the query of the first target data under the accounting date from the Kylin middleware and the refresh of the first target data to the cache of the application-side page.
8. A computer program product, It is characterized in that It includes computer-readable instructions, and when the computer-readable instructions are executed on an electronic device, the electronic device implements the optimization method of the JMP data scheduling link as described in any one of claims 1 to 6.
9. An electronic device, It is characterized in that The method comprises at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program so that the electronic device can implement the optimization method of the JMP data scheduling link as described in any one of claims 1 to 6.
10. A computer storage medium, It is characterized in that The storage medium carries one or more computer programs, and when the one or more computer programs are executed by an electronic device, the electronic device can implement the optimization method of the JMP data scheduling link as described in any one of claims 1 to 6.
Citation Information
Cited By
Method and system for realizing animation interactive preview
CN121213745A
