Online program package running method and device, electronic equipment and storage medium

By utilizing a pre-built SDK to encapsulate and call platform resources during the JAR package runtime, the problem of high data platform maintenance costs in existing technologies is solved, achieving lower-cost and more efficient online package execution.

CN114153434BActive Publication Date: 2025-11-04BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111403851.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-24
Publication Date
2025-11-04
Estimated Expiration
2041-11-24

AI Technical Summary

Technical Problem

In existing technologies, running a JAR package using the command method requires calling the persistent services of the data platform, which necessitates the data platform to maintain these persistent services, thereby increasing maintenance costs.

Method used

By receiving the raw program package uploaded from outside, encapsulating it using a pre-built SDK, generating a target program package that integrates the SDK and the raw program package, and directly calling platform resources at runtime using the calling interface in the SDK, the dependency on resident services is avoided.

Benefits of technology

It reduces the maintenance cost of the data platform, improves the user experience and operational intuitiveness, lowers the user cost, and increases the flexibility and processing efficiency of the program.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114153434B_ABST
    Figure CN114153434B_ABST
Patent Text Reader

Abstract

The application provides an online program package running method and device, electronic equipment and a storage medium, and belongs to the technical field of computers. The application receives an externally uploaded original program package, encapsulates the original program package by using a preinstalled software development kit (SDK) to obtain a target program package integrated with the SDK and the original program package, and defines a calling interface for calling resources in a platform in the SDK. When a program running instruction is received, the target program package is run. The program running instruction carries resource information, and in the process of running the target program package, the calling interface in the SDK is used to call resources corresponding to the resource information in the platform. Thus, the maintenance cost of a data platform capable of running program packages online can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, and particularly relates to an online program package running method and device, electronic equipment and storage medium. BACKGROUND

[0002] A jar package, i.e. a program package, is a file package packed by a Java program. Online running of the jar package refers to uploading the jar package to a data platform and running the jar package on the data platform.

[0003] At present, the jar package is usually run online by using a command mode, specifically including: installing a jar package running environment on the data platform, storing a user-uploaded jar package in a specified position and calling a pre-written running command or script in the data platform to run the jar package.

[0004] However, when the jar package is run by using the command mode, a resident service of the data platform needs to be called to be connected with resources of the data platform, which leads to that a user needs to understand an interface rule of the resident service to call the resident service, thereby increasing a user use cost, and the data platform needs to maintain the resident service, thereby increasing a maintenance cost of the data platform. SUMMARY

[0005] Embodiments of the present application aim to provide an online program package running method and device, electronic equipment and storage medium, to solve the problem that the jar package needs to be run by using the command mode and the resident service of the data platform needs to be called to be connected with the resources of the data platform, which leads to that the data platform needs to maintain the resident service, thereby increasing the maintenance cost of the data platform. The specific technical solutions are as follows:

[0006] In a first aspect, an online program package running method is provided, and the method includes:

[0007] receiving an original program package uploaded externally;

[0008] encapsulating the original program package by using a preset software development kit (SDK) to obtain a target program package integrated with the SDK and the original program package, and the SDK defines a calling interface used for calling resources in a platform;

[0009] running the target program package when a program running instruction is received, wherein the program running instruction carries resource information, and the calling interface in the SDK is used to call resources corresponding to the resource information in the platform in the process of running the target program package.

[0010] In one possible implementation, the running of the target program package includes:

[0011] running the target program package in a reflection mechanism by using the SDK.

[0012] In one possible implementation, the receiving the externally uploaded original program package comprises:

[0013] outputting a visual interface, the visual interface comprising at least a control for uploading a program package;

[0014] receiving the externally uploaded original program package through the visual interface.

[0015] In one possible implementation, the method further comprises:

[0016] when detecting a triggering operation on a first object in the visual interface, triggering an interrupt instruction, the first object being a button in the visual interface for indicating interrupting running of a program package;

[0017] interrupting running of the target program package based on the interrupt instruction.

[0018] In one possible implementation, the method further comprises:

[0019] when detecting a triggering operation on a second object in the visual interface, triggering the program running instruction, the second object being a button in the visual interface for indicating running of a program package.

[0020] In one possible implementation, the outputting the visual interface comprises:

[0021] sending a webpage acquisition request to the platform, so that the platform returns a data platform page in response to the webpage acquisition request, the data platform page integrating an online running component;

[0022] when detecting a triggering operation on the online running component on the data platform page, starting the online running component and outputting a visual interface corresponding to the online running component.

[0023] In one possible implementation, the method further comprises:

[0024] after interrupting or ending running of the target program package, acquiring an execution log generated in the process of running the target program package;

[0025] outputting the execution log through the visual interface.

[0026] In a second aspect, an online program package running apparatus is provided, the apparatus comprising:

[0027] a receiving module configured to receive an externally uploaded original program package;

[0028] a packaging module, configured to package the original program package by using a preset software development kit (SDK) to obtain a target program package integrated with the SDK and the original program package, and the SDK defines a calling interface for calling resources in a platform;

[0029] a running module, configured to run the target program package when receiving a program running instruction, wherein the program running instruction carries resource information, and the calling interface in the SDK is used to call resources corresponding to the resource information in the platform in a process of running the target program package.

[0030] In one possible implementation, the running module is specifically configured to:

[0031] run the target program package by using the SDK in a reflection mechanism.

[0032] In one possible implementation, the receiving of the original program package uploaded by an external device includes:

[0033] outputting a visual interface, and the visual interface includes at least a control for uploading a program package;

[0034] receiving the original program package uploaded by the external device through the visual interface.

[0035] In one possible implementation, the apparatus further includes a first triggering module, and the first triggering module is configured to:

[0036] trigger an interrupt instruction when detecting a triggering operation on a first object in the visual interface, the first object being a button in the visual interface for indicating interrupting running of a program package;

[0037] interrupt running of the target program package based on the interrupt instruction.

[0038] In one possible implementation, the apparatus further includes a second triggering module, and the second triggering module is configured to:

[0039] trigger the program running instruction when detecting a triggering operation on a second object in the visual interface, the second object being a button in the visual interface for indicating running of a program package.

[0040] In one possible implementation, the running module is further configured to:

[0041] send a webpage acquisition request to the platform, so that the platform returns a data platform page in response to the webpage acquisition request, and the data platform page is integrated with an online running component;

[0042] When a triggering operation on the online running component is detected on the data platform page, the online running component is started, and a visual interface corresponding to the online running component is output.

[0043] In one possible implementation, the apparatus further includes an output module, configured to:

[0044] After the target program package running is interrupted or ended, an execution log generated in the process of running the target program package is acquired;

[0045] The execution log is output through the visual interface.

[0046] In a third aspect, an electronic device is provided, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete communication with each other through the communication bus;

[0047] The memory is configured to store a computer program;

[0048] The processor is configured to execute the program stored on the memory, and implement the steps of the online program package running method according to any one of the first aspect.

[0049] In a fourth aspect, a computer readable storage medium is provided, characterized in that the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the online program package running method according to any one of the first aspect.

[0050] In a fifth aspect, a computer program product including instructions is provided, which, when executed on a computer, causes the computer to execute the online program package running method according to any one of the above aspects.

[0051] The technical solution provided by the embodiments of the present application receives an externally uploaded original program package, encapsulates the original program package by using a preset SDK, obtains a target program package integrated with the SDK and the original program package, and runs the target program package when a program running instruction is received. Since the SDK defines a calling interface for calling resources in the platform, the data platform can directly call the resources in the platform corresponding to the resource information carried by the program running instruction in the process of running the target program package. As can be seen, compared with the prior art, in the technical solution of the present application, the SDK encapsulated in the program package can be used to directly call the resources of the platform when the program package is run, and there is no need to newly create a resident service for user calling. In this way, the data platform does not need to maintain the resident service, thereby reducing the maintenance cost of the data platform.

[0052] Of course, implementing any product or method of the present application does not necessarily need to achieve all the advantages described above at the same time. Attached Figure Description

[0053] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0054] Figure 1 A schematic diagram of the structure of a platform system provided in an embodiment of this application;

[0055] Figure 2 A schematic diagram of the structure of a visual interface provided in an embodiment of this application;

[0056] Figure 3 A flowchart illustrating an online package execution method provided in this application embodiment;

[0057] Figure 4 A schematic diagram of an online package execution device provided in this application embodiment;

[0058] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0059] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0060] For ease of understanding, the system architecture of the data platform involved in the embodiments of this application will be described first below:

[0061] See Figure 1 This is a schematic diagram of the data platform architecture involved in an embodiment of this application. Figure 1 As shown, the data platform includes a front-end component 100, an encapsulation component 200, a runtime component 300, and a platform resource library 400.

[0062] Among them, the front-end component 100 can provide a visual interface 101 to the user. For example... Figure 2 The image shown is an example of a visual interface 101.

[0063] based on Figure 2The illustrated visual interface 101 includes at least a control for uploading a program package. In practice, a user can then upload a program package (hereinafter referred to as an original program package for convenience of description) to the data platform through the visual interface 101.

[0064] The visual interface 101 can also include, but is not limited to, controls for inputting dynamic parameters, switching data sources, and setting running resources. In practice, a user can then input dynamic parameters, switch data sources, and set running resources through the visual interface 101.

[0065] The encapsulation component 200 is configured to encapsulate the original program package by using a preset SDK (Software Development Kit) to obtain a target program package integrated with the SDK and the original program package. It should be noted that the preset SDK defines a calling interface for calling resources in the data platform;

[0066] The running background 300 is configured to run the target program package when receiving a program running instruction. The program running instruction carries resource information, so that the SDK can be used to call resources corresponding to the resource information in the data platform during running of the target program package.

[0067] At this point, the description of the data platform shown in Figure 1 is completed.

[0068] The online program package running method provided by the present application will be further explained and described in detail with reference to the accompanying drawings and specific embodiments, and the embodiments do not constitute a limitation on the embodiments of the present application.

[0069] Referring to Figure 3 , an embodiment flowchart of an online program package running method provided by an embodiment of the present application is provided. As an embodiment, the flowchart can be applied to Figure 1 the platform system shown in the embodiment, such as Figure 3 , the flowchart can include the following steps:

[0070] S101, receiving an original program package uploaded externally.

[0071] The original program package refers to a program package developed by a user in a conventional manner. The external is relative to Figure 1 the platform system shown in the embodiment, and generally refers to a user or an electronic device controlled by the user.

[0072] Based on Figure 1 the data platform shown in the embodiment, in an implementation of the embodiment of the present application, the data platform can receive the original program package uploaded externally by the following manner: outputting Figure 2The illustrated visualization interface through which the externally uploaded raw program package is received.

[0073] Specifically, the output visualization interface can be achieved by the following steps:

[0074] Step one, sending a webpage acquisition request to the platform, so that the platform returns a data platform page in response to the webpage acquisition request, and the data platform page integrates an online running component;

[0075] Step two, when a triggering operation on the online running component is detected on the data platform page, the online running component is started, and the visualization interface corresponding to the online running component is output.

[0076] When the platform is running, a webpage acquisition request can be sent to the platform, and the platform can return a corresponding data platform page in response to the request, wherein the data platform page integrates an online running component for outputting a visualization interface.

[0077] When a triggering operation on the online running component is detected on the data platform page, for example, the user clicks the button for triggering the online running component on the data platform page, the online running component is started, and the visualization interface corresponding to the online running component is output.

[0078] Therefore, the technical scheme provided by the embodiments of the present application can enable the user to upload the raw program package to the data platform through the visualization interface, and the operation process is convenient and simple, which can improve the user experience.

[0079] S102, encapsulating the raw program package by using the pre-set SDK to obtain a target program package integrating the SDK and the raw program package, and the SDK defines a calling interface for calling resources in the platform.

[0080] As can be seen from the description in S102, in the embodiments of the present application, the SDK can be pre-set in the platform system, and the SDK defines a calling interface for calling resources in the platform. Specifically, the syntax for defining the calling interface based on the SDK is: classRunJar{def exec():Unit={}}. The API interface pre-defined by the SDK can be called in the exec method to obtain resources in the platform. Here, the resources include data sources and running resources provided by the data platform, wherein the data sources are, for example, databases, and the running resources are, for example, memory or CPU, etc.

[0081] In the embodiments of the present application, after receiving the externally uploaded raw program package, the data platform can encapsulate the raw program package by using the pre-set SDK to obtain a target program package integrating the SDK and the raw program package.

[0082] S103, when receiving the program running instruction, running the target program package; wherein the program running instruction carries resource information, and in the process of running the target program package, the calling interface in the SDK is used to call the resource in the platform corresponding to the resource information.

[0083] In an embodiment, the above-mentioned resource information refers to the unique identifier of the resource, such as the ID or name of the resource.

[0084] The program running instruction can be input by the user, which is an instruction for instructing the platform system to run the target program package. Further, the program running instruction can carry resource information and dynamic parameters input by the user. The dynamic parameters are parameters that the user wants to calculate through the target program package, for example, the target program package encapsulates the conversion function between the Gregorian calendar and the lunar calendar date. When the user wants to know the lunar calendar date corresponding to a Gregorian calendar date, the user can input the Gregorian calendar date in the visual interface, and the Gregorian calendar date is the dynamic parameter described above. Figure 2

[0085] In the S103 scheme of the present application, the user can trigger the program running instruction by clicking the button in the visual interface. Figure 2 Specifically, when detecting the triggering operation on the second object in the visual interface, the program running instruction is triggered, and the second object is a button in the visual interface for instructing to run the program package, for example, the "run" button in the visual interface. Figure 2

[0086] When the data platform receives the program running instruction, the corresponding running task can be established by running the component, and then the target program package is run by the SDK in the running task, and in the process of running the target program package, the calling interface in the SDK can be used to call the resource in the platform corresponding to the resource information. The syntax of the SDK for running the program package is as follows:

[0087] val clazz = Class.forName("RunJar")

[0088] clazz.getMethod("exec"), classOf[Array[String]]).invoke(clazz.newInstance(), args).

[0089] Further, in an embodiment of the present application, the target program package can be run by the SDK in a reflection mechanism. Through this kind of processing, the plug-in property of the program can be improved, thereby improving the flexibility of the program.

[0090] ​​Therefore, the technical scheme provided by the embodiment of the present application can make the operation of triggering the program running instruction more intuitive and convenient, thereby improving the user experience.

[0091] In addition, the running component can output the running result of the target program package through the visual interface for the user to view after obtaining the running result.

[0092] The technical scheme provided by the embodiment of the present application receives the externally uploaded original program package, encapsulates the original program package by using the pre-installed SDK, obtains the target program package integrated with the SDK and the original program package, and runs the target program package when receiving the program running instruction. Since the calling interface for calling the resources in the platform is defined in the SDK, the data platform can directly call the resources in the platform corresponding to the resource information carried by the program running instruction by using the SDK in the process of running the target program package. Therefore, compared with the prior art, in the technical scheme of the present application, the resources of the platform can be directly called by using the encapsulated SDK in the online running program package, without the need to newly create a resident service for the user to call. In this way, the resident service does not need to be maintained by the data platform, thereby reducing the maintenance cost of the data platform.

[0093] In addition, in practice, a plurality of target program packages can be stored on the data platform. When one user wants to run a plurality of target program packages at the same time, or a plurality of users want to run one target program package at the same time, or a plurality of users want to run a plurality of target program packages at the same time, the data platform can receive a plurality of program running instructions. Each program running instruction corresponds to one user and one target program package that the user wants to run.

[0094] In this regard, in an embodiment of the present application, the data platform can establish a corresponding running task for each program running instruction when receiving a plurality of program running instructions. In the running task, the target program package corresponding to the program running instruction is run by using the SDK.

[0095] Therefore, in the embodiment of the present application, the running component of the data platform can create a corresponding running task for each program running instruction, and run the corresponding target program package in each running task. In this way, task isolation can be achieved, and the processing efficiency can be improved.

[0096] Further preferably, the running component can submit the target program package to the big data distributed computing system for calculation, thereby solving the problem of high concurrency running and improving the calculation speed.

[0097] In addition, in practice, there are cases where a user wants to interrupt the running of a target program package. In response to this, in an embodiment of the present application, when a triggering operation on a first object in the visualization interface is detected, an interrupt instruction is triggered, and the data platform interrupts the running of the target program package based on the interrupt instruction. The first object is a button in the visualization interface for indicating interruption of the running of the program package, such as the "Interrupt" button shown in Figure 2

[0098] Further, the visualization interface described above can include a plurality of interrupt buttons (not shown in the figure), and different interrupt buttons can correspond to different interrupt logics. Based on this, when a triggering operation on any interrupt button in the visualization interface is detected, an interrupt instruction is triggered, and the data platform interrupts the running of the target program package based on the interrupt instruction using the interrupt logic corresponding to the interrupt button that is triggered. Figure 2

[0099] As can be seen, the technical solution provided by the embodiments of the present application can realize one-key interruption of the running of a target program package by a user, which is simple to operate, and for non-professionals, the use of pre-fixed interrupt logic to interrupt the running of a program package is safer, more professional and less prone to errors than self-operation by a user, and can also reduce the user's use cost.

[0100] In addition, in another embodiment of the present application, the method can further include the following steps:

[0101] Step 1: After the running of the target program package is interrupted or ended, an execution log generated in the process of running the target program package is acquired;

[0102] Step 2: The execution log is output through the visualization interface.

[0103] As can be seen from the above steps, in the embodiments of the present application, after the running of the target program package is interrupted or ended, the data platform can automatically acquire an execution log generated in the process of running the target program package, and then output the execution log through the visualization interface, so as to facilitate the user to view and further facilitate the user to debug according to the execution log, thereby reducing the maintenance cost.

[0104] Corresponding to the embodiments of the service processing method described above, the present application also provides an embodiment block diagram of a service processing device.

[0105] Referring to Figure 4 , an embodiment block diagram of a service processing device provided by the present application, the device includes:

[0106] The receiving module 201 is configured to receive an original program package uploaded from outside;

[0107] ​​The encapsulation module 202 is configured to encapsulate the original program package by using a preset software development kit (SDK) to obtain a target program package integrated with the SDK and the original program package, and the SDK defines a calling interface for calling resources in a platform.

[0108] The running module 203 is configured to run the target program package when receiving a program running instruction, wherein the program running instruction carries resource information, and the calling interface in the SDK is used to call resources corresponding to the resource information in the platform in the process of running the target program package.

[0109] In a possible implementation, the running module is specifically configured to:

[0110] The SDK is used to run the target program package in a reflection mechanism.

[0111] In a possible implementation, the receiving of the externally uploaded original program package comprises:

[0112] The visualization interface comprises at least a control for uploading a program package.

[0113] The externally uploaded original program package is received through the visualization interface.

[0114] In a possible implementation, the apparatus further comprises a first triggering module, and the first triggering module is configured to:

[0115] When detecting a triggering operation on a first object in the visualization interface, an interrupt instruction is triggered, and the first object is a button in the visualization interface for indicating interrupting running of a program package.

[0116] The target program package is interrupted based on the interrupt instruction.

[0117] In a possible implementation, the apparatus further comprises a second triggering module, and the second triggering module is configured to:

[0118] When detecting a triggering operation on a second object in the visualization interface, the program running instruction is triggered, and the second object is a button in the visualization interface for indicating running of a program package.

[0119] In a possible implementation, the running module is further configured to:

[0120] A web page acquisition request is sent to the platform, so that the platform returns a data platform page in response to the web page acquisition request, and the data platform page is integrated with an online running component.

[0121] When a trigger operation on the online running component is detected on the data platform page, the online running component is started and the corresponding visual interface of the online running component is output.

[0122] In one possible implementation, the device further includes an output module, the output module being configured to:

[0123] After the target package is interrupted or terminated, obtain the execution logs generated during the execution of the target package;

[0124] The execution log is output through the visual interface.

[0125] Based on the same technical concept, embodiments of this application also provide an electronic device, such as... Figure 5 As shown, it includes a processor 111, a communication interface 112, a memory 113, and a communication bus 114, wherein the processor 111, the communication interface 112, and the memory 113 communicate with each other through the communication bus 114.

[0126] Memory 113 is used to store computer programs;

[0127] When processor 111 executes a program stored in memory 113, it performs the following steps:

[0128] Receive raw program packages uploaded from external sources;

[0129] The original program package is encapsulated using a pre-built software development kit (SDK) to obtain a target program package that integrates the SDK and the original program package. The SDK defines calling interfaces for calling resources in the platform.

[0130] When a program execution instruction is received, the target program package is executed; wherein, the program execution instruction carries resource information, and during the execution of the target program package, the call interface in the SDK is used to call the resources in the platform corresponding to the resource information.

[0131] The communication bus mentioned in the above electronic devices can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.

[0132] The communication interface is used for communication between the aforementioned electronic devices and other devices.

[0133] The memory can include a random access memory (RAM) and can also include a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory can also be at least one storage device located remotely from the aforementioned processor.

[0134] The aforementioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic device, discrete gate or transistor logic device, discrete hardware component.

[0135] In yet another embodiment provided in the present application, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program. The computer program is executed by a processor to implement the steps of any of the online package running methods described above.

[0136] In yet another embodiment provided in the present application, a computer program product containing instructions, which, when run on a computer, causes the computer to execute any of the online package running methods in the above embodiments.

[0137] In the embodiments described above, all or some of the steps can be implemented by software, hardware or firmware, or any combination thereof. When implemented by software, all or some of the steps can be implemented in the form of one or more computer programs. The computer program can be stored in any computer readable medium, and loaded into the computer for execution. The computer readable medium includes, but is not limited to, floppy diskette, UDRW optical disc, ROM, RAM, flash memory, and the like. The computer program can be distributed to computer over the Internet, intranet, etc. in the form of computer data communication or data signals embedded in a carrier wave, etc.

[0138] It should be noted that, in this document, the terms "first", "second", etc. are used only to distinguish one entity or operation from another, and do not necessarily require or imply any actual relationship or order between or among such entities or operations. Moreover, the terms "include", "contain", or any other variant thereof are intended to cover a non-exclusive inclusion, such that processes, methods, articles, or apparatuses that include a list of elements are not limited to those elements, but can include other elements not expressly listed or inherent to such processes, methods, articles, or apparatuses. Without more limitations, an element defined by the statement "including a" does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.

[0139] The above description is merely one specific implementation of the present application, and thus the skilled in the art can understand or implement the present application based on the above description. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for running an online program package, characterized in that, The method is applied to a data platform and includes: Receive raw program packages uploaded from external sources, wherein the raw program packages uploaded from external electronic devices relative to the data platform; The original program package is encapsulated using a pre-built software development kit (SDK) to obtain a target program package that integrates the SDK and the original program package. The SDK defines a calling interface for calling resources in the platform, wherein the resources include data sources and runtime resources provided by the data platform. When a program execution instruction is received, the target program package is executed; wherein, the program execution instruction carries resource information, and during the execution of the target program package, the call interface in the SDK is used to call the resources in the platform corresponding to the resource information; Running the target package includes: The target package is executed using the SDK via reflection.

2. The method according to claim 1, characterized in that, The receiving of externally uploaded raw program packages includes: Output a visual interface, which includes at least a control for uploading program packages; The system receives externally uploaded raw program packages through the visual interface.

3. The method according to claim 2, characterized in that, The method further includes: When a trigger operation on the first object in the visualization interface is detected, an interrupt command is triggered. The first object is the button in the visualization interface used to indicate the interruption of the running program package. Based on the interrupt instruction, the execution of the target program package is interrupted.

4. The method according to claim 2, characterized in that, The method further includes: When a trigger operation on the second object in the visualization interface is detected, the program execution instruction is triggered. The second object is the button in the visualization interface used to indicate the execution of the program package.

5. The method according to claim 2, characterized in that, The output visualization interface includes: A webpage retrieval request is sent to the platform, so that the platform responds to the webpage retrieval request and returns a data platform page, the data platform page integrating online running components; When a trigger operation on the online running component is detected on the data platform page, the online running component is started and the corresponding visual interface of the online running component is output.

6. The method according to claim 2, characterized in that, The method further includes: After the target package is interrupted or terminated, obtain the execution logs generated during the execution of the target package; The execution log is output through the visual interface.

7. An online package execution device, characterized in that, The device is used in a data platform and includes: The receiving module is used to receive raw program packages uploaded from external sources, wherein the raw program packages uploaded from external electronic devices relative to the data platform are program packages developed in a conventional manner. The encapsulation module is used to encapsulate the original program package using a pre-built software development kit (SDK) to obtain a target program package that integrates the SDK and the original program package. The SDK defines a calling interface for calling resources in the platform, wherein the resources include data sources and runtime resources provided by the data platform. A runtime module is configured to run the target program package upon receiving a program execution instruction; wherein the program execution instruction carries resource information, and during the execution of the target program package, the module utilizes the calling interface in the SDK to invoke resources in the platform corresponding to the resource information; the execution of the target program package includes: The target package is executed using the SDK via reflection.

8. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the steps of the method described in any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method described in any one of claims 1-6.

Citation Information

Patent Citations

  • Program data running method and device and electronic equipment

    CN112486498A