CN1346087A - A method and system capable of dynamically loading a program logic into an application program - Google Patents
A method and system capable of dynamically loading a program logic into an application program Download PDFInfo
- Publication number
- CN1346087A CN1346087A CN 00124649 CN00124649A CN1346087A CN 1346087 A CN1346087 A CN 1346087A CN 00124649 CN00124649 CN 00124649 CN 00124649 A CN00124649 A CN 00124649A CN 1346087 A CN1346087 A CN 1346087A
- Authority
- CN
- China
- Prior art keywords
- programmed logic
- file
- application program
- client computer
- program
- 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.)
- Granted
Links
Images
Landscapes
- Computer And Data Communications (AREA)
Abstract
Description
本发明涉及一种于一应用程序中写入一程序逻辑的方法及系统,尤其是涉及一种可动态载入一程序逻辑于一应用程序中的方法及其系统。The present invention relates to a method and system for writing a program logic in an application program, in particular to a method and system for dynamically loading a program logic in an application program.
当一应用程序被开启时,应用程序会依照一程序逻辑来进行执行。程序逻辑是用来决定数据的显示逻辑,可能是以绘图的方式显示或是显示数据的顺序与间隔,因此程序逻辑会决定应用程序的执行结果。When an application program is started, the application program will be executed according to a program logic. The program logic is used to determine the display logic of the data, which may be displayed in the form of graphics or the order and interval of the displayed data, so the program logic will determine the execution result of the application.
在习知技术中,程序设计师会将一个应用程序的程序逻辑写在应用程序中,而使用者一但开启应用程序,应用程序就会依照应用程序中的程序逻辑来执行,以完成特定工作。In the conventional technology, the program designer will write the program logic of an application program in the application program, and once the user starts the application program, the application program will be executed according to the program logic in the application program to complete specific tasks .
在网络环境中客户端与服务器端的架构下,程序设计师会将应用程序存放于客户端电脑,而将应用程序所需存取的数据存放于服务器。当应用程序开始执行时,可以通过网络协定来存取数据。利用这样的机制,使用者可以不用担心数据过期的问题,而可以获得最新最即时的资讯。Under the framework of client and server in the network environment, the programmer will store the application program on the client computer, and store the data to be accessed by the application program on the server. When an application starts executing, it can access data through network protocols. Using such a mechanism, users can obtain the latest and most instant information without worrying about data expiration.
然而,由于程序逻辑是写在应用程序中,因此一但使用者从服务器取得新增数据而需要新的显示逻辑时,使用者就必须重新下载新版本的应用程序,并且重新安装与执行才能进行新增数据的显示与处理。However, because the program logic is written in the application program, once the user obtains new data from the server and needs new display logic, the user must re-download the new version of the application program, and reinstall and execute it to proceed. Added data display and processing.
一但有新增数据或者程序逻辑有所扩充或改变时,使用者就必须重新下载应用程序以进行更新,对使用者而言,实在是一件麻烦而复杂的事。Once there is new data or the program logic is expanded or changed, the user must re-download the application program for updating, which is really troublesome and complicated for the user.
因此本发明的目的在于提供一种可以动态载入一程序逻辑于一应用程序中的方法及系统。在此系统中,程序逻辑并不写在应用程序中,而是在客户端电脑执行应用程序的时候,通过网络协定从服务器取得所需的程序逻辑。因此,一但有新增数据,使用者无需更新应用程序,而是直接从服务器下载所需的程序逻辑。Therefore, the object of the present invention is to provide a method and system for dynamically loading a program logic into an application program. In this system, the program logic is not written in the application program, but the required program logic is obtained from the server through the network protocol when the client computer executes the application program. Therefore, once there is new data, the user does not need to update the application program, but directly downloads the required program logic from the server.
为实现上述目的,本发明提供了一种可动态载入一程序逻辑于一应用程序中的方法,其包含以下步骤:To achieve the above object, the present invention provides a method for dynamically loading a program logic into an application program, which includes the following steps:
(a)一客户端电脑启动一应用程序,并且提出一要求;(a) a client computer starts an application and makes a request;
(b)一服务器接收该要求,并且根据该要求传输一状态文件至该客户端电脑,该状态文件包含一程序逻辑文件名称,以及一程序逻辑文件地址,其中该程序逻辑文件地址是对应于一储存装置,该储存装置存放有该程序逻辑文件名称所对应的程序逻辑文件,而该程序逻辑文件包含执行该应用程序所需的程序逻辑;(b) A server receives the request, and transmits a state file to the client computer according to the request, the state file includes a program logic file name, and a program logic file address, wherein the program logic file address corresponds to a a storage device, the storage device stores the program logic file corresponding to the name of the program logic file, and the program logic file includes the program logic required to execute the application program;
(c)该客户端电脑接收该状态文件;(c) the client computer receives the status file;
(d)该客户端电脑根据该状态文件中程序逻辑文件名称所对应的程序逻辑文件住址,连接至该程序逻辑文件地址所对应的储存装置,以下载该程序逻辑文件名称所对应的程序逻辑文件;以及(d) The client computer connects to the storage device corresponding to the address of the program logic file according to the program logic file address corresponding to the program logic file name in the state file to download the program logic file corresponding to the program logic file name ;as well as
(e)该客户端电脑会依照该程序逻辑文件中的程序逻辑来执行该应用程序。(e) The client computer will execute the application program according to the program logic in the program logic file.
所述的可动态载入一程序逻辑于一应用程序中的方法,其特征在于:该储存装置为一外部服务器。The method for dynamically loading a program logic into an application program is characterized in that: the storage device is an external server.
所述的可动态载入一程序逻辑于一应用程序中的方法,其特征在于:该服务器另包含该储存装置。The method for dynamically loading a program logic into an application program is characterized in that: the server further includes the storage device.
所述的可动态载入一程序逻辑于一应用程序中的方法,其特征在于:该客户端电脑另包含一客户端储存装置,用来储存该状态文件。The method for dynamically loading a program logic into an application program is characterized in that: the client computer further includes a client storage device for storing the state file.
所述的可动态载入一程序逻辑于一应用程序中的方法,其特征在于:该客户端电脑另包含一客户端储存装置,用来储存该程序逻辑文件。The method for dynamically loading a program logic into an application program is characterized in that: the client computer further includes a client storage device for storing the program logic file.
所述的可动态载入一程序逻辑于一应用程序中的方法,其特征在于:该客户端电脑另包含一程序解译器,而当该客户端电脑启动该应用程序时,会同时执行一原始程序逻辑文件中的原始程序逻辑,在步骤(e)中,该程序解译器会执行下列步骤:The method for dynamically loading a program logic into an application program is characterized in that: the client computer further includes a program interpreter, and when the client computer starts the application program, it will simultaneously execute a The original program logic in the original program logic file, in step (e), the program interpreter will perform the following steps:
解析该程序逻辑文件的程序逻辑;Analyzing the program logic of the program logic file;
终止该原始程序逻辑文件的原始程序逻辑;以及terminate the original program logic of the original program logic file; and
执行该程序逻辑文件的程序逻辑,以完成该应用程序的执行。The program logic of the program logic file is executed to complete the execution of the application program.
所述的可动态载入一程序逻辑于一应用程序中的方法,其特征在于:该客户端电脑会以所接收的程序逻辑文件取代该原始程序逻辑文件。The method for dynamically loading a program logic into an application program is characterized in that: the client computer will replace the original program logic file with the received program logic file.
所述的可动态载入一程序逻辑于一应用程序中的方法,其特征在于:该客户端电脑另包含一程序解译器,在步骤(e)中,该程序解译器会执行下列步骤:The method for dynamically loading a program logic into an application program is characterized in that: the client computer further includes a program interpreter, and in step (e), the program interpreter will perform the following steps :
解析该程序逻辑文件的程序逻辑;以及parse the program logic of the program logic file; and
执行该程序逻辑文件的程序逻辑,以完成该应用程序的执行。The program logic of the program logic file is executed to complete the execution of the application program.
所述的可动态载入一程序逻辑于一应用程序中的方法,其特征在于:该状态文件另包含一定时器,用来定时驱动该客户端电脑,以执行步骤(a)以及(e)。The method for dynamically loading a program logic into an application program is characterized in that: the state file further includes a timer for regularly driving the client computer to execute steps (a) and (e) .
所述的可动态载入一程序逻辑于一应用程序中的方法,其特征在于:该状态文件另包含一定时器,用来定时驱动该客户端电脑,以执行步骤(a),(d)以及(e)。The method for dynamically loading a program logic into an application program is characterized in that: the state file further includes a timer, which is used to regularly drive the client computer to perform steps (a), (d) and (e).
所述的可动态载入一程序逻辑于一应用程序中的方法,其特征在于:该客户端电脑另包含一驱动模组,用来驱动该客户端电脑,以执行步骤(a)以及(e)。The method for dynamically loading a program logic into an application program is characterized in that: the client computer further includes a driver module for driving the client computer to perform steps (a) and (e) ).
本发明还提供了一种可动态载入一程序逻辑于一应用程序中的方法,其包含以下步骤:The present invention also provides a method for dynamically loading a program logic into an application program, which includes the following steps:
(a)一客户端电脑启动一应用程序,并且提出一要求,其中当该客户端电脑启动该应用程序时,会同时执行一第一程序逻辑,而该客户端电脑包含一第一程序逻辑文件,其包含该第一程序逻辑,以及一第一状态文件,其包含一第一版本识别码,对应于该第一程序逻辑文件;(a) A client computer starts an application program and makes a request, wherein when the client computer starts the application program, a first program logic will be executed at the same time, and the client computer includes a first program logic file , which includes the first program logic, and a first state file, which includes a first version identification code corresponding to the first program logic file;
(b)一服务器接收该要求,并且根据该要求传输一第二状态文件至该客户端电脑,该第二状态文件包含一程序逻辑文件名称,一程序逻辑文件地址,以及一第二版本识别码,其中该程序逻辑文件地址是对应于一储存装置,该储存装置存放有该程序逻辑文件名称所对应的第二程序逻辑文件,而该第二程序逻辑文件包含执行该应用程序所需的第二程序逻辑,该第二版本识别码是对应于该第二程序逻辑;(b) A server receives the request, and transmits a second state file to the client computer according to the request, the second state file includes a program logic file name, a program logic file address, and a second version identification code , wherein the address of the program logic file corresponds to a storage device, the storage device stores the second program logic file corresponding to the name of the program logic file, and the second program logic file includes the second program logic file required to execute the application program program logic, the second version identification code corresponds to the second program logic;
(c)该客户端电脑接收该第二状态文件;(c) the client computer receives the second state file;
(d)该客户端电脑判断该第二版本识别码是否相同于该第一版本识别码,如果是,则结束,而该客户端电脑会依照该第一程序逻辑来执行该应用程序,如果不是,则执行步骤(e);(d) The client computer judges whether the second version identification code is the same as the first version identification code, if yes, then end, and the client computer will execute the application program according to the first program logic, if not , then execute step (e);
(e)该客户端电脑根据该第二状态文件中程序逻辑文件名称所对应的程序逻辑文件地址,连接至该程序逻辑文件地址所对应的储存装置,以下载该程序逻辑文件名称所对应的第二程序逻辑文件;以及(e) The client computer connects to the storage device corresponding to the program logic file address according to the program logic file address corresponding to the program logic file name in the second state file, so as to download the program logic file name corresponding to the first 2. program logic files; and
(f)该客户端电脑会依照该第二程序逻辑文件中的第二程序逻辑来执行该应用程序。(f) The client computer executes the application program according to the second program logic in the second program logic file.
所述的可动态载入一程序逻辑于一应用程序中的方法,其特征在于:该储存装置为一外部服务器。The method for dynamically loading a program logic into an application program is characterized in that: the storage device is an external server.
所述的可动态载入一程序逻辑于一应用程序中的方法,其特征在于:该服务器另包含该储存装置。The method for dynamically loading a program logic into an application program is characterized in that: the server further includes the storage device.
所述的可动态载入一程序逻辑于一应用程序中的方法,其特征在于:该客户端电脑会将该第二状态文件取代该第一状态文件。The method for dynamically loading a program logic into an application is characterized in that: the client computer replaces the first state file with the second state file.
所述的可动态载入一程序逻辑于一应用程序中的方法,其特征在于:该客户端电脑另包含一程序解译器,在步骤(f)中,该程序解译器会执行下列步骤:The method for dynamically loading a program logic into an application program is characterized in that: the client computer further includes a program interpreter, and in step (f), the program interpreter will perform the following steps :
解析该第二程序逻辑文件的第二程序逻辑;parsing the second program logic of the second program logic file;
终止该第一程序逻辑;以及terminating the first program logic; and
执行该第二程序逻辑文件的第二程序逻辑,以完成该应用程序的执行。Execute the second program logic of the second program logic file to complete the execution of the application program.
所述的可动态载入一程序逻辑于一应用程序中的方法,其特征在于:该客户端电脑将该第二程序逻辑文件取代该第一程序逻辑文件。The method for dynamically loading a program logic into an application program is characterized in that: the client computer replaces the first program logic file with the second program logic file.
所述的可动态载入一程序逻辑于一应用程序中的方法,其特征在于:该状态文件另包含一定时器,用来定时驱动该客户端电脑,以执行步骤(a)以及(f)。The method for dynamically loading a program logic into an application program is characterized in that: the state file further includes a timer for regularly driving the client computer to execute steps (a) and (f) .
所述的可动态载入一程序逻辑于一应用程序中的方法,其特征在于:该状态文件另包含一定时器,用来定时驱动该客户端电脑,以执行步骤(a),(e)以及(f)。The method for dynamically loading a program logic into an application program is characterized in that: the state file further includes a timer, which is used to regularly drive the client computer to perform steps (a), (e) and (f).
所述的可动态载入一程序逻辑于一应用程序中的方法,其特征在于:该客户端电脑另包含一驱动模组,用来驱动该客户端电脑,以执行步骤(a)以及(f)。The method for dynamically loading a program logic into an application program is characterized in that: the client computer further includes a driver module for driving the client computer to perform steps (a) and (f ).
本发明也提供了一种可动态载入一程序逻辑于一应用程序中的系统,其包含:The present invention also provides a system capable of dynamically loading a program logic into an application program, which includes:
一服务器,包含:A server, including:
多数个状态文件,每一状态文件包含一程序逻辑文件名称,以及一程序逻辑文件地址,其中该程序逻辑文件地址是对应于一储存装置,该储存装置存有该程序逻辑文件名称所对应的程序逻辑文件,而该程序逻辑文件包含执行一应用程序所需的程序逻辑;A plurality of state files, each state file includes a program logic file name and a program logic file address, wherein the program logic file address corresponds to a storage device, and the storage device stores the program corresponding to the program logic file name a logic file containing program logic required to execute an application;
一客户端电脑,包含:A client computer, including:
一客户端储存装置,用来存放该应用程序;a client storage device for storing the application program;
一启动模组,用来启动该应用程序;a startup module, used to start the application;
一通讯模组,用来接收从该服务器传来的状态文件;A communication module, used to receive the status file transmitted from the server;
一下载模组,用来根据该状态文件中该程序逻辑文件名称所对应的程序逻辑文件地址,连接至该程序逻辑文件地址所对应的储存装置,以下载该程序逻辑文件名称所对应的程序逻辑文件;以及A download module, used to connect to the storage device corresponding to the program logic file address according to the program logic file address corresponding to the program logic file name in the state file, so as to download the program logic corresponding to the program logic file name documents; and
一执行模组,用来依照该程序逻辑文件中的程序逻辑来执行该应用程序。An execution module is used for executing the application program according to the program logic in the program logic file.
所述的可动态载入一程序逻辑于一应用程序中的系统,其特征在于:该储存装置为一外部服务器。The above-mentioned system capable of dynamically loading a program logic into an application program is characterized in that the storage device is an external server.
所述的可动态载入一程序逻辑于一应用程序中的系统,其特征在于:该服务器另包含该储存装置。The above-mentioned system capable of dynamically loading a program logic into an application program is characterized in that: the server further includes the storage device.
所述的可动态载入一程序逻辑于一应用程序中的系统,其特征在于:该客户端电脑是将所接收的状态文件存放于该客户端储存装置。The above-mentioned system capable of dynamically loading a program logic into an application program is characterized in that: the client computer stores the received state file in the client storage device.
所述的可动态载入一程序逻辑于一应用程序中的系统,其特征在于:该客户端电脑是将该程序逻辑文件存放于该客户端储存装置。The above-mentioned system capable of dynamically loading a program logic into an application program is characterized in that: the client computer stores the program logic file in the client storage device.
所述的可动态载入一程序逻辑于一应用程序中的系统,其特征在于:该客户端电脑另包含一程序解译器,存放于该客户端储存装置,以及一原始程序逻辑文件,存放于该客户端储存装置,该原始程序逻辑文件包含一原始程序逻辑,而当该客户端电脑的启动模组启动该应用程序时,会同时执行该原始程序逻辑文件中的原始程序逻辑,而该程序解译器是用来解析所接收的程序逻辑文件的程序逻辑,终止该原始程序逻辑,以及执行该程序逻辑文件中的程序逻辑,以完成该应用程序的执行。The system that can dynamically load a program logic into an application program is characterized in that: the client computer further includes a program interpreter stored in the client storage device, and an original program logic file stored In the client storage device, the original program logic file contains an original program logic, and when the startup module of the client computer starts the application program, the original program logic in the original program logic file will be executed simultaneously, and the The program interpreter is used to analyze the program logic of the received program logic file, terminate the original program logic, and execute the program logic in the program logic file to complete the execution of the application program.
所述的可动态载入一程序逻辑于一应用程序中的系统,其特征在于:该客户端电脑是以所接收的程序逻辑文件取代该原始程序逻辑文件。The above-mentioned system capable of dynamically loading a program logic into an application program is characterized in that: the client computer replaces the original program logic file with the received program logic file.
所述的可动态载入一程序逻辑于一应用程序中的系统,其特征在于:该客户端电脑另包含一程序解译器,存放于该客户端储存装置,用来解析该程序逻辑文件的程序逻辑,以及The above-mentioned system capable of dynamically loading a program logic into an application program is characterized in that: the client computer further includes a program interpreter stored in the client storage device for parsing the program logic file program logic, and
执行该程序逻辑文件的程序逻辑,以完成该应用程序的执行。The program logic of the program logic file is executed to complete the execution of the application program.
所述的可动态载入一程序逻辑于一应用程序中的系统,其特征在于:该状态文件另包含一定时器,用来定时驱动该客户端电脑的启动模组,通讯模组,下载模组,以及执行模组。The system that can dynamically load a program logic into an application program is characterized in that: the state file further includes a timer, which is used to regularly drive the startup module, communication module, and download module of the client computer. group, and execute modules.
所述的可动态载入一程序逻辑于一应用程序中的系统,其特征在于:该状态文件另包含一定时器,用来定时驱动该客户端电脑的启动模组,下载模组,以及执行模组。The system that can dynamically load a program logic into an application program is characterized in that: the state file further includes a timer, which is used to regularly drive the startup module of the client computer, download the module, and execute mod.
所述的可动态载入一程序逻辑于一应用程序中的系统,其特征在于:该客户端电脑另包含一驱动模组,用来驱动该客户端电脑的启动模组,通讯模组,下载模组,以及执行模组。The system that can dynamically load a program logic into an application program is characterized in that: the client computer further includes a driver module, which is used to drive the startup module, communication module, and downloading module of the client computer. modules, and executing modules.
本发明也提供了一种可动态载入一程序逻辑于一应用程序中的系统,其包含:The present invention also provides a system capable of dynamically loading a program logic into an application program, which includes:
一服务器,包含:A server, including:
多数个第二状态文件,每一第二状态文件包含一程序逻辑文件名称,一程序逻辑文件地址,以及一第二版本识别码,其中该程序逻辑文件地址是对应于一储存装置,该储存装置存有该程序逻辑文件名称所对应的第二程序逻辑文件,而该第二程序逻辑文件包含执行一应用程序所需的第二程序逻辑,而该第二版本识别码是对应于第二程序逻辑文件;A plurality of second state files, each second state file includes a program logic file name, a program logic file address, and a second version identification code, wherein the program logic file address is corresponding to a storage device, the storage device There is a second program logic file corresponding to the name of the program logic file, and the second program logic file contains the second program logic needed to execute an application program, and the second version identification code corresponds to the second program logic document;
一客户端电脑,包含:A client computer, including:
一客户端储存装置,用来存放该应用程序,一第一程序逻辑文件,以及一第一状态文件,其中该第一程序逻辑文件包含一第一程序逻辑,而该第一状态文件,包含一第一版本识别码,对应于该第一程序逻辑文件;A client storage device for storing the application program, a first program logic file, and a first state file, wherein the first program logic file includes a first program logic, and the first state file includes a The first version identification code corresponds to the first program logic file;
一启动模组,用来启动该应用程序,其中当该应用程序启动时,是同时执行该第一程序逻辑;A startup module, used to start the application program, wherein when the application program is started, the first program logic is executed at the same time;
一通讯模组,用来接收从该服务器传来的第二状态文件;A communication module, used to receive the second status file transmitted from the server;
一下载模组,用来根据该第二状态文件中该程序逻辑文件名称所对应的程序逻辑文件地址,连接至该程序逻辑文件地址所对应的储存装置,以下载该程序逻辑文件名称所对应的第二程序逻辑文件;A download module, used to connect to the storage device corresponding to the program logic file address according to the program logic file address corresponding to the program logic file name in the second status file, so as to download the program logic file name corresponding second program logic file;
一执行模组,用来依照该第一或第二程序逻辑来执行该应用程序;以及an execution module for executing the application program according to the first or second program logic; and
一判断模组,用来判断该第二版本识别码是否相同于该第一版本识别码,如果是,则驱动该执行模组依照该第一程序逻辑来执行该应用程序,如果不是,则驱动该下载模组,以下载该程序逻辑文件名称所对应的第二程序逻辑文件,并且驱动该执行模组,以依照该所下载的第二程序逻辑文件中的第二程序逻辑来执行该应用程序。A judging module, used to judge whether the second version identification code is the same as the first version identification code, if yes, drive the execution module to execute the application program according to the first program logic, if not, drive The download module is used to download the second program logic file corresponding to the name of the program logic file, and drive the execution module to execute the application program according to the second program logic in the downloaded second program logic file .
所述的可动态载入一程序逻辑于一应用程序中的系统,其特征在于:该储存装置为一外部服务器。The above-mentioned system capable of dynamically loading a program logic into an application program is characterized in that the storage device is an external server.
所述的可动态载入一程序逻辑于一应用程序中的系统,其特征在于:该服务器另包含该储存装置。The above-mentioned system capable of dynamically loading a program logic into an application program is characterized in that: the server further includes the storage device.
所述的可动态载入一程序逻辑于一应用程序中的系统,其特征在于:当该第一版本识别码与该第二版本识别码不同时,该客户端电脑会以所下载的第二程序逻辑文件取代该第一程序逻辑文件。The system for dynamically loading a program logic into an application program is characterized in that: when the first version identification code is different from the second version identification code, the client computer will use the downloaded second version identification code. A program logic file replaces the first program logic file.
所述的可动态载入一程序逻辑于一应用程序中的系统,其特征在于:当该第一版本识别码与该第二版本识别码不同时,该客户端电脑会以所接收的第二状态文件取代该第一状态文件。The system for dynamically loading a program logic into an application program is characterized in that: when the first version identification code is different from the second version identification code, the client computer will use the received second version identification code A state file supersedes the first state file.
所述的可动态载入一程序逻辑于一应用程序中的系统,其特征在于:该客户端电脑另包含一程序解译器,存放于该客户端储存装置,用来解析该第二程序逻辑文件的第二程序逻辑,终止该第一程序逻辑,以及执行该第二程序逻辑文件的第二程序逻辑,以完成该应用程序的执行。The system that can dynamically load a program logic into an application program is characterized in that: the client computer further includes a program interpreter stored in the client storage device for parsing the second program logic The second program logic of the file terminates the first program logic and executes the second program logic of the second program logic file to complete execution of the application.
所述的可动态载入一程序逻辑于一应用程序中的系统,其特征在于:该第二状态文件另包含一定时器,用来定时驱动该客户端电脑的启动模组,通讯模组,下载模组,判断模组,以及执行模组。The system that can dynamically load a program logic into an application program is characterized in that: the second state file further includes a timer, which is used to regularly drive the startup module and the communication module of the client computer, Download the module, judge the module, and execute the module.
所述的可动态载入一程序逻辑于一应用程序中的系统,其特征在于:该第二状态文件另包含一定时器,用来定时驱动该客户端电脑的启动模组,下载模组,以及执行模组。The system that can dynamically load a program logic into an application program is characterized in that: the second state file further includes a timer, which is used to regularly drive the startup module of the client computer, download the module, and execute the module.
所述的可动态载入一程序逻辑于一应用程序中的系统,其特征在于:该客户端电脑另包含一驱动模组,用来驱动该客户端电脑的启动模组,通讯模组,下载模组,判断模组,以及执行模组。The system that can dynamically load a program logic into an application program is characterized in that: the client computer further includes a driver module, which is used to drive the startup module, communication module, and downloading module of the client computer. module, judgment module, and execution module.
相较于习知技术,本发明的一种可以动态载入一程序逻辑于一应用程序中的方法及系统,该系统的客户端电脑可以动态载入程序逻辑于应用程序中,也就是说应用程序中并不包含程序逻辑,而是从服务器或是外部服务器下载所需的程序逻辑,通过下载不同的程序逻辑,使应用程序产生不同的执行结果。因此,客户端电脑无需因为程序逻辑的扩充或改变而更新应用程序,也无需存放多个具有不同程序逻辑的应用程序以产生不同的执行结果,由此为用户带来了方便性。Compared with the conventional technology, the present invention provides a method and system capable of dynamically loading a program logic into an application program. The client computer of the system can dynamically load the program logic into the application program, that is to say, the application The program does not contain program logic, but downloads the required program logic from the server or an external server, and by downloading different program logic, the application program produces different execution results. Therefore, the client computer does not need to update the application program due to the expansion or change of the program logic, and does not need to store multiple application programs with different program logic to produce different execution results, thereby bringing convenience to the user.
下面,结合附图和具体实施方式对本发明做进一步详细的描述。Below, the present invention will be described in further detail in conjunction with the accompanying drawings and specific embodiments.
图1为本发明系统的第一实施例的方块示意图。FIG. 1 is a schematic block diagram of a first embodiment of the system of the present invention.
图2为图1系统的状态文件的示意图。FIG. 2 is a schematic diagram of a state file of the system in FIG. 1 .
图3为图1系统的程序逻辑档的示意图。FIG. 3 is a schematic diagram of a program logic file of the system in FIG. 1 .
图4为本发明方法的第一实施例的流程图。Fig. 4 is a flow chart of the first embodiment of the method of the present invention.
图5为程序解译器的解译流程图。Fig. 5 is a flow chart of the interpretation of the program interpreter.
图6为程序解译器的另一解译流程图。FIG. 6 is another interpreting flowchart of the program interpreter.
图7为本发明系统的第二实施例。Fig. 7 is a second embodiment of the system of the present invention.
图8为图7系统的第二状态文件的方块示意图。FIG. 8 is a block diagram of a second state file of the system in FIG. 7 .
图9为本发明方法的第二实施例的流程图。Fig. 9 is a flow chart of the second embodiment of the method of the present invention.
在本发明中,应用程序的程序逻辑是存放于服务器中。当客户端电脑执行应用程序时,客户端电脑会对服务器提出一要求,服务器会根据该要求提供客户端电脑所需的程序逻辑。In the present invention, the program logic of the application program is stored in the server. When the client computer executes the application program, the client computer will make a request to the server, and the server will provide the program logic required by the client computer according to the request.
参考图1至图3。图1为本发明系统10的第一实施例。图2为系统10的状态文件18的示意图。图3为系统10的程序逻辑档48的示意图。系统10包含一服务器12,一客户端电脑14,以及多数个外部服务器16。Refer to Figures 1 to 3. Figure 1 shows a first embodiment of a
每一外部服务器16包含一储存装置22。客户端电脑14包含一客户端储存装置24,其内存有一程序解译器26,一驱动模组28,一应用程序30,一启动模组32,一通讯模组34下载模组36,以及一执行模组38。服务器12包含多数个状态文件18,存放于储存装置20。每一状态文件18包含一程序逻辑文件名称40,一程序逻辑文件地址42,一第一定时器44,以及一第二定时器46。Each
程序逻辑文件地址42是对应于储存装置20或22的一预定位置,而储存装置20或22存有程序逻辑文件名称40所对应的程序逻辑文件48,而程序逻辑文件48包含执行应用程序30所需的程序逻辑49。The program
参考图4。图4为本发明方法50的第一实施例。方法50包含下列步骤:Refer to Figure 4. FIG. 4 shows a first embodiment of the method 50 of the present invention. Method 50 comprises the following steps:
步骤401:客户端电脑14的启动模组32启动应用程序30,并且提出一要求;Step 401: The
步骤402:服务器12接收该要求,并且根据该要求传输一状态文件18至客户端电脑14;Step 402: the
步骤403:客户端电脑14的通讯模组34接收状态文件18;Step 403: the
步骤404:客户端电脑14的下载模组36根据状态文件13中的程序逻辑文件地址42,连接至程序逻辑文件地址42所对应的储存装置20或22,以下载程序逻辑文件名称40所对应的程序逻辑文件48;以及Step 404: The
步骤405:客户端电脑14的执行模组38依照程序逻辑文件48中的程序逻辑49来执行应用程序30。Step 405 : The
参考图5。图5为程序解译器26的解译流程图。当客户端电脑14存有一原始程序逻辑文件(未显示)而启动模组32启动应用程序30时,客户端电脑14会先根据原始程序逻辑文件内的原始程序逻辑来执行应用程序30,而在步骤405中,程序解译器26则会执行下列步骤:Refer to Figure 5. FIG. 5 is an interpreting flowchart of the
步骤501:解析程序逻辑文件48的程序逻辑49:Step 501: Analyze the
步骤502:终止原始程序逻辑文件的原始程序逻辑;以及Step 502: Terminate the original program logic of the original program logic file; and
步骤503:执行程序逻辑文件48的程序逻辑49,使得客户端电脑14的执行模组38可以依照程序逻辑49来执行应用程序30。Step 503 : Execute the
此外,客户端电脑14会将状态文件18储存于客户端储存装置24,并且将程序逻辑文件48储存于客户端储存装置24以取代原始程序逻辑文件。In addition, the
程序解译器26可包含于客户端电脑14的作业系统内,或者包含于应用程序30内。The
在本发明中,程序解译器26为一浏览器引擎(HTML engine)。浏览器引擎可以用来显示HTML格式的数据,也可以作为Script语言与DHTML语言的解译器。因此,应用程序30的程序逻辑是使用Script语言来设计,并且使用DHTML语言来做物件与内容效果的呈现。In the present invention, the
浏览器引擎可为微软的探索者Microsoft Explore,而客户端电脑14的作业系统可为Microsoft windows。The browser engine can be Microsoft Explore, and the operating system of the
参考图6。图6为程序解译器26的另一解译流程图。当客户端电脑14未存有任何原始程序逻辑文件而下载模组36已下载程序逻辑文件48时,在步骤405中,程序解译器26会执行下列步骤:Refer to Figure 6. FIG. 6 is another interpreting flowchart of the
步骤601:解析程序逻辑文件48的程序逻辑49;以及Step 601: analyzing the
步骤602:执行程序逻辑文件48的程序逻辑49,使得客户端电脑14的执行模组38可以依照程序逻辑49来执行应用程序30。Step 602 : Execute the
此外,客户端电脑14会将状态文件18以及程序逻辑文件48储存于客户端储存装置24。当客户端电脑14再次执行方法50时,所储存的程序逻辑文件48会被当作原始程序逻辑文件。因此,当启动模组32启动应用程序30时,客户端电脑14会先根据所储存的程序逻辑文件48内的程序逻辑49来执行应用程序30。In addition, the
状态文件18可为一独立文件存放于客户端电脑14中,也可存在于作业系统的注册档中。The
服务器12的多数个状态文件18是分别对应于不同的程序逻辑可以让应用程序30产生不同的执行结果。而服务器12可以自行选择传送至客户端电脑14的状态文件18,以控制应用程序30的执行结果。也就是说,当客户端电脑14提出一要求时,服务器12可以经由所传送的状态文件来控制应用程序30的执行结果。The plurality of state files 18 of the
状态文件18的第一定时器44会定时驱动客户端电脑14以再次执行方法50。服务器12会传输一新的状态文件至客户端电脑14,使得客户端电脑14会至另一储存装置下载一新的程序逻辑文件,因此应用程序30可以根据新的程序逻辑来完成执行。The
服务器12可以通过设定第一定时器44来控制客户端电脑14,以定时载入不同的程序逻辑,使得应用程序可以执行出不同的结果。例如,客户端电脑14可在早上的时候下载一种程序逻辑来执行应用程序30,以产生一种可以显示股票即时行情的股票机,然后服务器12会利用第一定时器44来控制客户端电脑14,使其在下午的时候下载另一种程序逻辑来执行应用程序30,以产生一种可以显示大盘指数解析的股票分析机。也就是说,产生股票机的程序逻辑与产生股票分析机的程序逻辑是存放在不同的储存装置,因此服务器12会利用第一定时器44来控制客户端电脑14于一预定时间至另一储存装置下载新的程序逻辑,以产生不同的执行结果。在此例中,在早上的时候客户端电脑14会显示股票机,而在下午的时候股票机会自动改变为股票分析机。The
状态文件18的第二定时器46会定时驱动客户端电脑14的启动模组32,下载模组36,以及执行模组。客户端电脑14会到同一个储存装置下载一新的程序逻辑文件,因此应用程序30可以根据新的程序逻辑来完成执行。The
服务器12会定时对同一储存装置内的程序逻辑文件进行版本更新,因此服务器12可以通过设定第二定时器46来控制客户端电脑14,使其定时载入新版的程序逻辑。例如,客户端电脑14可在早上的时候下载第一种程序逻辑来执行应用程序30,以产生一种股票机,而服务器12会在下午将第一种程序逻辑改变为第二种程序逻辑,并且利用第二定时器46来控制客户端电脑14,使得在下午的时候客户端电脑会至同一个储存装置下载第二种程序逻辑来执行应用程序30,以产生股票分析机。也就是说,产生股票机的程序逻辑与产生股票分析机的程序逻辑是存放在相同的储存装置,而服务器12会在一预定时间将产生股票机的程序逻辑改变为产生股票分析机的程序逻辑,因此服务器12会利用第二定时器46来控制客户端电脑14于一预定时间至相同的储存装置下载新的程序逻辑,以产生不同的执行结果。在此例中,在早上的时候客户端电脑14会显示股票机,而在下午的时候股票机会自动改变为股票分析机。The
客户端电脑14的驱动模组28是用来驱动客户端电脑14以再次执行方法50。当使用者启动驱动模组28时,例如按下一图钮,客户端电脑14会先出现一选择画面,使用者可以选择应用程序30的执行结果,例如小画家(具有绘图功能)、小作家(具有文书处理功能)、计算机(具有计算功能)、股票机、股票分析机、通讯机(用来传输电子信息),以及星座论坛(用来提供星座相关资讯)机等等。之后客户端电脑14会启动应用程序30,并且向服务器12提出一要求。而在客户端电脑14对服务器12所提出的要求中包含此选择的相关资讯。因此,服务器12会根据使用者的选择(未显示)来传输一特定状态文件至客户端电脑14,使得客户端电脑14会至特定的储存装置下载特定的程序逻辑文件,以产生使用者所需的执行结果。The
也就是说,服务器12的多数个状态文件18是分别对应于不同的程序逻辑可以让应用程序30产生不同的执行结果。因此,服务器12可以根据客户端电脑14所提出的要求,来传送特定的状态文件18至客户端电脑14,以符合使用者的需求。That is to say, the plurality of state files 18 of the
参考图7以及图8。图7为本发明系统60的第二实施例。图8为系统60的第二状态文件66的示意图。系统60与系统10的主要不同之处在于,客户端电脑64另包含一第一程序逻辑文件68,以及一第一状态文件70。第一程序逻辑文件68包含一第一程序逻辑(未显示)。第一状态文件70包含一第一版本识别码(未显示),对应于第一程序逻辑文件68。服务器62的第二状态文件66另包含一第二版本识别码72。此外,客户端电脑64另包含一判断模组74,用来判断从服务器62传来的第二状态文件66的第二版本识别码72是否相同于第一状态文件70的第一版本识别码。Refer to FIG. 7 and FIG. 8 . FIG. 7 shows a second embodiment of a
参考图9。图9为本发明方法80的第二实施例。方法80包含下列步骤:Refer to Figure 9. FIG. 9 is a second embodiment of the method 80 of the present invention. Method 80 includes the following steps:
步骤801:客户端电脑64的启动模组32启动应用程序30并且提出一要求,此时,客户端电脑64会先依照第一程序逻辑文件68的第一程序逻辑来执行应用程序30;Step 801: The
步骤802:服务器62接收该要求,并且根据该要求传输一第二状态文件66至客户端电脑64;Step 802: the
步骤803:客户端电脑64的通讯模组34接收第二状态文件66;Step 803: the
步骤804:客户端电脑64的判断模组74判断所接收的第二状态文件66的第二版本识别码72是否相同于存于客户端电脑64的第一状态文件70的第一版本识别码,如果是,则结束方法80,而客户端电脑64会继续依照第一程序逻辑来执行应用程序30,如果不是,则执行步骤805;Step 804: the
步骤805:客户端电脑64的下载模组36根据第二状态文件66的程序逻辑文件地址42,连接至程序逻辑文件地址42所对应的储存装置20或22,以下载程序逻辑文件名称40所对应的第二程序逻辑文件(未显示);Step 805: The
步骤806:客户端电脑64的程序解译器26解析第二程序逻辑文件的第二程序逻辑;Step 806: the
步骤807:客户端电脑64的程序解译器26终止第一程序逻辑;以及Step 807: the
步骤808:客户端电脑64的程序解译器26执行解析后的第二程序逻辑,使得客户端电脑64的执行模组38可以依照第二程序逻辑来执行应用程序30。Step 808: The
第二版本识别码72除了可如图8所示为一版本号码之外,也可为文件的更新时间。而更新时间越晚,文件的版本越新。第一版本识别码也是如此。In addition to being a version number as shown in FIG. 8 , the second
方法80与方法50的主要不同在于,方法80会利用版本识别码来判断第二程序逻辑文件是否为一较新的版本,只有在第二程序逻辑文件较新于第一程序逻辑文件68时,才会下载新的程序逻辑文件。如果,第二程序逻辑文件的版本并没有较新于第一程序逻辑文件68,那么客户端电脑64会继续依照第一程序逻辑文件68的第一程序逻辑来执行应用程序30,而不会下载第二程序逻辑文件。The main difference between the method 80 and the method 50 is that the method 80 will use the version identification code to determine whether the second program logic file is a newer version, only when the second program logic file is newer than the first
此外,当第二版本识别码不同于第一版本识别码且已下载第二程序逻辑文件时,客户端电脑64会将所接收的第二状态文件66储存于客户端储存装置24中,以取代第一状态文件70,并且将所下载的第二程序逻辑文件取代原先存放于客户端储存装置24中的第一程序逻辑文件68。In addition, when the second version identification code is different from the first version identification code and the second program logic file has been downloaded, the
在本发明系统10与60中,服务器12、62可以利用定时器来控制应用程序30的执行结果,例如,服务器12、62可以控制客户端电脑14、64在早上显示一股票机,然后在下午将股票机自动改变为股票分析机。In the
此外,服务器12、62也可以控制客户端电脑14、64的应用程序30,以产生一股票分析机,然后再利用定时器来控制应用程序30以分别产生计算机与通讯机,因此使用者不但可以浏览股票分析机所显示的信息,还可以同时利用计算机来进行一些理财计算,以及同时利用通讯机与亲朋好友联络沟通相关的股票信息。也就是说,服务器12、62可以利用定时器来控制客户端电脑14、64,使得应用程序30可以产生多种执行结果,因此客户端电脑14、64的使用者可以同时使用股票分析机、计算机与通讯机。In addition, the
客户端电脑14、64的使用者也可以利用驱动模组28来选择所需的应用程序30执行结果。例如,在下午的时候,服务器12、62会控制客户端电脑14、64产生股票分析机,而使用者可以利用驱动模组28来选择执行结果,以分别产生计算机与通讯机,因此使用者不但可以浏览股票分析机所显示的信息,还可以同时利用计算机来进行一些理财计算以及同时利用通讯机与亲朋好友联络沟通相关的股票信息。The user of the
以上所述仅为本发明的较佳实施例,凡依本发明权利要求范围所做的均等变化与修饰,均应属本发明专利的涵盖范围。The above descriptions are only preferred embodiments of the present invention, and all equivalent changes and modifications made according to the scope of the claims of the present invention shall fall within the scope of the patent of the present invention.
Claims (40)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB001246496A CN1141640C (en) | 2000-09-26 | 2000-09-26 | Method and system capable of dynamically loading program logic into application program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB001246496A CN1141640C (en) | 2000-09-26 | 2000-09-26 | Method and system capable of dynamically loading program logic into application program |
Publications (2)
Publication Number | Publication Date |
---|---|
CN1346087A true CN1346087A (en) | 2002-04-24 |
CN1141640C CN1141640C (en) | 2004-03-10 |
Family
ID=4590564
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNB001246496A Expired - Fee Related CN1141640C (en) | 2000-09-26 | 2000-09-26 | Method and system capable of dynamically loading program logic into application program |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN1141640C (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100383738C (en) * | 2005-02-28 | 2008-04-23 | 乐金电子(中国)研究开发中心有限公司 | Programme dynamic loading device and method for portable terminal |
CN100561921C (en) * | 2005-04-22 | 2009-11-18 | 鸿富锦精密工业(深圳)有限公司 | The system and method for client and server quick exchange data |
CN101170675B (en) * | 2007-11-21 | 2011-03-23 | 中兴通讯股份有限公司 | Method and system for managing J2ME application in network TV system |
CN103761126A (en) * | 2014-01-07 | 2014-04-30 | 中国神华能源股份有限公司 | Method and device for upgrading application program |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1329822C (en) * | 2004-06-16 | 2007-08-01 | 华为技术有限公司 | Soft wave renewing method |
-
2000
- 2000-09-26 CN CNB001246496A patent/CN1141640C/en not_active Expired - Fee Related
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100383738C (en) * | 2005-02-28 | 2008-04-23 | 乐金电子(中国)研究开发中心有限公司 | Programme dynamic loading device and method for portable terminal |
CN100561921C (en) * | 2005-04-22 | 2009-11-18 | 鸿富锦精密工业(深圳)有限公司 | The system and method for client and server quick exchange data |
CN101170675B (en) * | 2007-11-21 | 2011-03-23 | 中兴通讯股份有限公司 | Method and system for managing J2ME application in network TV system |
CN103761126A (en) * | 2014-01-07 | 2014-04-30 | 中国神华能源股份有限公司 | Method and device for upgrading application program |
CN103761126B (en) * | 2014-01-07 | 2017-03-15 | 中国神华能源股份有限公司 | The upgrade method of application program and device |
Also Published As
Publication number | Publication date |
---|---|
CN1141640C (en) | 2004-03-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN100351801C (en) | Backup system and method, restore system and method, and transfer system and method | |
CN1906575A (en) | Dynamic software update system, method and program product | |
CN1653421A (en) | Method for providing event to application, and electronic device using this method | |
CN1852101A (en) | Parallel downloading method and terminal | |
CN1256668C (en) | Operating system automatically installing method applying Linux | |
CN1204190A (en) | Information processing apparatus having infrared communication function and method of controlling thereof | |
CN1379335A (en) | Remote control program system | |
CN1622055A (en) | Application data management method for mobile terminal and mobile terminal used therein | |
CN1750470A (en) | Data sharing system, method and software tool | |
CN1204091A (en) | Remote controlling method, network server remote controlled by terminal, and memory storage medium for HTML files | |
CN1441352A (en) | Information processor, control method and storage medium for said information processor | |
CN1262490A (en) | Method and apparatus of invoking and providing response for off-line customer | |
CN1839413A (en) | Creating volume images | |
CN1773456A (en) | Automatic mounting system and method for printer driving program | |
CN1573701A (en) | Software image creation in a distributed build environment | |
CN101042649A (en) | Configuring information processing method and arrangement, and platform system | |
CN1735859A (en) | Software constitutes recovery method and device, and computer-readable storage medium | |
CN1975672A (en) | Information processing device and its download method | |
CN1886976A (en) | Method, software and apparatus for performing actions on a wireless device using action lists and versioning | |
CN1658609A (en) | Systems and methods for customizing application content provisioning | |
CN1501267A (en) | Linking information making device, linking information making method, recording medium having recorded a linking information making program, and document processing system therewith | |
CN1877526A (en) | Image processing apparatus used in network environment | |
CN1346087A (en) | A method and system capable of dynamically loading a program logic into an application program | |
CN1397037A (en) | Information processing terminal | |
CN1991840A (en) | File transfer system, file storage apparatus, method for storing file, and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C06 | Publication | ||
PB01 | Publication | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
C19 | Lapse of patent right due to non-payment of the annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |