Deployment method of C / S (Client / Server) application and related equipment
By deploying C/S applications to cloud servers, a systematic deployment method is adopted to solve the complexity and security risks of C/S applications deployment and operation and maintenance, and achieve rapid deployment and reduced operation and maintenance costs.
Patent Information
- Application Number
- CN202411738314.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2044-11-27
AI Technical Summary
C/S applications have problems such as rapid deployment, installation and configuration, complex upgrade and maintenance, and security risks in terms of deployment and operation and maintenance, resulting in high operation and maintenance costs.
By deploying C/S applications to the cloud server and adopting a deployment method, including obtaining source code and resource files, generating program language files, compiling interfaces and background service project projects, deploying network application program interfaces and background service programs to the cloud server, binding application databases and background databases, and completing the deployment of C/S application project projects.
It realizes the rapid deployment and operation and maintenance of C/S applications, reduces operation and maintenance costs, improves user experience, and improves the maintainability of project projects.
Smart Images

Figure CN119690457A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of software development, and in particular to a method for deploying a C / S application and related equipment. Background Art
[0002] C / S application is an application based on the client / server structure mode. This software system architecture is widely used in the field of software development. The C / S architecture is technically mature. Its main features are application in local area networks, strong interactivity, low network traffic, fast response speed, and conducive to processing large amounts of data. However, each client of this architecture needs to install the corresponding client program, which cannot achieve rapid deployment, installation and configuration, and is difficult to upgrade and maintain. In addition, the application program generally directly connects to the database to access data, which has a relatively large security risk, which also determines its main application in local area networks.
[0003] Since the C / S architecture is mainly used in local area networks, each client needs to install the corresponding client program. The enterprise also needs to deploy the network, server, database and other software and hardware environments by itself, and maintain these environments. This is a continuous and heavy task that generally requires professional system operation and maintenance personnel.
[0004] Therefore, how to deploy C / S applications while reducing operation and maintenance costs as much as possible is a technical problem that needs to be solved urgently. Summary of the invention
[0005] The embodiments of the present application provide a method for deploying a C / S application and related equipment, which are used to deploy the C / S application to a cloud server and reduce operation and maintenance costs.
[0006] A first aspect of an embodiment of the present application provides a method for deploying a C / S application, which is applied to a development end, and the method includes:
[0007] Get the source code files and resource files of the C / S application project;
[0008] Determining a programming language command in the source code file, and generating a programming language file based on the programming language command;
[0009] Generate a client application file according to the source code file and the resource file; wherein the client application file is an application file of an application program of the client;
[0010] Generate an interface project project according to the program language file, and compile the interface project project to generate an interface service program file, so as to generate a network application program interface based on the interface service program file; generate a background service project project according to the program language file, and compile the background service project project to generate a background service program file, so as to generate a background service program based on the background service program file;
[0011] Deploy the network application program interface and the background service program on the application server of the cloud server; deploy the client application program file on the network server of the cloud server;
[0012] Deploy the application database and the background database, bind the application database with the network application program interface, and bind the background database with the background service program to complete the deployment of the C / S application project; wherein the application database is used for the client to access through the network application program interface, and the background database is used to store the session information between the client and the cloud server.
[0013] Optionally, generating a programming language file based on the programming language command includes:
[0014] Separating flow control statements and language structure statements in the program language command, and generating statement identification information corresponding to the language structure statement;
[0015] The statement identification information is designated as a call identifier of the network application program interface of the cloud server, and the program language file is generated according to the process control statement, the language structure statement and the statement identification information.
[0016] Optionally, if the client application file includes a binary program file and a dependency file, generating the client application file according to the source code file includes:
[0017] Generate a dependency relationship file between any two source code files; wherein the dependency relationship file is used to characterize the mutual calling relationship between the any two source code files;
[0018] Different binary program files corresponding to the arbitrary two source code files are generated respectively according to the dependency relationship file.
[0019] Optionally, if the client application file includes an executable file and a homepage file, generating the client application file according to the source code file and the resource file includes:
[0020] Compiling the C / S application project according to the source code file to generate the executable file; wherein the executable file is used to represent the program entry of the application program of the client;
[0021] A homepage file corresponding to the application program of the client is generated according to the resource file; wherein the homepage file is used to start the executable file.
[0022] Optionally, before deploying the application database and the backend database, the method further includes:
[0023] The client service program file is deployed on the network server of the cloud server, and the client service program is deployed on the client according to the client service program file; wherein the client service program file is a program file for providing services for the application of the client, and the client service program is used to install the application of the client.
[0024] A second aspect of an embodiment of the present application provides a method for deploying a C / S application, which is applied to a cloud server, wherein the cloud server includes a network server and an application server, and the method includes:
[0025] Receive the interface service program file sent by the development end, and deploy the generated network application program interface on the application server based on the interface service program file; receive the background service program file sent by the development end, and deploy the generated background service program on the application server based on the background service program file;
[0026] Receiving the client application file sent by the development end, and deploying the client application file on the network server;
[0027] Bind the application database to the network application program interface, and bind the background database to the background service program to complete the deployment of the C / S application project on the cloud server; wherein the application database is used for the client to access through the network application program interface, and the background database is used to store the session information between the client and the cloud server.
[0028] Optionally, the method further comprises:
[0029] When the client application is started and the network server receives a session request, the network application program interface is called to create a session identifier; wherein the session identifier is used for the client application to exchange information with the network server;
[0030] The session identifier and the user login information corresponding to the client are stored in the backend database;
[0031] Alternatively, when the network server receives an access request, it obtains an application connection object from the application database, and configures the number of connection objects of the application connection object and the application connection parameters between each application connection object and the application database, so as to process the access request according to the configured application connection object.
[0032] Optionally, the method further comprises:
[0033] When the local storage space of the client satisfies the update trigger condition, an updated dependency file and an updated executable file are sent to the client; wherein the update trigger condition includes that the updated dependency file and the updated executable file do not exist in the local storage space of the client, or the cloud server receives one or more of the updated dependency file and the updated executable file sent by the development end; the dependency file is used to represent the mutual calling relationship between any two source codes of the C / S application project engineering, and the executable file is used to represent the program entry of the application program of the client.
[0034] A third aspect of the embodiments of the present application provides a deployment system for a C / S application, including:
[0035] The acquisition unit is used to acquire the source code files and resource files of the C / S application project;
[0036] A determination unit, configured to determine a program language command in the source code file and generate a program language file based on the program language command;
[0037] A generating unit, configured to generate a client application file according to the source code file and the resource file; wherein the client application file is an application file of an application of the client;
[0038] The generating unit is further used to generate an interface project project according to the program language file, and compile the interface project project to generate an interface service program file, so as to generate a network application program interface based on the interface service program file; generate a background service project project according to the program language file, and compile the background service project project to generate a background service program file, so as to generate a background service program based on the background service program file;
[0039] A deployment unit, configured to deploy the network application program interface and the background service program on an application server of a cloud server; and to deploy the client application program file on a network server of the cloud server;
[0040] The deployment unit is also used to deploy an application database and a background database, and to bind the application database to the network application program interface, and to bind the background database to the background service program, so as to complete the deployment of the C / S application project engineering; wherein the application database is used for the client to access through the network application program interface, and the background database is used to store session information between the client and the cloud server.
[0041] The C / S application deployment system provided in the third aspect of the embodiment of the present application is used to execute the C / S application deployment method described in the first aspect.
[0042] A fourth aspect of the embodiments of the present application provides a deployment system for a C / S application, including:
[0043] A receiving unit, configured to receive an interface service program file issued by a development end, and deploy the generated network application program interface on the application server based on the interface service program file; receive a background service program file issued by the development end, and deploy the generated background service program on the application server based on the background service program file;
[0044] The receiving unit is further configured to receive the client application file sent by the development end, and deploy the client application file on the network server;
[0045] A deployment unit is used to bind the application database with the network application program interface and to bind the background database with the background service program to complete the deployment of the C / S application project on the cloud server; wherein the application database is used for the client to access through the network application program interface, and the background database is used to store the session information between the client and the cloud server.
[0046] The C / S application deployment system provided in the fourth aspect of the embodiment of the present application is used to execute the C / S application deployment method described in the second aspect.
[0047] A fifth aspect of an embodiment of the present application provides a C / S application deployment device, including:
[0048] CPU, memory, input and output interfaces, wired or wireless network interfaces, and power supply;
[0049] The memory is a short-term storage memory or a persistent storage memory;
[0050] The central processing unit is configured to communicate with the memory and execute instruction operations in the memory to execute the C / S application deployment method described in the first aspect.
[0051] A sixth aspect of an embodiment of the present application provides a computer-readable storage medium, which includes instructions. When the instructions are executed on a computer, the computer executes the C / S application deployment method described in the first aspect.
[0052] A fifth aspect of an embodiment of the present application provides a computer program product, which includes instructions. When the instructions are executed on a computer, the computer executes the C / S application deployment method described in the first aspect.
[0053] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages: through a C / S application deployment method disclosed in the embodiments of the present application, the development end executes a deployment process to publish the C / S application project to the cloud server (including the application server and the network server), and then the client accesses the application deployed in the cloud server. Therefore, through the implementation of the above technology, the C / S application project can be accessed like a network application. It can not only be accessed through a page, but also through a conversation between the client and the cloud server, etc. Thereby, the user experience is greatly improved. In addition, the technical solution of the present application only needs to implement a deployment process to publish the existing C / S application project or the newly developed project to the cloud without the need for developers to modify the relevant program code, which greatly improves the maintainability of the project. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0055] Figure 1 A schematic diagram of a deployment architecture of a C / S application disclosed in an embodiment of the present application;
[0056] Figure 2 A flowchart of a deployment method for a C / S application applied to a development end disclosed in an embodiment of the present application;
[0057] Figure 3 A flowchart of another method for deploying a C / S application applied to a development end disclosed in an embodiment of the present application;
[0058] Figure 4 A schematic diagram of a process for deploying a C / S application applied to a cloud server disclosed in an embodiment of the present application;
[0059] Figure 5A flowchart of another method for deploying a C / S application applied to a cloud server disclosed in an embodiment of the present application;
[0060] Figure 6 A schematic diagram of a deployment system for a C / S application applied to a development end disclosed in an embodiment of the present application;
[0061] Figure 7 A schematic diagram of a system for deploying a C / S application applied to a cloud server disclosed in an embodiment of the present application;
[0062] Figure 8 A schematic diagram of the structure of a C / S application deployment device disclosed in an embodiment of the present application. DETAILED DESCRIPTION
[0063] Client / server (C / S) applications are widely used in the field of software development. The C / S architecture is technically mature, and its main features are application to local area networks, strong interactivity, low network traffic, fast response speed, and convenience in processing large amounts of data. However, each client of this architecture needs to install the corresponding client program, which cannot achieve rapid deployment, installation and configuration, and is difficult to upgrade and maintain. In addition, application programs generally access data by directly connecting to the database, which has relatively large security risks, which also determines its main application in local area networks.
[0064] Since the C / S architecture is mainly used in local area networks, each client needs to install the corresponding client program. Enterprises also need to deploy software and hardware environments such as networks, servers, and databases by themselves, and maintain these environments. This is a continuous and heavy task, and generally requires professional system operation and maintenance personnel. If C / S applications can be deployed to the cloud platform, it can not only help enterprises reduce operation and maintenance costs, but also retain the advantages of C / S applications. In recent years, cloud technology has developed rapidly, and major cloud vendors have provided many valuable software infrastructure services, mainly including computing, storage, networking, security, management and monitoring, databases, development tools, deployment tools and other services. Among them, we can use virtual machines or containers in computing services as servers to deploy C / S applications, and use database services to access data.
[0065] There are currently two main methods for deploying C / S applications to the cloud and running them: First, cloud deployment plus client remote desktop. This method requires the client program to be deployed to the cloud server (the installation process needs to be performed), and the database is also deployed to the cloud. Then, the installed application can be directly run by connecting to the cloud server using the client's remote desktop. However, this method requires many cloud servers to support multiple users, and the response performance also requires a relatively high network bandwidth, which will lead to high usage costs and compatibility issues with external devices such as printers and monitors. Second, cloud deployment plus client download program. This method requires the client program file to be uploaded and deployed to the cloud server (without the installation process), and the database is also deployed to the cloud. At the same time, the download program (including the startup program) is installed on each client. When the client application is started for the first time, the download program needs to download all program files to the client before it can run. Since the application is running on the client, it directly connects to the database deployed on the cloud, which will cause huge security risks in the Internet environment, and it cannot provide functions such as uniform resource locator (URL) access, on-demand file downloading, and background control like WEB applications.
[0066] Based on the above description, it can be seen that there are many obvious shortcomings in using existing methods to deploy C / S applications to the cloud and run them. However, in the context of the development trend of everything on the cloud, finding an effective solution to deploy C / S applications to the cloud and run them will become a problem that every software developer has to face.
[0067] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0068] See also Figure 1 , Figure 1 A schematic diagram of a deployment architecture of a C / S application disclosed in an embodiment of the present application.
[0069] Depend on Figure 1It can be seen that the embodiment of the present application mainly deploys the C / S application to the cloud and runs it on the client, mainly involving the development end (mainly for C / S application project engineering deployment), the client (mainly for users to operate on the browser, thereby downloading the client service program to operate the installed application on the client), the cloud server (including the network server Web Server and the application server Application Server), and the cloud database (including the application database and the background database). Among them, the client can be a smart phone, a tablet computer, a laptop, a desktop computer, a PDA, a mobile Internet device (MID, mobile internet device), a wearable device (such as a smart watch, a smart bracelet, etc.), a smart computer, a smart car and other smart terminals. The cloud server can establish a communication connection with the client. The cloud server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides cloud databases, cloud services, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and basic cloud computing services such as big data and artificial intelligence platforms. The client can be installed with an application (or client service program). When the application runs in the client, it can be used with the above Figure 1 The cloud server shown in the figure performs data interaction so that the cloud server can receive business data from the client (such as UGC videos uploaded by users through the client). Among them, the application can be a social application, an instant messaging application, a live broadcast application, a game application, a short video application, a video application, a music application, a karaoke application, a shopping application, a novel application, a payment application, etc., which has the function of displaying text, images, audio, and video and other data information. The specific application can be determined according to the actual application scenario requirements and is not limited here. Among them, the application can be installed on an independent client or an embedded sub-client integrated in a client (such as an instant messaging client, a social client, etc.). The specific application can be determined according to the actual application scenario and is not limited here.
[0070] The development end executes a deployment process to publish the application project to the cloud server (including the Web Server and Application Server), and then the client uses a browser to access the application deployed in the cloud server. The first time you access the application, a welcome page will appear prompting you to click a link to install the client service program. Subsequent visits will directly start the application. The application startup process mainly includes downloading the dependency files required for startup from the application directory of the Web Server (Web service) deployed on the cloud server. When the client application is started, it accesses the application database on the cloud by calling the WebApi of the application service Application Server deployed on the cloud server. At the same time, the client application will also be monitored by the background service program, and the monitoring information is stored in the background database on the cloud.
[0071] The details will be described in detail later.
[0072] For the convenience of Figure 1 For a detailed description of the development side shown, see Figure 2 , Figure 2 The flowchart of a deployment method of a C / S application applied to a development end disclosed in an embodiment of the present application includes steps 201 to 206.
[0073] 201. Obtain source code files and resource files of the C / S application project.
[0074] It should be noted in advance that the development end in this embodiment can use a variety of C / S application database development tools. For the convenience of example description, PowerBuilder is used as the development tool of the C / S application database in this embodiment. Among them, PowerScript is specifically used as a programming language, which has a large number of example systems in the database application field (such as medical, banking, and telecommunications systems). This embodiment will take the PowerBuilder application project as an example to describe the specific implementation process and method in detail.
[0075] Specifically, before deploying the C / S application, you need to first obtain the source code files and resource files related to the C / S application project. The source code files can be understood as some original program codes in the development tool PowerBuilder, and the resource files are files such as web page cache, pictures or language packs. Since the source code files and resource files are complex and diverse, we will not give examples one by one. We will explain one of the possible situations later, and will not elaborate on them here.
[0076] 202. Determine a programming language command in a source code file, and generate a programming language file based on the programming language command.
[0077] Furthermore, after the source code file is determined, it is necessary to analyze the relevant program commands from the source code. Specifically, the program language commands are determined in the source code file, and the program language file is generated based on the program language commands.
[0078] In one of the specific embodiments, it is necessary to separate the structured query language (SQL) command from the source code file and generate an independent SQL file. It should be noted that SQL is a standardized language for managing relational database systems. Specifically, the PowerScript programming language and SQL code are found in the source code file, thereby separating the PowerScript programming language and SQL code respectively, and replacing the PowerScript programming language and SQL code with a SQL command (program language command), thereby obtaining a final SQL file (program language file) according to the SQL command.
[0079] 203. Generate client application files according to the source code files and resource files.
[0080] After executing step 201, step 203 may be directly executed. Specifically, the client application file may be generated according to the source code file and the resource file. It should be noted that the client application file is the application file of the client application.
[0081] In one specific embodiment, it can be combined with Figure 1 As shown, client application files associated with the application in the Web server in the cloud server can be generated based on the source code files and resource files, including but not limited to executable files (EXE), binary program files, home page files (index.html) or dependency files, etc. Furthermore, there can also be resource files (which can be converted into files that can be loaded and opened by the client or web page, etc.).
[0082] 204. Generate an interface project project according to the program language file, compile the interface project project to generate an interface service program file, and generate a network application program interface based on the interface service program file; generate a background service project project according to the program language file, compile the background service project project to generate a background service program file, and generate a background service program based on the background service program file.
[0083] Furthermore, after step 202, an interface project can be generated according to the program language file, and then the interface project can be compiled to generate an interface service program file. A network application program interface can be generated based on the interface service program file. At the same time, a background service project can be generated according to the program language file, and then the background service project can be compiled to generate a background service program file, and a background service program can be generated based on the background service program file.
[0084] In one specific embodiment, it should be noted that, Figure 1As shown in the figure, WebApi is a Web application programming interface (i.e., network application programming interface), which is usually based on the WWW service program (HTTP, Hypertext Transfer Protocol) protocol and can be implemented in different programming languages to provide network communication between applications. Its project engineering generally consists of three parts (controller Controller, service layer Service, data access layer DAO), among which the data access object (DAO, data access object) implements access to the database. The implementation of WebApi is not specifically explained here. It should be added that the main function of DAO is data operation, which belongs to the operation of the data layer in the standard development architecture of the program. In short, the Controler layer calls the Service layer, and the Serice layer calls the DAO layer, thereby completing the business and processing, data access and other functions of the entire system. The Controller layer can also verify and check the data submitted by the client to ensure the legitimacy and correctness of the data. The Controler layer is used to process user requests. It controls and coordinates the operation process of the entire application, accepts user input, calls the corresponding Service layer to process the business logic, and returns the processing results to the client. For example, the UserController can be used to process and control user requests to implement operations such as user login, registration, and information modification. The Service layer is the business logic processing center of the entire system. It is responsible for processing and calculating business data and returning the processing results to the Controller layer. In addition, the Service layer also needs to call the DAO layer to access and operate the data to complete the business logic processing. By encapsulating and assembling the functions provided by the DAO layer in a standardized manner, more complex operations can be implemented, such as registering, logging in, modifying information, and other business operations for users. The DAO layer is used to access the database and is responsible for performing data access and operations, including access and operations to the database, access to the file system, etc. It is dealing with the database. Some tasks for communicating with the database are encapsulated here. Sending SQL statements to the database can implement the addition, deletion, modification, and query operations of the database. Provide data access support and services for the Service layer. It hides the details of data access and provides a set of simple and easy-to-use interfaces for easy calling and use by the Service layer.
[0085] Furthermore, since the WebApi project needs to include the SQL file (program language file) generated in the above steps, it is necessary to call a corresponding compilation tool to compile the SQL file into a WebApi service program file. Specifically, an interface project (WebApi project) is generated from the SQL file, and then the interface project is compiled to generate an interface service program file (WebApi service program file), and finally, the WebApi service program file is encapsulated as a network application program interface, i.e., a WebApi interface.
[0086] In addition, it is also necessary to generate a background service project project and compile and generate a background service program file. Specifically, this process requires the generation of a background service project project, which is mainly used to manage client sessions, database connection configurations, and client requests. The design of these background management will be explained again in the background management. The background service project project, like WebApi, can be implemented in different programming languages, and then the corresponding compilation tool is called to compile it into a background service program file. In this embodiment, the background service project project is also generated through an SQL file, and then the background service project is compiled to generate a background service program file, and then a background service program is generated based on the background service program file, that is, Figure 1 The background services shown.
[0087] 205. Deploy the network application program interface and the background service program on the application server of the cloud server; deploy the client application program file on the network server of the cloud server.
[0088] Furthermore, based on the above steps, the network application program interface and the background service program can be deployed on the application server of the cloud server; and the client application program file can be deployed on the network server of the cloud server.
[0089] In one specific embodiment, the WebApi and background service program files are deployed to the Application Server in the cloud server. Since the WebApi and background service program files have been generated in the above steps, this process only needs to call HTTP, FTP or other file transfer tools to upload and deploy them to the Application Server.
[0090] 206. Deploy the application database and the background database, bind the application database to the network application program interface, and bind the background database to the background service program to complete the deployment of the C / S application project.
[0091] Furthermore, after completing the deployment of the Application Server and Web Server in the cloud server, it is also necessary to deploy the application database and the backend database, and then bind the application database to the network application interface, and bind the backend database to the backend service program, so as to complete the deployment of the C / S application project. It should be noted that the application database is used for the client to access through the network application interface, and the backend database is used to store the session information between the client and the cloud server.
[0092] In one specific embodiment, the application database and the background database provide data access services to WebApi and background service programs respectively, wherein the application database is a customer database, and the client application accesses it through WebApi.
[0093] Through a C / S application deployment method disclosed in this embodiment, the development end executes a deployment process to publish the C / S application project to the cloud server (including the application server and the network server), and then the client accesses the application deployed in the cloud server. Therefore, through the implementation of the above-mentioned technology, the C / S application project can be like a network application. It can not only be accessed through a page, but also through a conversation between the client and the cloud server, etc. Thereby, the user experience is greatly improved. In addition, the technical solution of the present application only needs to implement a deployment process to publish the existing C / S application project or the newly developed project to the cloud without the need for developers to modify the relevant program code, which greatly improves the maintainability of the project.
[0094] For further explanation Figure 2 For the illustrated embodiment, please refer to Figure 3 , Figure 3 This is a flow chart of another method for deploying a C / S application on a development end disclosed in an embodiment of the present application, including steps 301 to 310.
[0095] 301. Determine a program language command in a source code file, separate a flow control statement and a language structure statement in the program language command, and generate statement identification information corresponding to the language structure statement.
[0096] In this embodiment, steps 301 to 302 are the same as those described above. Figure 2 However, it should be noted that, in this embodiment, the program language command can be determined in the source code file, and then the flow control statement and the language structure statement are separated in the program language command, and the statement identification information corresponding to the language structure statement is generated.
[0097] In one specific embodiment, the program language command in the source code file is first determined, and then the flow control statement (i.e., the programming language of PowerScript mentioned above) and the language structure statement (SQL statement) are separated from the program language command, and then the statement identification information of the structure statement is generated through the language structure statement, wherein the statement identification information can be used to identify the language structure statement and the flow control statement. For ease of understanding, an example is given below.
[0098] For example, the following is the PowerScript and SQL code for the PowerBuilder application to insert a record into the Employee table of the database (EXECUTE IMMEDIATE is the PowerScript, and the following part is the SQL statement):
[0099] EXECUTE IMMEDIATE: "INSERT INTO Employee(code,name,sex)VALUES('C109','Xiao Ming','Male')"
[0100] The format of the separated SQL file is as follows, where 1001 is the ID (statement identification information) automatically generated by the program, which is used to uniquely identify the separated SQL statement:
[0101] 1001="INSERT INTO Employee(code,name,sex)VALUES('C109','Xiao Ming','Male')"
[0102] It should be noted that the above is only a description of the process control statements and language structure statements, and their statement identification information.
[0103] 302. Specify the statement identification information as a call identification of the network application program interface of the cloud server, and generate a program language file according to the process control statement, the language structure statement and the statement identification information.
[0104] Furthermore, the statement identification information is designated as a call identifier of the network application program interface of the cloud server, and a program language file is generated according to the process control statement, the language structure statement and the statement identification information.
[0105] In one specific embodiment, the statement identification information is used as the designated call identification of WepApi, and then the separated flow control statements, language structure statements and statement identification information are replaced to generate the final program language file. Specifically, the separation process also requires replacing the above PowerScript and SQL codes with the following codes, where WebApiClient is the client proxy encapsulation object of WebApi, which is used to send HTTP requests to call the WebApi of the cloud server and execute the SQL command corresponding to the specified ID.
[0106] WebApiClient.ExecuteSqlWithID(1001)
[0107] Furthermore, in different projects, the types of SQL commands are complex and diverse, and SQL commands may also have replacement parameters for replacing user input data. Specifically, the SQL command is separated from the source code and deployed to the server, and then called through the WebApi client proxy encapsulation object to ensure the security of accessing the database.
[0108] 303. If the client application file includes a binary program file and a dependency file, generate a dependency file between any two source code files.
[0109] Combination Figure 1 As shown, since there are multiple client application files, when the client application file includes a binary program file and a dependency file, a dependency file between any two source code files can be generated first. It should be noted that the dependency file is used to characterize the mutual calling relationship between any two source codes.
[0110] In one specific embodiment, if there are two source code files A and B, and there is a code calling relationship (dependency) between the two source code files, then the dependency file between the two source code files can be determined first based on the mutual calling relationship between the two source code files.
[0111] 304. Generate different binary program files corresponding to any two source code files according to the dependency relationship file.
[0112] Furthermore, different binary program files corresponding to any two source code files can be generated respectively according to the dependency file.
[0113] In one of the specific embodiments, since the general C / S application project engineering is compiled by many source code files to generate a binary program file (it can be recognized and executed by the machine), this file is generally large, which is not conducive to downloading in the network. In this embodiment, a single source code file is used as the compilation target to reduce the size of the compiled file. Then, this process needs to establish a dependency file so that the client can download on demand. Specifically, it can be seen from the description of step 303 that if source code files A and B generate a binary program file, there will be no problem with the mutual call between them due to the presence of a dependency file, and the operating system can automatically find the called module. However, after executing this process, the two files are compiled to generate two different binary program files, and the operating system may not be able to find them because the called module may not be downloaded in the cloud server. Therefore, the binary program file between the source code files A and B can be compiled based on the dependency file. Then, the client application can download the specified binary program file according to the file dependency. In other words, from a technical point of view, for a running program, A calls an object in B, but A does not know that the object belongs to B. Through the association relationship, A can know that the object belongs to B, and thus download B (binary program file). This association relationship needs to be established during the compilation process and can be used during the program running process.
[0114] It should also be noted that, because different programming languages use different compilation tools, for example, PowerBuilder uses the PBAutoBuild tool, while C++ may use LLVM. Therefore, the process of compiling source code files to generate binary program files is not described in detail in this embodiment.
[0115] 305. If the client application file includes an executable file and a homepage file, the C / S application project is compiled according to the source code file to generate an executable file.
[0116] Corresponding to step 302, if the client application file is an executable file and a homepage file, the C / S application project can be compiled according to the source code file to generate an executable file. It should be noted that the executable file is used to represent the program entry of the client application.
[0117] In one specific embodiment, each C / S application project needs to be compiled to generate an executable file (EXE), and the executable file is the entry point of the application.
[0118] Furthermore, in a feasible technical solution, specifically, in PowerBuilder it is compiled and generated by the source code file Application, while in other languages, it may be compiled and generated by the source code file containing the Main function.
[0119] 306. Generate a homepage file corresponding to the application program of the client according to the resource file.
[0120] At the same time, step 306 may also be executed while executing step 305. Specifically, the execution order of step 305 and step 306 is not limited here. Specifically, a homepage file corresponding to the application program of the client may be generated according to the resource file. It should be noted that the homepage file is used to start the executable file.
[0121] In one of the specific embodiments, each Web application project needs to include a homepage file (index.html), which is the main page of the Web application. In this embodiment, it is mainly responsible for starting the executable file (in the client application), which will be explained again in the running process.
[0122] 307. Generate an interface project project according to the program language file, compile the interface project project to generate an interface service program file, and generate a network application program interface based on the interface service program file; generate a background service project project according to the program language file, compile the background service project project to generate a background service program file, and generate a background service program based on the background service program file.
[0123] 308. Deploy the network application program interface and the background service program on the application server of the cloud server; deploy the client application program file on the network server of the cloud server.
[0124] In this embodiment, steps 307 to 308 are the same as those described above. Figure 2 Step 204 to step 205 are similar and will not be described in detail here.
[0125] 309. Deploy the client service program file on the network server of the cloud server, and deploy the client service program on the client according to the client service program file.
[0126] Furthermore, before step 310, that is, before deploying the application database and the backend database, it is also necessary to deploy the client service program file on the network server of the cloud server, and deploy the client service program on the client according to the client service program file. It should be noted that the client service program file is a program file used to provide services for the client application, and the client service program is used to install the client application.
[0127] In one specific embodiment, in combination Figure 1 As shown, the client service program files also need to be deployed on the network server, and the relevant client service program files (used by users to download applications on the browser) are deployed on the client (mainly a browser accessible by the client. At this time, the browser can also be on the cloud server, and there is no restriction here).
[0128] Combined with the above steps, it can be understood that the executable file, binary program file and resource file are files necessary for the client application, and the client service program file is a program file that needs to be installed on the client to provide services for the client application, which will be explained again in the running process. This process can be specifically uploaded and deployed to the Web Server through HTTP, FTP or other file transfer tools.
[0129] 310. Deploy the application database and the background database, bind the application database to the network application program interface, and bind the background database to the background service program to complete the deployment of the C / S application project.
[0130] In this embodiment, step 310 is similar to the above Figure 2 The process of step 206 is similar and will not be described in detail here.
[0131] Through the deployment method of a C / S application disclosed in this embodiment, since this embodiment adds a WebApi service to the cloud server, the client application accesses the cloud application database through it, so the security of the cloud application database can be guaranteed, because the cloud application database only needs to expose the access port to the cloud, and applications outside the cloud server are not allowed to access it at all. In addition, WebApi is used as an intermediate service layer, which can naturally and effectively shield the relevant information of the cloud application database from the outside world. At the same time, this embodiment adopts the standard three-tier architecture technology, and the hardware requirements for software program operation are not high, so it does not cost too much for enterprises to deploy applications according to this solution. In addition, this embodiment only needs to implement a deployment process (which can be made into a tool) to publish existing C / S application project engineering or newly developed project engineering to the cloud without the need for developers to modify related program codes, which greatly improves the maintainability of the project engineering.
[0132] For the convenience of Figure 1 For a detailed description of the cloud server shown, see Figure 4 , Figure 4 The flowchart of a method for deploying a C / S application applied to a cloud server disclosed in an embodiment of the present application includes steps 401 to 403.
[0133] 401. Receive the interface service program file sent by the development end, and deploy the generated network application program interface on the application server based on the interface service program file; receive the background service program file sent by the development end, and deploy the generated background service program on the application server based on the background service program file.
[0134] It should be noted that this embodiment is mainly applied to cloud servers. Figure 1 As shown, it can be seen that there is a communication connection between the cloud server and the development end. The communication connection between the cloud server and the development end is not limited here, and it will not be described in detail later. In this embodiment, the cloud server can receive the interface service program file issued by the development end, and based on the interface service program file, deploy the generated network application interface to the application server; receive the background service program file issued by the development end, and based on the background service program file, deploy the generated background service program to the application server.
[0135] In one specific embodiment, in combination Figure 2 and Figure 3 As shown, specifically refer to step 204, first the SQL file (program language file) generated by the development end, because the WebApi project engineering needs to include the SQL file, therefore, it is necessary to call the corresponding compilation tool to compile the SQL file into the WebApi service program file. Specifically, the interface project engineering (WebApi project engineering) is generated by the SQL file, and then the interface project engineering is compiled to generate the interface service program file (WebApi service program file). Finally, the development end can encapsulate the WebApi service program file as a network application program interface, i.e., a WebApi interface, and deploy the WebApi interface in Application Server.
[0136] In addition, the development end can generate a background service project engineering, and compile and generate a background service program file. Specifically, this process requires the generation of a background service project engineering, which is mainly used to manage client sessions, database connection configurations, and client requests. The design of these background managements will be explained again in the background management. The background service project engineering, like WebApi, can be implemented in different programming languages, and then the corresponding compilation tool is called to compile it into a background service program file. In this embodiment, the background service project engineering is also generated by an SQL file, and then the background service engineering is compiled to generate a background service program file. Then, the development end can send the background service program file to the cloud server, and then generate a background service program, and the background service program is also deployed on the Application Server.
[0137] 402. Receive the client application file sent by the development end, and deploy the client application file on the network server.
[0138] Similar to step 401 , the cloud server may also receive the client application file sent by the development end, and deploy the client application file on the network server.
[0139] In one specific embodiment, in combination Figure 2 and Figure 3 As shown, mainly Figure 2 Step 203 or step 205, and Figure 3 In step 303 or step 305, the cloud server receives the client application files (executable files, binary program files, resource files, homepage files, dependency files) sent by the development end and deploys them on the Web Server.
[0140] 403. Bind the application database to the network application program interface, and bind the backend database to the backend service program to complete the deployment of the C / S application project on the cloud server.
[0141] Thus, the cloud server can bind the application database with the network application program interface and the background database with the background service program, thereby completing the deployment of the C / S application project on the cloud server. It should be noted that the application database is used for the client to access through the network application program interface, and the background database is used to store the session information between the client and the cloud server.
[0142] In one specific embodiment, in order to realize the interaction between the client and the cloud server, the cloud server can deploy an application database related to the WebApi interface and a background database related to the background service of the client application.
[0143] Through the deployment method of a C / S application disclosed in this embodiment, since this embodiment adds a WebApi service to the cloud server, the client application accesses the cloud application database through it, so the security of the cloud application database can be guaranteed, because the cloud application database only needs to expose the access port inside the cloud, and applications outside the cloud server are not allowed to access it at all. In addition, WebApi, as an intermediate service layer, can naturally and effectively shield the relevant information of the cloud application database from the outside world.
[0144] based on Figure 4 In the embodiment shown, after the cloud server is deployed, you can also execute Figure 5 See the example shown. Figure 5 , Figure 5This is a flow chart of another method for deploying a C / S application applied to a cloud server disclosed in an embodiment of the present application, including steps 501 to 504.
[0145] 501. When the client application is started and the network server receives a session request, the network application program interface is called to create a session identifier.
[0146] It should be noted that since this embodiment mainly describes the interaction between the client and the cloud server, this embodiment will also provide a supplementary description of the client's operating process. In this embodiment, it is mainly the steps that the client and the cloud server need to perform after the deployment is completed. Specifically, when the client's application is started and the network server receives a session request, the network application interface is called to create a session identifier. It should be noted that the session identifier is used for the client's application to interact with the network server.
[0147] In one specific embodiment, all requests in the Web application are based on sessions. After the session ends, requests cannot be sent and a new session needs to be established. In this embodiment, when the client application starts, it needs to call WebApi to create a session (SessionID) and save it in memory. Subsequent requests need to carry the session ID.
[0148] 502. Store the session identifier and the user login information corresponding to the client in a backend database.
[0149] Then, the session identifier and the user login information corresponding to the client can be stored in the backend database.
[0150] In one specific embodiment, the SessionID and the corresponding user login information (such as client IP, user name, login time, etc.) can be saved in the background database, and the system administrator can enter the background service management program to view session-related information, number of sessions, session running time, configure session timeout, terminate session, and other operations.
[0151] For the client, combined Figure 1As shown, the user needs to enter the URL in the browser to access the application. Specifically, when the user visits the application homepage for the first time, a welcome page will be displayed, and the user will be prompted to click a link to install the client service program (the browser can extract the client service program file deployed on the Web Server). The homepage and the client service program communicate through the HTTP protocol. Every time the user visits the homepage, a detection request will be sent to it. No response means that it is not installed. If there is a response, the next process of starting the client application will be entered. In addition, after the installation of the client service program is completed, the next process will also be entered. It should be noted that the next process described in this embodiment at this time is to call the client service program to start the client application.
[0152] 503. When the network server receives the access request, it obtains the application connection object from the application database, and configures the number of connection objects of the application connection object and the application connection parameters between each application connection object and the application database, so as to process the access request according to the configured application connection object.
[0153] What can be executed simultaneously with step 501-step 502 is that when the network server receives an access request, it obtains an application connection object in the application database, and configures the number of connection objects of the application connection object and the application connection parameters between each application connection object and the application database, so as to process the access request according to the configured application connection object.
[0154] In one specific embodiment, when WebApi receives a request to access a database, it takes out a connection object (which can be understood as an encapsulated object, for example, a Connection object provided by an ADO.NET driver), namely the application connection object mentioned above, from the database connection cache, and then performs the corresponding request processing. The system administrator can enter the background service management program to configure the parameters for connecting to the database and the number of connection objects.
[0155] Furthermore, in this embodiment, the application connection parameters include but are not limited to the host address, port number, database name, user name, password, character set, timeout period, etc. Correspondingly, the number of connection objects can be set to 100 or 200, etc., which will not be described in detail here.
[0156] Furthermore, in this embodiment, various requests sent by the client application will also be recorded in the background database, which is convenient for management personnel to track logs. System administrators can enter the background service management program to view relevant request logs, configure cleanup strategies and request timeouts, etc.
[0157] 504. When the local storage space of the client satisfies the update triggering condition, the updated dependency file and the updated executable file are sent to the client.
[0158] What can be performed simultaneously with step 501 - step 502 is that when the local storage space of the client satisfies the update triggering condition, the cloud server can send the updated dependency file and the updated executable file to the client.
[0159] In one specific embodiment, in the client, when the browser homepage sends a request to start the application to the client service program, the client service program will perform two tasks: first, check whether there is a dependency file in the client's local storage space, or whether the cloud server has been updated. Both of these situations will trigger the download and update of the local dependency file; second, check whether there is an executable file of the application in the client's local storage space and whether the cloud server has been updated. Both of these situations will trigger the download and update of the local executable file, and then execute the startup application. As a result, the cloud server will send the updated dependency file and the updated executable file to the client service program, so that the dependency file and the executable file are updated in the client.
[0160] Furthermore, in other feasible technical solutions, the browser calls the client server program, and after starting the client application, the user can open the application module. Specifically, after the client application is started, the user usually operates different business modules. For example, the user opens the employee management module in the main menu, but this module may not exist locally. At this time, the application needs to notify the client service program to download the employee management module (binary program file) according to the file dependency relationship, and open the employee management module after the download is completed on demand. It should be noted that the above is only an analysis and description of one possible situation. In other feasible technical solutions, this embodiment will not be described one by one.
[0161] Furthermore, the client application can also access the application database and the backend database through the Application Server. Specifically, when a user operates a business in a certain module, he needs to access the data. For example, when a user wants to query all employee records in the employee management module, he needs to access the database when he clicks the query button. From the above deployment process, it can be seen that when a user executes a query, an HTTP request with an ID (i.e., the SQL command corresponding to the specified ID described above, described in step 302) will be sent to the server to call WebApi to access the database, rather than the client application directly accessing the database.
[0162] Through the deployment method of a C / S application disclosed in this embodiment, the design of starting the client application with a URL is adopted in this embodiment, which effectively improves the usability of the application. The background service function is designed to enhance the integrity of the system. At the same time, the client application in this embodiment adopts an on-demand file downloading solution, which greatly improves the file downloading efficiency and user experience.
[0163] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0164] See also Figure 6 , Figure 6 This is a schematic diagram of the structure of a C / S application deployment system disclosed in an embodiment of the present application. It should be noted that: Figure 6 The deployment system of the application embodiment shown is applied to the development end.
[0165] The acquisition unit 601 is used to acquire the source code files and resource files of the C / S application project;
[0166] A determining unit 602, configured to determine a programming language command in a source code file and generate a programming language file based on the programming language command;
[0167] A generating unit 603 is used to generate a client application file according to the source code file and the resource file; wherein the client application file is an application file of the client application;
[0168] The generating unit 603 is further used to generate an interface project project according to the program language file, and compile the interface project project to generate an interface service program file, so as to generate a network application program interface based on the interface service program file; generate a background service project project according to the program language file, and compile the background service project project to generate a background service program file, so as to generate a background service program based on the background service program file;
[0169] A deployment unit 604 is used to deploy the network application program interface and the background service program on the application server of the cloud server; and to deploy the client application program file on the network server of the cloud server;
[0170] The deployment unit 604 is also used to deploy the application database and the background database, and to bind the application database to the network application program interface, and to bind the background database to the background service program to complete the deployment of the C / S application project engineering; wherein the application database is used for the client to access through the network application program interface, and the background database is used to store the session information between the client and the cloud server.
[0171] Exemplarily, the system includes:
[0172] The generating unit 603 is specifically used to separate the flow control statements and the language structure statements in the program language command, and generate statement identification information corresponding to the language structure statement;
[0173] The generating unit 603 is further used to designate the statement identification information as a call identification of the network application program interface of the cloud server, and to generate a program language file according to the process control statement, the language structure statement and the statement identification information.
[0174] Exemplarily, if the client application file includes a binary program file and a dependency file, the system includes:
[0175] The generating unit 603 is specifically used to generate a dependency relationship file between any two source code files; wherein the dependency relationship file is used to characterize the mutual calling relationship between any two source code files;
[0176] The generating unit 603 is further used to generate different binary program files corresponding to any two source code files according to the dependency relationship file.
[0177] Exemplarily, if the client application file includes an executable file and a homepage file, the system includes:
[0178] The generating unit 603 is specifically used to compile the C / S application project according to the source code file to generate an executable file; wherein the executable file is used to represent the program entry of the client application program;
[0179] The generating unit 603 is further used to generate a homepage file corresponding to the application program of the client according to the resource file; wherein the homepage file is used to start the executable file.
[0180] Exemplarily, the system further includes:
[0181] The deployment unit 604 is also used to deploy the client service program file on the network server of the cloud server, and deploy the client service program on the client according to the client service program file; wherein the client service program file is a program file used to provide services for the client's application, and the client service program is used to install the client's application.
[0182] See also Figure 7 , Figure 7 This is a schematic diagram of the structure of a C / S application deployment system disclosed in an embodiment of the present application. It should be noted that: Figure 7 The deployment system of the application embodiment shown is applied to the cloud server side.
[0183] The receiving unit 701 is used to receive the interface service program file sent by the development end, and deploy the generated network application program interface on the application server based on the interface service program file; receive the background service program file sent by the development end, and deploy the generated background service program on the application server based on the background service program file;
[0184] The receiving unit 701 is also used to receive the client application file sent by the development end, and deploy the client application file on the network server;
[0185] The deployment unit 702 is used to bind the application database with the network application program interface and to bind the background database with the background service program to complete the deployment of the C / S application project on the cloud server; wherein the application database is used for the client to access through the network application program interface, and the background database is used to store the session information between the client and the cloud server.
[0186] Exemplarily, the system further includes: a calling unit 703, a storage unit 704 and an acquiring unit 705;
[0187] The calling unit 703 is used to call the network application program interface and create a session identifier when the client application program is started and the network server receives a session request; wherein the session identifier is used for the client application program to exchange information with the network server;
[0188] The storage unit 704 is used to store the session identifier and the user login information corresponding to the client in the backend database;
[0189] Or, the acquisition unit 705 is used to obtain the application connection object in the application database when the network server receives the access request, and configure the number of connection objects of the application connection object and the application connection parameters between each application connection object and the application database, so as to process the access request according to the configured application connection object.
[0190] Exemplarily, the system further includes: a sending unit 706;
[0191] The sending unit 706 is used to send the updated dependency file and the updated executable file to the client when the local storage space of the client meets the update trigger condition; wherein the update trigger condition includes that the updated dependency file and the updated executable file do not exist in the local storage space of the client, or the cloud server receives one or more of the updated dependency file and the updated executable file sent by the development end; the dependency file is used to represent the mutual calling relationship between any two source codes of the C / S application project engineering, and the executable file is used to represent the program entry of the client's application program.
[0192] See below Figure 8 , a schematic diagram of a C / S application deployment device disclosed in an embodiment of the present application includes:
[0193] CPU 801, memory 805, input / output interface 804, wired or wireless network interface 803 and power supply 802;
[0194] The memory 805 is a temporary storage memory or a permanent storage memory;
[0195] The CPU 801 is configured to communicate with the memory 805 and execute the instructions in the memory 805 to perform the aforementioned Figures 2 to 5 A method for deploying a C / S application in any of the illustrated embodiments.
[0196] The embodiment of the present application also provides a chip system, the chip system includes at least one processor and a communication interface, the communication interface and the at least one processor are interconnected through a line, and the at least one processor is used to run a computer program or instruction to execute the aforementioned Figures 2 to 5 The deployment method of the C / S application in the illustrated embodiment.
[0197] The embodiment of the present application also provides a computer-readable storage medium, the computer-readable storage medium includes instructions, when the instructions are executed on a computer, the computer executes the aforementioned Figures 2 to 5 The deployment method of the C / S application in the illustrated embodiment.
[0198] The present application also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the aforementioned Figures 2 to 5 The deployment method of the C / S application in the illustrated embodiment.
[0199] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0200] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0201] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0202] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0203] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), disk or optical disk and other media that can store program code.
Claims
1. A method for deploying a C / S application, characterized in that: Applied to the development end, the method includes: Get the source code files and resource files of the C / S application project; Determining a programming language command in the source code file, and generating a programming language file based on the programming language command; Generate a client application file according to the source code file and the resource file; wherein the client application file is an application file of an application program of the client; Generate an interface project project according to the program language file, and compile the interface project project to generate an interface service program file, so as to generate a network application program interface based on the interface service program file; generate a background service project project according to the program language file, and compile the background service project project to generate a background service program file, so as to generate a background service program based on the background service program file; Deploy the network application program interface and the background service program on the application server of the cloud server; deploy the client application program file on the network server of the cloud server; Deploy the application database and the background database, bind the application database with the network application program interface, and bind the background database with the background service program to complete the deployment of the C / S application project; wherein the application database is used for the client to access through the network application program interface, and the background database is used to store the session information between the client and the cloud server.
2. The method for deploying a C / S application according to claim 1, characterized in that: The generating of a program language file based on the program language command comprises: Separating flow control statements and language structure statements in the program language command, and generating statement identification information corresponding to the language structure statement; The statement identification information is designated as a call identifier of the network application program interface of the cloud server, and the program language file is generated according to the process control statement, the language structure statement and the statement identification information.
3. The method for deploying a C / S application according to claim 1, characterized in that: If the client application file includes a binary program file and a dependency file, generating the client application file according to the source code file includes: Generate a dependency relationship file between any two source code files; wherein the dependency relationship file is used to characterize the mutual calling relationship between the any two source code files; Different binary program files corresponding to the arbitrary two source code files are generated respectively according to the dependency relationship file.
4. The method for deploying a C / S application according to claim 1, characterized in that: If the client application file includes an executable file and a homepage file, generating the client application file according to the source code file and the resource file includes: Compiling the C / S application project according to the source code file to generate the executable file; wherein the executable file is used to represent the program entry of the application program of the client; A homepage file corresponding to the application program of the client is generated according to the resource file; wherein the homepage file is used to start the executable file.
5. The method for deploying C / S applications according to claim 1, characterized in that: Before deploying the application database and the backend database, the method further includes: The client service program file is deployed on the network server of the cloud server, and the client service program is deployed on the client according to the client service program file; wherein the client service program file is a program file for providing services for the application of the client, and the client service program is used to install the application of the client.
6. A method for deploying a C / S application, characterized in that: Applied to a cloud server, the cloud server includes a network server and an application server, the method includes: Receive the interface service program file sent by the development end, and deploy the generated network application program interface on the application server based on the interface service program file; receive the background service program file sent by the development end, and deploy the generated background service program on the application server based on the background service program file; Receiving the client application file sent by the development end, and deploying the client application file on the network server; Bind the application database to the network application program interface, and bind the background database to the background service program to complete the deployment of the C / S application project on the cloud server; wherein the application database is used for the client to access through the network application program interface, and the background database is used to store the session information between the client and the cloud server.
7. The method for deploying C / S applications according to claim 6, characterized in that: The method further comprises: When the client application is started and the network server receives a session request, the network application program interface is called to create a session identifier; wherein the session identifier is used for the client application to exchange information with the network server; The session identifier and the user login information corresponding to the client are stored in the backend database; Alternatively, when the network server receives an access request, it obtains an application connection object from the application database, and configures the number of connection objects of the application connection object and the application connection parameters between each application connection object and the application database, so as to process the access request according to the configured application connection object.
8. The method for deploying C / S applications according to claim 6, characterized in that: The method further comprises: When the local storage space of the client satisfies the update trigger condition, an updated dependency file and an updated executable file are sent to the client; wherein the update trigger condition includes that the updated dependency file and the updated executable file do not exist in the local storage space of the client, or the cloud server receives one or more of the updated dependency file and the updated executable file sent by the development end; the dependency file is used to represent the mutual calling relationship between any two source codes of the C / S application project engineering, and the executable file is used to represent the program entry of the application program of the client.
9. A deployment system for a C / S application, characterized in that: Applied to the development end, the system includes: The acquisition unit is used to acquire the source code files and resource files of the C / S application project; A determination unit, configured to determine a program language command in the source code file and generate a program language file based on the program language command; A generating unit, configured to generate a client application file according to the source code file and the resource file; wherein the client application file is an application file of an application of the client; The generating unit is further used to generate an interface project project according to the program language file, and compile the interface project project to generate an interface service program file, so as to generate a network application program interface based on the interface service program file; generate a background service project project according to the program language file, and compile the background service project project to generate a background service program file, so as to generate a background service program based on the background service program file; A deployment unit, configured to deploy the network application program interface and the background service program on an application server of a cloud server; and to deploy the client application program file on a network server of the cloud server; The deployment unit is also used to deploy an application database and a background database, and to bind the application database to the network application program interface, and to bind the background database to the background service program, so as to complete the deployment of the C / S application project engineering; wherein the application database is used for the client to access through the network application program interface, and the background database is used to store session information between the client and the cloud server.
10. A deployment system for a C / S application, characterized in that: Applied to a cloud server, the cloud server includes a network server and an application server, and the system includes: A receiving unit, configured to receive an interface service program file issued by a development end, and deploy the generated network application program interface on the application server based on the interface service program file; receive a background service program file issued by the development end, and deploy the generated background service program on the application server based on the background service program file; The receiving unit is further used to receive the client application file sent by the development end, and deploy the client application file on the network server; A deployment unit is used to bind the application database with the network application program interface and to bind the background database with the background service program to complete the deployment of the C / S application project on the cloud server; wherein the application database is used for the client to access through the network application program interface, and the background database is used to store the session information between the client and the cloud server.
11. A deployment device for a C / S application, characterized in that: The device comprises: CPU, memory, input and output interfaces, wired or wireless network interfaces, and power supply; The memory is a short-term storage memory or a persistent storage memory; The central processing unit is configured to communicate with the memory and execute instruction operations in the memory to perform the C / S application deployment method according to any one of claims 1 to 8.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes instructions, and when the instructions are executed on a computer, the computer executes the method for deploying a C / S application according to any one of claims 1 to 8.
Citation Information
Patent Citations
Interface development method and related equipment
CN118034680A
Cloud computing systems
US20170005813A1
Method and electronic device for deploying operator in deep learning framework
US20220035614A1