CN111198721A - Application program running method and device - Google Patents

Application program running method and device Download PDF

Info

Publication number
CN111198721A
CN111198721A CN201811279726.8A CN201811279726A CN111198721A CN 111198721 A CN111198721 A CN 111198721A CN 201811279726 A CN201811279726 A CN 201811279726A CN 111198721 A CN111198721 A CN 111198721A
Authority
CN
China
Prior art keywords
data packet
application program
application
program data
environment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201811279726.8A
Other languages
Chinese (zh)
Inventor
徐宏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN201811279726.8A priority Critical patent/CN111198721A/en
Publication of CN111198721A publication Critical patent/CN111198721A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons

Abstract

The invention discloses an application program running method and device. Wherein, the method comprises the following steps: under the condition that the first application program data packet cannot normally run in the current running environment is detected, a source code used for generating the first application program data packet is obtained, wherein the first application program data packet is a data packet obtained by packaging the source code according to the format of the target running environment; packaging the source code according to the format of the current operating environment to obtain a second application program data packet; and running the second application program data packet in the current running environment. The invention solves the technical problems of complex steps and low efficiency of running the application program in the related technology.

Description

Application program running method and device
Technical Field
The invention relates to the field of computers, in particular to an application program running method and device.
Background
In the related art, in the process of running the application program written by the Spring Cloud micro-service, if the running environment is an ecological environment in which the Spring Cloud is not deployed, the application program written by the Spring Cloud micro-service cannot be run. At this time, it is necessary to manually modify the source code of the application written by the Spring Cloud micro-service, modify the application into an application that can be run in the conventional service environment, and then run the modified application.
However, if the method is adopted, the source code of the application program written by the Spring Cloud micro-service needs to be manually adjusted, so that the steps for running the application program are complicated, and the efficiency is low.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides an application program running method and device, which at least solve the technical problems of complex steps and low efficiency of running application programs in the related art.
According to an aspect of an embodiment of the present invention, there is provided an application program running method, including: under the condition that a first application program data packet is detected to be incapable of normally running in a current running environment, a source code used for generating the first application program data packet is obtained, wherein the first application program data packet is a data packet obtained by packaging the source code according to the format of a target running environment; packaging the source code according to the format of the current operating environment to obtain a second application program data packet; and running the second application program data packet in the current running environment.
According to another aspect of the embodiments of the present invention, there is also provided an application running apparatus, including: the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a source code for generating a first application program data packet under the condition that the first application program data packet cannot normally run in a current running environment, and the first application program data packet is a data packet obtained by packaging the source code according to the format of a target running environment; the packaging unit is used for packaging the source code according to the format of the current operating environment to obtain a second application program data packet; and the first running unit is used for running the second application program data packet in the current running environment.
In the embodiment of the invention, the source code for generating the first application program data packet is acquired under the condition that the first application program data packet is detected to be incapable of normally running in the current running environment; packaging the source code according to the format of the current operating environment to obtain a second application program data packet; and a method for operating the second application data package in the current operating environment. In the method, the source code for generating the first application program data packet is automatically acquired under the condition that the first application program data packet cannot normally run in the current running environment is detected, and the source code is encapsulated according to the format of the current running environment to obtain the second application program data packet, so that the second application program data packet can be run, the condition that the first application program packet needs to be manually modified under the condition that the first application program packet cannot run in the current running environment is avoided, the efficiency of running the application program is improved, and the technical problems of complex steps and low efficiency of running the application program in the related technology are solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a flow chart diagram illustrating an alternative method for running an application in accordance with an embodiment of the present invention;
FIG. 2 is a flow chart diagram illustrating an alternative method for running an application according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of an alternative application execution apparatus according to an embodiment of the present invention;
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to an aspect of the embodiments of the present invention, an application program running method is provided, optionally, as an optional implementation manner, as shown in fig. 1, the application program running method includes:
s102, under the condition that the first application program data packet cannot normally run in the current running environment, acquiring a source code for generating the first application program data packet, wherein the first application program data packet is a data packet obtained by packaging the source code according to the format of the target running environment;
s104, packaging the source code according to the format of the current operating environment to obtain a second application program data packet;
s106 runs the second application package in the current running environment.
Alternatively, the application program running method may be applied to, but not limited to, a terminal built with a current running environment, for example, a mobile phone, a tablet computer, a notebook computer, a PC, and the like. The application program running method can be applied to, but not limited to, a process in which an application program needs to be run, for example, a process in which the application program is tested, or a process in which the application program is used. The above process of using the application program may be, but is not limited to, a process of watching a video, listening to music, transferring money, instant messaging, etc. for using the application program.
The application program running method is applied to a PC to test the application program. The PC runs with the current running environment. When the first application data packet is acquired, the first application data packet corresponds to the format of the target operating environment, so that the first application data packet can be operated in the target operating environment but cannot be operated in the current operating environment. And at the moment, automatically acquiring the source code, and then packaging the source code according to the format of the current operating environment to obtain a second application program data packet. The second application data packet corresponds to the format of the current operating environment, and therefore can be operated in the current operating environment.
By the method, under the condition that the first application program data packet cannot normally run in the current running environment, the source code for generating the first application program data packet is automatically acquired, the source code is packaged according to the format of the current running environment to obtain the second application program data packet, and the second application program data packet is run, so that the condition that the first application program packet needs to be manually modified under the condition that the first application program packet cannot run in the current running environment is avoided, and the efficiency of running the application program is improved.
Optionally, the current operating environment and the target operating environment have different environment identifiers for identifying different formats. The environment identifier may be, but is not limited to being, represented using any character. For example, 1 is used to represent the current operating environment and 2 is used to represent the target operating environment. The method comprises the steps of establishing corresponding relations between different environments and formats in advance, obtaining an environment identifier of a current operation environment when a second application program data packet is generated, obtaining the format of the current operation environment according to the environment identifier, and packaging a source code according to the format of the current operation environment to obtain the second application program data packet capable of operating in the current operation environment.
Alternatively, the target operating environment may be, but is not limited to, an environment including a Spring Cloud framework, and the current operating environment may be, but is not limited to, an environment not including a Spring Cloud framework. The description continues with the process of testing an application.
As shown in fig. 2, after the source code is acquired, a first application packet obtained by encapsulating the source code in the format of Spring Cloud is acquired in step S202, and then it is determined whether the first application packet can normally operate in an environment that does not currently include the Spring Cloud framework in step S204. Because the current operating environment does not include the Spring Cloud framework and the first application data packet is obtained by packaging according to the packaging format of the Spring Cloud, the first application data packet cannot normally operate and the system reports errors. In this case, the source code is automatically obtained in step S206, and the source code is encapsulated according to the environment format of the current operating environment, that is, the environment format of the environment that does not include the Spring Cloud framework, and the second application data packet is obtained by encapsulating the source code in step S208. The test process is performed by running the second application packet through step S210, and then ends. If the first application program data packet can normally run when judging whether the first application program data packet normally runs, the current environment is indicated to have a Spring Cloud framework. At this time, the first application data packet is directly run through step S212, and the test of the application is completed.
According to the embodiment, when the first application program data packet cannot be operated in the current operation environment, the source code is packaged according to the format of the current operation environment to obtain a second application program data packet; the second application program data packet is operated in the current operation environment, so that the condition that the first application program packet needs to be manually modified under the condition that the first application program packet cannot be operated in the current operation environment can be avoided, the effect of automatically encapsulating the second application program data packet which can be operated in the current environment according to the source code is realized, and the efficiency of operating the application program is improved.
As an alternative embodiment, obtaining source code for generating the first application package comprises:
s1, deleting the first application program data packet;
s2, downloading the source code from the source code database.
Optionally, the target operating environment is an environment including a Spring Cloud framework, and the current operating environment is an environment not including a Spring Cloud framework. The description continues with the process of testing an application.
The source code database stores pre-written source codes. Downloading the source code, and encapsulating the source code through the Spring Cloud format to obtain a first application program data packet. When the first application data packet is run in an environment without a Spring Cloud framework, the first application data packet cannot be normally run due to incompatibility of the running environments, and the test on the application cannot be completed. At this time, the first application data packet is automatically deleted, the source code is downloaded from the source code database again, and the source code is encapsulated according to the environment format without the Spring Cloud frame to obtain the second application data packet, so that the second application data packet can be operated in the environment without the Spring Cloud frame to complete the test of the application.
Since the naming of the first application package and the second application package may be the same. Therefore, in the case that the first application package cannot be normally operated, the first application package needs to be deleted, and then the source code is downloaded to encapsulate the second application package, so as to operate the second application package. The effect of improving the efficiency of running the application program is achieved.
As an alternative embodiment, before obtaining the source code for generating the first application data packet, the method further includes:
s1, detecting the duration for starting the first application program data packet in the current running environment;
and S2, determining that the first application program data packet cannot normally run under the condition that the detected duration is greater than the first threshold.
Optionally, if the first application data packet is not compatible with the current operating environment, the first application data packet cannot be normally operated. At this time, it is necessary to determine whether the first application packet can normally operate. The judgment condition may be whether the duration of starting the first application data packet is greater than a first threshold, or whether the system reports an error. And under the condition that the time length for starting the first application program data packet is greater than a first threshold value or the system reports errors, determining that the first application program data packet cannot normally run.
For example, taking the determination condition as a system error report as an example, when the first application data packet is run, because the first application data packet is not compatible with the current running environment, the system error report and the first application data packet cannot run normally. And after the system reports an error, automatically terminating the first application program data packet, downloading a source code for packaging the first application program data packet from a source code database, and packaging the source code in the current operating environment to obtain a second application program data packet.
According to the embodiment, when the condition that the duration of starting the first application program data packet in the current running environment is greater than the first threshold value is detected, the first application program data packet cannot run normally, the source code is acquired, and the second application program data packet is packaged, so that the second application program data packet is started, and the effect of improving the efficiency of running the application program is achieved.
As an alternative embodiment, after detecting the duration for starting the first application packet in the current running environment, the method further includes:
s1, determining an application client and an application server matched with the target running environment under the condition that the detected duration is less than or equal to a first threshold;
and S2, running the first application data packet in the target running environment to control the application client and the application server to execute the application service corresponding to the first application data packet.
Alternatively, the application client may be, but is not limited to, a eurekalcient, and the application server may be, but is not limited to, a eurekasserver. And if the duration for starting the first application program data packet is detected to be less than the first threshold, the first application program data packet can normally run. At the moment, registration and discovery of the service are completed by calling the Eurekalcient and the EurekServer through the feign component, and the registered service is called. For example, if the first application packet is tested, the first application packet is tested by calling the eurekalcient and the eurekasserver to call the related function through the fail component.
By the embodiment, the application service corresponding to the first application data packet is executed by controlling the application client and the application server under the condition that the duration for starting the first application data packet is smaller than the first threshold value, so that the first application data packet can be efficiently operated, and the efficiency for operating the application program is improved.
As an alternative embodiment, running the second application package in the current runtime environment includes:
s1, determining an interface address matched with the current operating environment;
and S2, operating the second application program data packet in the current operating environment so as to call the application service corresponding to the second application program data packet through the interface address.
For example, when a first application data packet is tested, because the first application data packet is incompatible with the current operating environment and cannot be operated, the source code is encapsulated according to the format of the current operating environment to obtain a second application data packet, and the testing of the second application data packet is completed by calling an interface address through the feign component.
According to the embodiment, the interface address matched with the current running environment is determined, and the application service corresponding to the second application program data packet is called through the interface address, so that the second application program data packet obtained by packaging the source code can be operated under the condition that the first application program cannot be operated, and the efficiency of operating the application program is improved.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
According to another aspect of the embodiment of the present invention, there is also provided an application running apparatus for implementing the application running method. As shown in fig. 3, the apparatus includes:
(1) an obtaining unit 302, configured to obtain a source code used for generating a first application data packet when it is detected that the first application data packet cannot normally run in a current running environment, where the first application data packet is a data packet obtained by encapsulating the source code according to a format of a target running environment;
(2) a packaging unit 304, configured to package the source code according to the format of the current operating environment to obtain a second application data packet;
(3) a first running unit 306, configured to run the second application package in the current running environment.
Alternatively, the application running device may be applied to, but not limited to, a terminal built with a current running environment, for example, a mobile phone, a tablet computer, a notebook computer, a PC, and the like.
The application running device is applied to a PC to test an application. The PC runs with the current running environment. When the first application data packet is acquired, the first application data packet corresponds to the format of the target operating environment, so that the first application data packet can be operated in the target operating environment but cannot be operated in the current operating environment. And at the moment, automatically acquiring the source code, and then packaging the source code according to the format of the current operating environment to obtain a second application program data packet. The second application data packet corresponds to the format of the current operating environment, and therefore can be operated in the current operating environment.
By the method, under the condition that the first application program data packet cannot normally run in the current running environment, the source code for generating the first application program data packet is automatically acquired, the source code is packaged according to the format of the current running environment to obtain the second application program data packet, and the second application program data packet is run, so that the condition that the first application program packet needs to be manually modified under the condition that the first application program packet cannot run in the current running environment is avoided, and the efficiency of running the application program is improved.
Optionally, the current operating environment and the target operating environment have different environment identifiers for identifying different formats. The environment identifier may be, but is not limited to being, represented using any character. For example, 1 is used to represent the current operating environment and 2 is used to represent the target operating environment. The method comprises the steps of establishing corresponding relations between different environments and formats in advance, obtaining an environment identifier of a current operation environment when a second application program data packet is generated, obtaining the format of the current operation environment according to the environment identifier, and packaging a source code according to the format of the current operation environment to obtain the second application program data packet capable of operating in the current operation environment.
Alternatively, the target operating environment may be, but is not limited to, an environment including a Spring Cloud framework, and the current operating environment may be, but is not limited to, an environment not including a Spring Cloud framework. The description continues with the process of testing an application.
As shown in fig. 2, after the source code is acquired, a first application packet obtained by encapsulating the source code in the format of Spring Cloud is acquired in step S202, and then it is determined whether the first application packet can normally operate in an environment that does not currently include the Spring Cloud framework in step S204. Because the current operating environment does not include the Spring Cloud framework and the first application data packet is obtained by packaging according to the packaging format of the Spring Cloud, the first application data packet cannot normally operate and the system reports errors. In this case, the source code is automatically obtained in step S206, and the source code is encapsulated according to the environment format of the current operating environment, that is, the environment format of the environment that does not include the Spring Cloud framework, and the second application data packet is obtained by encapsulating the source code in step S208. The test process is performed by running the second application packet through step S210, and then ends. If the first application program data packet can normally run when judging whether the first application program data packet normally runs, the current environment is indicated to have a Spring Cloud framework. At this time, the first application data packet is directly run through step S212, and the test of the application is completed.
According to the embodiment, when the first application program data packet cannot be operated in the current operation environment, the source code is packaged according to the format of the current operation environment to obtain a second application program data packet; the second application program data packet is operated in the current operation environment, so that the condition that the first application program packet needs to be manually modified under the condition that the first application program packet cannot be operated in the current operation environment can be avoided, the effect of automatically encapsulating the second application program data packet which can be operated in the current environment according to the source code is realized, and the efficiency of operating the application program is improved.
As an alternative embodiment, the obtaining unit 302 includes:
(1) the deleting module is used for deleting the first application program data packet;
(2) and the downloading module is used for downloading the source code from the source code database.
Optionally, the target operating environment is an environment including a Spring Cloud framework, and the current operating environment is an environment not including a Spring Cloud framework. The description continues with the process of testing an application.
The source code database stores pre-written source codes. Downloading the source code, and encapsulating the source code through the Spring Cloud format to obtain a first application program data packet. When the first application data packet is run in an environment without a Spring Cloud framework, the first application data packet cannot be normally run due to incompatibility of the running environments, and the test on the application cannot be completed. At this time, the first application data packet is automatically deleted, the source code is downloaded from the source code database again, and the source code is encapsulated according to the environment format without the Spring Cloud frame to obtain the second application data packet, so that the second application data packet can be operated in the environment without the Spring Cloud frame to complete the test of the application.
Since the naming of the first application package and the second application package may be the same. Therefore, in the case that the first application package cannot be normally operated, the first application package needs to be deleted, and then the source code is downloaded to encapsulate the second application package, so as to operate the second application package. The effect of improving the efficiency of running the application program is achieved.
As an alternative embodiment, the above apparatus further comprises:
(1) the detection unit is used for detecting the duration for starting the first application program data packet in the current running environment before the source code for generating the first application program data packet is acquired;
(2) the first determining unit is used for determining that the first application program data packet cannot normally run under the condition that the detected duration is greater than the first threshold.
Optionally, if the first application data packet is not compatible with the current operating environment, the first application data packet cannot be normally operated. At this time, it is necessary to determine whether the first application packet can normally operate. The judgment condition may be whether the duration of starting the first application data packet is greater than a first threshold, or whether the system reports an error. And under the condition that the time length for starting the first application program data packet is greater than a first threshold value or the system reports errors, determining that the first application program data packet cannot normally run.
For example, taking the determination condition as a system error report as an example, when the first application data packet is run, because the first application data packet is not compatible with the current running environment, the system error report and the first application data packet cannot run normally. And after the system reports an error, automatically terminating the first application program data packet, downloading a source code for packaging the first application program data packet from a source code database, and packaging the source code in the current operating environment to obtain a second application program data packet.
According to the embodiment, when the condition that the duration of starting the first application program data packet in the current running environment is greater than the first threshold value is detected, the first application program data packet cannot run normally, the source code is acquired, and the second application program data packet is packaged, so that the second application program data packet is started, and the effect of improving the efficiency of running the application program is achieved.
As an alternative embodiment, the above apparatus further comprises:
(1) the second determining unit is used for determining the application client and the application server which are matched with the target running environment under the condition that the detected duration is less than or equal to a first threshold after the duration used for starting the first application program data packet in the current running environment is detected;
(2) and the second running unit is used for running the first application program data packet in the target running environment so as to control the application client and the application server to execute the application service corresponding to the first application program data packet.
Alternatively, the application client may be, but is not limited to, a eurekalcient, and the application server may be, but is not limited to, a eurekasserver. And if the duration for starting the first application program data packet is detected to be less than the first threshold, the first application program data packet can normally run. At the moment, registration and discovery of the service are completed by calling the Eurekalcient and the EurekServer through the feign component, and the registered service is called. For example, if the first application packet is tested, the first application packet is tested by calling the eurekalcient and the eurekasserver to call the related function through the fail component.
By the embodiment, the application service corresponding to the first application data packet is executed by controlling the application client and the application server under the condition that the duration for starting the first application data packet is smaller than the first threshold value, so that the first application data packet can be efficiently operated, and the efficiency for operating the application program is improved.
As an alternative embodiment, the first operation unit 306 includes:
(1) the determining module is used for determining an interface address matched with the current operating environment;
(2) and the running module is used for running the second application program data packet in the current running environment so as to call the application service corresponding to the second application program data packet through the interface address.
For example, when a first application data packet is tested, because the first application data packet is incompatible with the current operating environment and cannot be operated, the source code is encapsulated according to the format of the current operating environment to obtain a second application data packet, so that the second application data packet is started. And after the second application program data packet is started, the interface address is called through the feign component to finish the test of the second application program data packet.
According to the embodiment, the interface address matched with the current running environment is determined, and the application service corresponding to the second application program data packet is called through the interface address, so that the second application program data packet obtained by packaging the source code can be operated under the condition that the first application program cannot be operated, and the efficiency of operating the application program is improved.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (10)

1. An application program running method, comprising:
under the condition that a first application program data packet is detected to be incapable of normally running in a current running environment, a source code used for generating the first application program data packet is obtained, wherein the first application program data packet is a data packet obtained by packaging the source code according to the format of a target running environment;
packaging the source code according to the format of the current operating environment to obtain a second application program data packet;
and running the second application program data packet in the current running environment.
2. The method of claim 1, wherein obtaining source code for generating the first application packet comprises:
deleting the first application program data packet;
downloading the source code from a source code database.
3. The method of claim 1, further comprising, prior to obtaining source code for generating the first application package:
detecting a duration for starting the first application data packet in the current operating environment;
and under the condition that the duration is detected to be greater than a first threshold value, determining that the first application program data packet cannot normally run.
4. The method of claim 3, wherein after the detecting the duration for launching the first application packet in the current runtime environment, further comprising:
under the condition that the duration is detected to be less than or equal to the first threshold, determining an application client and an application server which are matched with the target running environment;
and running the first application program data packet in the target running environment so as to control the application client and the application server to execute the application service corresponding to the first application program data packet.
5. The method of claim 1, wherein said executing the second application package in the current execution environment comprises:
determining an interface address matched with the current operating environment;
and running the second application program data packet in the current running environment so as to call the application service corresponding to the second application program data packet through the interface address.
6. An application execution apparatus, comprising:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a source code for generating a first application program data packet under the condition that the first application program data packet cannot normally run in a current running environment, and the first application program data packet is a data packet obtained by packaging the source code according to the format of a target running environment;
the packaging unit is used for packaging the source code according to the format of the current operating environment to obtain a second application program data packet;
a first running unit, configured to run the second application package in the current running environment.
7. The apparatus of claim 6, wherein the obtaining unit comprises:
the deleting module is used for deleting the first application program data packet;
and the downloading module is used for downloading the source code from a source code database.
8. The apparatus of claim 6, further comprising:
the detection unit is used for detecting the duration for starting the first application program data packet in the current running environment before acquiring a source code for generating the first application program data packet;
and the first determining unit is used for determining that the first application program data packet cannot normally run under the condition that the duration is detected to be greater than a first threshold value.
9. The apparatus of claim 8, further comprising:
a second determining unit, configured to determine, after detecting a duration for starting the first application packet in the current operating environment, an application client and an application server that are matched with the target operating environment when detecting that the duration is less than or equal to the first threshold;
and the second running unit is used for running the first application program data packet in the target running environment so as to control the application client and the application server to execute the application service corresponding to the first application program data packet.
10. The apparatus of claim 6, wherein the first operating unit comprises:
the determining module is used for determining an interface address matched with the current operating environment;
and the running module is used for running the second application program data packet in the current running environment so as to call the application service corresponding to the second application program data packet through the interface address.
CN201811279726.8A 2018-10-30 2018-10-30 Application program running method and device Pending CN111198721A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811279726.8A CN111198721A (en) 2018-10-30 2018-10-30 Application program running method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811279726.8A CN111198721A (en) 2018-10-30 2018-10-30 Application program running method and device

Publications (1)

Publication Number Publication Date
CN111198721A true CN111198721A (en) 2020-05-26

Family

ID=70745977

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811279726.8A Pending CN111198721A (en) 2018-10-30 2018-10-30 Application program running method and device

Country Status (1)

Country Link
CN (1) CN111198721A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114650276A (en) * 2022-02-24 2022-06-21 北京健康之家科技有限公司 Service request processing method, electronic equipment terminal and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101354677A (en) * 2008-09-11 2009-01-28 青岛海信移动通信技术股份有限公司 Method for detecting and restoring application program running state and restoring device thereof
CN102622241A (en) * 2011-01-26 2012-08-01 腾讯科技(深圳)有限公司 Software upgrading method and software upgrading device
CN104793946A (en) * 2015-04-27 2015-07-22 广州杰赛科技股份有限公司 Application deployment method and system based on cloud computing platform
CN105740027A (en) * 2012-12-06 2016-07-06 北京奇虎科技有限公司 Application program updating method and device
US20180088935A1 (en) * 2016-09-27 2018-03-29 Ca, Inc. Microservices application configuration based on runtime environment
CN107861738A (en) * 2017-11-06 2018-03-30 广东欧珀移动通信有限公司 Using abnormality eliminating method, device, storage medium and terminal device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101354677A (en) * 2008-09-11 2009-01-28 青岛海信移动通信技术股份有限公司 Method for detecting and restoring application program running state and restoring device thereof
CN102622241A (en) * 2011-01-26 2012-08-01 腾讯科技(深圳)有限公司 Software upgrading method and software upgrading device
CN105740027A (en) * 2012-12-06 2016-07-06 北京奇虎科技有限公司 Application program updating method and device
CN104793946A (en) * 2015-04-27 2015-07-22 广州杰赛科技股份有限公司 Application deployment method and system based on cloud computing platform
US20180088935A1 (en) * 2016-09-27 2018-03-29 Ca, Inc. Microservices application configuration based on runtime environment
CN107861738A (en) * 2017-11-06 2018-03-30 广东欧珀移动通信有限公司 Using abnormality eliminating method, device, storage medium and terminal device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114650276A (en) * 2022-02-24 2022-06-21 北京健康之家科技有限公司 Service request processing method, electronic equipment terminal and storage medium

Similar Documents

Publication Publication Date Title
CN107844421B (en) Interface testing method and device, computer equipment and storage medium
CN105303112B (en) The detection method and device of component call loophole
EP2608585B1 (en) Method, device and system for triggering terminal operation
CN109408132A (en) A kind of configuration file processing method and server, user terminal, storage medium
CN110058864B (en) Micro-service deployment method and device
CN108804399B (en) Form verification method and device
CN110442502B (en) Point burying method, device, equipment and storage medium
WO2016202000A1 (en) Differential rollback upgrading method and apparatus
CN110727524A (en) Method and device for realizing remote procedure call
CN112948272A (en) Production environment-based data test system function method and device and related equipment
CN112860277A (en) Software deployment method, device and computer readable storage medium
CN107526584B (en) Data access method and device
CN108989365B (en) Information processing method, server, terminal equipment and storage medium
CN108132832B (en) Application program starting method and device
CN108804120B (en) Page construction method, device, equipment and storage medium
CN114579194A (en) Spring remote call-based exception handling method and system
CN109753419A (en) A kind of method and device of the abnormal log information of all applications of non-invasive monitoring Android system
CN111198721A (en) Application program running method and device
CN115617555A (en) Information processing system and method
CN110147294A (en) Acquisition methods, device, terminal and the computer readable storage medium of Debugging message
CN112596750B (en) Application testing method and device, electronic equipment and computer readable storage medium
CN112099814B (en) System and method for managing vehicle-mounted machine application software installation environment
CN113934552A (en) Method and device for determining function code, storage medium and electronic device
CN114172978A (en) Multi-protocol equipment access method and related device
CN112073462A (en) Positioning method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination