CN114510493A - System deployment method, apparatus, computer equipment and storage medium - Google Patents
System deployment method, apparatus, computer equipment and storage medium Download PDFInfo
- Publication number
- CN114510493A CN114510493A CN202210180725.8A CN202210180725A CN114510493A CN 114510493 A CN114510493 A CN 114510493A CN 202210180725 A CN202210180725 A CN 202210180725A CN 114510493 A CN114510493 A CN 114510493A
- Authority
- CN
- China
- Prior art keywords
- database
- update
- target
- deployment
- script
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
- G06F16/2358—Change logging, detection, and notification
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
- G06F8/658—Incremental updates; Differential updates
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本申请公开一种系统部署方法、装置、计算机设备及存储介质,包括:获取系统数据库的目标更新方式,上述目标更新方式包括以下至少一项:脚本设置更新和比对数据库更新;按照上述目标更新方式完成数据库更新;将版本文件发送至N个部署点,启动目标操作,上述目标操作为:部署系统代码;重新启动系统。如此,在系统提前设置好数据库和版本文件的情况下,无需人工操作,系统可以自动完成系统部署的全过程,从而大幅度减少人力物力的消耗,节约系统部署的部署时间,提高系统部署效率。
The present application discloses a system deployment method, device, computer equipment and storage medium, including: acquiring a target update method of a system database, and the target update method includes at least one of the following: script setting update and comparison database update; update according to the above target The database update is completed by the method; the version file is sent to N deployment points, and the target operation is started. The above target operation is: deploying the system code; restarting the system. In this way, when the database and version files are set in advance in the system, the system can automatically complete the whole process of system deployment without manual operation, thereby greatly reducing the consumption of human and material resources, saving the deployment time of system deployment, and improving the efficiency of system deployment.
Description
技术领域technical field
本申请实施例涉及系统部署领域,尤其是一种系统部署方法、装置、计算机设备及存储介质。The embodiments of the present application relate to the field of system deployment, and in particular, to a system deployment method, apparatus, computer equipment, and storage medium.
背景技术Background technique
目前,各行各业都具备了在线上处理业务的能力,将原先在线下处理的业务同步至线上,从而可以大幅度提高处理业务的效率。At present, all walks of life have the ability to process business online, and the business previously processed offline can be synchronized to the online, which can greatly improve the efficiency of business processing.
由于业务具有承接性,因此,很多企业需要将原先线下的数据和系统一并同步至线上,在相关技术中,部分企业采取人工进行系统部署的方法完成线上业务同步,部分企业采取搭建符合自身需求的更新机制,自动化完成系统部署。Due to the continuity of the business, many enterprises need to synchronize the original offline data and systems to the online. In related technologies, some enterprises use manual system deployment methods to complete online business synchronization, and some enterprises adopt the method of building An update mechanism that meets its own needs automatically completes the system deployment.
由上述过程可知,无论采取人工系统部署还是自行搭建更新机制进行系统部署,均需要花费大量人力、物力,且耗时较长,效率很低。It can be seen from the above process that whether manual system deployment or self-built update mechanism is used for system deployment, it takes a lot of manpower and material resources, and it takes a long time and is inefficient.
发明内容SUMMARY OF THE INVENTION
本申请实施例提供一种能够自动进行线上业务部署的方法、装置、计算机设备及存储介质。The embodiments of the present application provide a method, an apparatus, a computer device, and a storage medium capable of automatically deploying online services.
为解决上述技术问题,本发明创造的实施例采用的一个技术方案是:提供一种系统部署方法,包括:获取系统数据库的目标更新方式,上述目标更新方式包括以下至少一项:脚本设置更新和比对数据库更新;按照上述目标更新方式完成数据库更新;将版本文件发送至N个部署点,启动目标操作,上述目标操作为:部署系统代码;重新启动系统。In order to solve the above-mentioned technical problem, a technical solution adopted by the embodiments of the present invention is to provide a system deployment method, including: acquiring a target update method of a system database, and the above-mentioned target update method includes at least one of the following: script setting update and Compare database updates; complete database update according to the above target update method; send version files to N deployment points, and start target operations. The above target operations are: deploying system code; restarting the system.
可选地,上述目标更新方式为上述脚本设置更新的情况下,上述按照目标更新方式完成数据库更新,本申请实施例提供的系统部署方法可以包括:上传预设脚本,上述预设脚本用于运行上述数据库;执行上述预设脚本。Optionally, in the case that the above-mentioned target update method is the above-mentioned script setting update, and the above-mentioned database update is completed according to the target update method, the system deployment method provided by the embodiment of the present application may include: uploading a preset script, and the above-mentioned preset script is used for running The above database; execute the above preset script.
可选地,上述目标更新方式为上述比对数据库更新的情况下,上述按照目标更新方式完成数据库更新中,本申请实施例提供的系统部署方法可以包括:比对源数据库与目标数据库,确认上述源数据库与上述目标数据库的格式差异,上述源数据库为系统部署之前系统数据对应的数据库,上述目标数据库为系统部署完成后上述系统数据对应的数据库;生成针对上述目标数据库的更新脚本;执行更新脚本。Optionally, when the above-mentioned target update method is the above-mentioned comparison database update, in the above-mentioned completion of the database update according to the target update method, the system deployment method provided by this embodiment of the present application may include: comparing the source database and the target database, confirming the above. The format difference between the source database and the above-mentioned target database, the above-mentioned source database is the database corresponding to the system data before the system is deployed, and the above-mentioned target database is the database corresponding to the above-mentioned system data after the system deployment is completed; Generate an update script for the above-mentioned target database; Execute the update script .
可选地,上述目标更新方式为上述脚本设置更新和上述比对数据库更新的情况下,上述按照目标更新方式完成数据库更新中,本申请实施例提供的系统部署方法可以包括:上传预设脚本,上述预设脚本用于运行上述数据库;在接收到上述比对数据库的指令的情况下,则连接源数据库与目标数据库,上述源数据库为系统部署之前系统数据对应的数据库,上述目标数据库为系统部署完成后上述系统数据对应的数据库;比对源数据库与目标数据库,确认上述源数据库与上述目标数据库的格式差异,生成针对上述目标数据库的更新脚本;确认上述预设脚本和上述更新脚本的执行顺序,上述执行顺序为提前系统预设的;按照上述执行顺序,依次执行上述预设脚本和上述更新脚本。Optionally, in the case where the above-mentioned target update method is the above-mentioned script setting update and the above-mentioned comparison database update, in the above-mentioned completing the database update according to the target update method, the system deployment method provided by the embodiment of the present application may include: uploading a preset script, The above-mentioned preset script is used to run the above-mentioned database; in the case of receiving the above-mentioned instruction to compare the database, the source database and the target database are connected, the above-mentioned source database is the database corresponding to the system data before the system is deployed, and the above-mentioned target database is the system deployment. After completion, the database corresponding to the above-mentioned system data; compare the source database and the target database, confirm the format difference between the above-mentioned source database and the above-mentioned target database, and generate an update script for the above-mentioned target database; confirm the execution sequence of the above-mentioned preset script and the above-mentioned update script , the above-mentioned execution sequence is preset by the system in advance; according to the above-mentioned execution sequence, the above-mentioned preset script and the above-mentioned update script are sequentially executed.
可选地,在上述执行顺序为:先执行上述更新脚本,再执行上述预设脚本的情况下,上述按照上述执行顺序,依次执行上述预设脚本和上述更新脚本中,本申请实施例提供的系统部署方法还可以包括:执行上述更新脚本,将上述目标数据库的第一数据库格式更新为第二数据库格式,上述第二数据库格式与上述源数据库中的数据格式相匹配;执行上述预设脚本。Optionally, in the case where the above-mentioned execution sequence is: firstly execute the above-mentioned update script, and then execute the above-mentioned preset script, the above-mentioned preset script and the above-mentioned update script are executed in sequence according to the above-mentioned execution order, the embodiment of the present application provides. The system deployment method may further include: executing the above-mentioned update script to update the first database format of the above-mentioned target database to a second database format, and the above-mentioned second database format matches the data format in the above-mentioned source database; and executing the above-mentioned preset script.
可选地,上述获取系统数据库的目标更新方式之前,本申请实施例提供的系统部署方法还可以包括:录入系统部署信息,上述系统部署信息包括以下至少一项:邮件信息、数据库信息、部署点信息;上述邮件信息用于向系统部署人员发送系统部署内容,上述数据库信息用于设置上述源数据库的数据库信息和上述目标数据库的数据库信息;上述部署点信息用于设置系统部署对应的服务器信息;上传系统部署文件;上述系统部署文件包括以下至少一项:上述预设脚本、上述版本文件。Optionally, before obtaining the target update method of the system database, the system deployment method provided by the embodiment of the present application may further include: inputting system deployment information, where the system deployment information includes at least one of the following: email information, database information, deployment point information; the above-mentioned mail information is used to send the system deployment content to the system deployer, the above-mentioned database information is used to set the database information of the above-mentioned source database and the database information of the above-mentioned target database; the above-mentioned deployment point information is used to set the server information corresponding to the system deployment; Upload a system deployment file; the system deployment file includes at least one of the following: the preset script and the version file.
可选地,上述按照目标更新方式完成数据库更新和上述将版本文件发送至N个部署点,启动目标操作中,本申请实施例提供的中系统部署方法还可以包括:存储执行日志,上述执行日志为用于记录上述数据库更新和上述部署系统代码的过程性文件。Optionally, in the above-mentioned completing the database update according to the target update method and the above-mentioned sending the version file to N deployment points, and starting the target operation, the mid-system deployment method provided by the embodiment of the present application may further include: storing an execution log, the above-mentioned execution log. It is a procedural file for recording the above-mentioned database update and the above-mentioned deployment system code.
可选地,上述部署系统代码之后,本申请实施例提供的中系统部署方法还可以包括:确定N个部署点中的目标部署点,上述目标部署点为系统部署异常的部署点;根据上述目标部署点的执行日志,重新对上述目标部署点进行系统部署。Optionally, after the above-mentioned deployment of the system code, the mid-system deployment method provided by the embodiment of the present application may further include: determining a target deployment point among the N deployment points, where the above-mentioned target deployment point is a deployment point with abnormal system deployment; according to the above-mentioned target The execution log of the deployment point, redeploy the system to the above target deployment point.
为解决上述技术问题,本发明实施例还提供一种系统部署装置,包括:获取模块,用于获取系统数据库的目标更新方式,上述目标更新方式包括以下至少一项:脚本设置更新和比对数据库更新;更新模块,用于按照上述获取模块获取的上述目标更新方式完成数据库更新;启动模块,用于将版本文件发送至N个部署点,启动目标操作,上述目标操作为:部署系统代码;启动模块,还用于重新启动系统。In order to solve the above technical problem, an embodiment of the present invention also provides a system deployment device, including: an acquisition module for acquiring a target update mode of a system database, where the target update mode includes at least one of the following: script setting update and comparison database update; an update module is used to complete the database update according to the above-mentioned target update method obtained by the above-mentioned acquisition module; a startup module is used to send the version file to N deployment points, and start the target operation, and the above-mentioned target operation is: deploying the system code; module, also used to restart the system.
可选地,上述目标更新方式为上述脚本设置更新的情况下,执行模块,用于上传预设脚本,上述预设脚本用于运行上述数据库;执行模块,还用于执行上述预设脚本。Optionally, when the above-mentioned target update method is to update the above-mentioned script settings, the execution module is used for uploading a preset script, and the above-mentioned preset script is used for running the above-mentioned database; the execution module is further used for executing the above-mentioned preset script.
可选地,上述目标更新方式为上述比对数据库更新的情况下,比对模块,用于比对源数据库与目标数据库,确认上述源数据库与上述目标数据库的格式差异,上述源数据库为系统部署之前系统数据对应的数据库,上述目标数据库为系统部署完成后上述系统数据对应的数据库;生成模块,用于生成针对上述目标数据库的更新脚本;执行模块,用于执行更新脚本。Optionally, when the above-mentioned target update method is the above-mentioned comparison database update, the comparison module is used to compare the source database and the target database, and confirm the format difference between the above-mentioned source database and the above-mentioned target database, and the above-mentioned source database is a system deployment. For the database corresponding to the previous system data, the above target database is the database corresponding to the above system data after the system deployment is completed; the generating module is used to generate an update script for the above target database; the execution module is used to execute the update script.
可选地,上述目标更新方式为上述脚本设置更新和上述比对数据库更新的情况下,执行模块,用于上传预设脚本,上述预设脚本用于运行上述数据库;连接模块,用于在接收到上述比对数据库的指令的情况下,则连接源数据库与目标数据库,上述源数据库为系统部署之前系统数据对应的数据库,上述目标数据库为系统部署完成后上述系统数据对应的数据库;比对模块,用于比对源数据库与目标数据库,确认上述源数据库与上述目标数据库的格式差异,生成针对上述目标数据库的更新脚本;确认模块,用于确认上述预设脚本和上述更新脚本的执行顺序,上述执行顺序为提前系统预设的;执行模块,还用于按照上述执行顺序,依次执行上述预设脚本和上述更新脚本。Optionally, when the above-mentioned target update method is the above-mentioned script setting update and the above-mentioned comparison database update, the execution module is used to upload a preset script, and the above-mentioned preset script is used to run the above-mentioned database; Under the situation of the above-mentioned instruction of the comparison database, then connect the source database and the target database, the above-mentioned source database is the database corresponding to the system data before the system deployment, and the above-mentioned target database is the database corresponding to the above-mentioned system data after the system deployment is completed; the comparison module , used to compare the source database and the target database, confirm the format difference between the above-mentioned source database and the above-mentioned target database, and generate an update script for the above-mentioned target database; Confirmation module is used to confirm the execution sequence of the above-mentioned preset script and the above-mentioned update script, The above-mentioned execution sequence is preset by the system in advance; the execution module is further configured to execute the above-mentioned preset script and the above-mentioned update script in sequence according to the above-mentioned execution sequence.
可选地,在上述执行顺序为:先执行上述更新脚本,再执行上述预设脚本的情况下,执行模块,用于执行上述更新脚本,将上述目标数据库的第一数据库格式更新为第二数据库格式,上述第二数据库格式与上述源数据库中的数据格式相匹配;执行模块,还用于执行上述预设脚本。Optionally, when the above-mentioned execution sequence is: firstly execute the above-mentioned update script, and then execute the above-mentioned preset script, the execution module is configured to execute the above-mentioned update script, and update the first database format of the above-mentioned target database to the second database The format of the second database matches the data format in the source database; the execution module is further configured to execute the preset script.
可选地,录入模块,用于录入系统部署信息,上述系统部署信息包括以下至少一项:邮件信息、数据库信息、部署点信息;上述邮件信息用于向系统部署人员发送系统部署内容,上述数据库信息用于设置上述源数据库的数据库信息和上述目标数据库的数据库信息;上述部署点信息用于设置系统部署对应的服务器信息;上传模块,还用于上传系统部署文件;上述系统部署文件包括以下至少一项:上述预设脚本、上述版本文件。Optionally, the input module is used to input system deployment information, and the system deployment information includes at least one of the following: email information, database information, and deployment point information; the email information is used to send system deployment content to system deployers, and the database The information is used to set the database information of the above-mentioned source database and the database information of the above-mentioned target database; the above-mentioned deployment point information is used to set the server information corresponding to the system deployment; the upload module is also used to upload the system deployment file; The above-mentioned system deployment file includes at least the following: One item: the above preset script, the above version file.
可选地,存储模块,用于存储执行日志,上述执行日志为用于记录上述数据库更新和上述部署系统代码的过程性文件。Optionally, the storage module is configured to store an execution log, where the execution log is a procedural file for recording the above-mentioned database update and the above-mentioned deployment system code.
可选地,确定模块,用于确定N个部署点中的目标部署点,上述目标部署点为系统部署异常的部署点;执行模块,用于根据上述目标部署点的执行日志,重新对上述目标部署点进行系统部署。Optionally, a determination module is used to determine a target deployment point in the N deployment points, and the above target deployment point is a deployment point with abnormal system deployment; an execution module is used for re-analyzing the above target deployment point according to the execution log of the above target deployment point. Deployment point for system deployment.
为解决上述技术问题本发明实施例还提供一种计算机设备,包括存储器和处理器,所述存储器中存储有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行上述所述系统部署方法的步骤。To solve the above technical problem, an embodiment of the present invention further provides a computer device, including a memory and a processor, where computer-readable instructions are stored in the memory, and when the computer-readable instructions are executed by the processor, the The processor executes the steps of the system deployment method described above.
为解决上述技术问题本发明实施例还提供一种存储有计算机可读指令的存储介质,所述计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行上述所述系统部署方法的步骤。In order to solve the above technical problem, the embodiment of the present invention further provides a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the above-mentioned The steps of the system deployment method.
本发明实施例的有益效果是:通过获取系统数据库的目标更新方式(上述目标更新方式包括以下至少一项:脚本设置更新和比对数据库更新),并按照目标更新方式完成数据库更新,并将系统中预存的版本文件发送至N个部署点,启动部署系统代码的目标操作,最终重新启动系统,完成自动进行系统部署。在上述过程中,在系统提前设置好数据库和版本文件的情况下,无需人工操作,系统可以自动完成系统部署的全过程,从而大幅度减少人力物力的消耗,节约系统部署的部署时间,提高系统部署效率。The beneficial effects of the embodiments of the present invention are: by acquiring the target update mode of the system database (the above target update mode includes at least one of the following: script setting update and comparison database update), and complete the database update according to the target update mode, and update the system The version file pre-stored in the system is sent to N deployment points, the target operation of deploying the system code is started, and finally the system is restarted to complete the automatic system deployment. In the above process, when the database and version files are set in advance in the system, the system can automatically complete the whole process of system deployment without manual operation, thereby greatly reducing the consumption of human and material resources, saving the deployment time of system deployment, and improving the system Deployment efficiency.
附图说明Description of drawings
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the accompanying drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only These are some embodiments of the present application. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without any creative effort.
图1为本发明一个具体实施例的系统部署方法的基本流程示意图;FIG. 1 is a schematic diagram of a basic flow of a system deployment method according to a specific embodiment of the present invention;
图2为本发明一个实施例的系统部署装置基本结构示意图;FIG. 2 is a schematic diagram of a basic structure of a system deployment apparatus according to an embodiment of the present invention;
图3为本发明一个实施例的计算机设备的基本结构框图。FIG. 3 is a basic structural block diagram of a computer device according to an embodiment of the present invention.
具体实施方式Detailed ways
下面详细描述本申请的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,仅用于解释本申请,而不能解释为对本申请的限制。The following describes in detail the embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, but not to be construed as a limitation on the present application.
本技术领域技术人员可以理解,除非特意声明,这里使用的单数形式“一”、“一个”、“所述”和“该”也可包括复数形式。应该进一步理解的是,本申请的说明书中使用的措辞“包括”是指存在所述特征、整数、步骤、操作、元件和/或组件,但是并不排除存在或添加一个或多个其他特征、整数、步骤、操作、元件、组件和/或它们的组。It will be understood by those skilled in the art that the singular forms "a", "an", "the" and "the" as used herein can include the plural forms as well, unless expressly stated otherwise. It should be further understood that the word "comprising" used in the specification of this application refers to the presence of stated features, integers, steps, operations, elements and/or components, but does not preclude the presence or addition of one or more other features, Integers, steps, operations, elements, components and/or groups thereof.
本技术领域技术人员可以理解,除非另外定义,这里使用的所有术语(包括技术术语和科学术语),具有与本申请所属领域中的普通技术人员的一般理解相同的意义。还应该理解的是,诸如通用字典中定义的那些术语,应该被理解为具有与现有技术的上下文中的意义一致的意义,并且除非像这里一样被特定定义,否则不会用理想化或过于正式的含义来解释。It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. It should also be understood that terms, such as those defined in a general dictionary, should be understood to have meanings consistent with their meanings in the context of the prior art and, unless specifically defined as herein, should not be interpreted in idealistic or overly formal meaning to explain.
本技术领域技术人员可以理解,这里所使用的“终端”既包括无线信号接收器的设备,其仅具备无发射能力的无线信号接收器的设备,又包括接收和发射硬件的设备,其具有能够在双向通信链路上,执行双向通信的接收和发射硬件的设备。这种设备可以包括:蜂窝或其他通信设备,其具有单线路显示器或多线路显示器或没有多线路显示器的蜂窝或其他通信设备;PCS(Personal Communications Service,个人通信系统),其可以组合语音、数据处理、传真和/或数据通信能力;PDA(Personal Digital Assistant,个人数字助理),其可以包括射频接收器、寻呼机、互联网/内联网访问、网络浏览器、记事本、日历和/或GPS(Global Positioning System,全球定位系统)接收器;常规膝上型和/或掌上型计算机或其他设备,其具有和/或包括射频接收器的常规膝上型和/或掌上型计算机或其他设备。这里所使用的“终端”可以是便携式、可运输、安装在交通工具(航空、海运和/或陆地)中的,或者适合于和/或配置为在本地运行,和/或以分布形式,运行在地球和/或空间的任何其他位置运行。这里所使用的“终端”还可以是通信终端、上网终端、音乐/视频播放终端,例如可以是PDA、MID(Mobile Internet Device,移动互联网设备)和/或具有音乐/视频播放功能的移动电话,也可以是智能电视、机顶盒等设备。Those skilled in the art can understand that the "terminal" used here includes both a device of a wireless signal receiver, which only has a device of a wireless signal receiver without transmission capability, and a device of receiving and transmitting hardware, which has a device capable of transmitting a wireless signal. On a two-way communication link, a device that performs the receiving and transmitting hardware of the two-way communication. Such equipment may include: cellular or other communication equipment, which has a single-line display or a multi-line display or a cellular or other communication device without a multi-line display; PCS (Personal Communications Service), which can combine voice, data Processing, fax and/or data communication capabilities; PDA (Personal Digital Assistant), which may include a radio frequency receiver, pager, Internet/Intranet access, web browser, notepad, calendar and/or GPS (Global Positioning System) receiver; conventional laptop and/or palmtop computer or other device having and/or including a conventional laptop and/or palmtop computer or other device with a radio frequency receiver. "Terminal" as used herein may be portable, transportable, mounted in a vehicle (air, marine and/or land), or adapted and/or configured to operate locally, and/or in a distributed fashion, to operate Operates anywhere on Earth and/or space. The "terminal" used here can also be a communication terminal, an Internet terminal, and a music/video playing terminal, such as a PDA, a MID (Mobile Internet Device) and/or a mobile phone with a music/video playing function, It can also be a smart TV, a set-top box and other devices.
请参阅图1,图1为本实施例提供的系统部署方法的基本流程示意图,包括步骤201至步骤204:Please refer to FIG. 1. FIG. 1 is a schematic diagram of a basic flow of a system deployment method provided by this embodiment, including
步骤201:获取系统数据库的目标更新方式。Step 201: Obtain the target update method of the system database.
在本发明实施例中,上述目标更新方式包括以下至少一项:脚本设置更新和比对数据库更新。In the embodiment of the present invention, the above-mentioned target update method includes at least one of the following: script setting update and comparison database update.
在本发明实施例中,上述目标更新方式可以为提前预设的,也可以为用户自定义设置的。In the embodiment of the present invention, the above-mentioned target update manner may be preset in advance, or may be user-defined setting.
在一种示例中,当上述目标更新方式为提前预设的情况下,系统中已经预存了目标更新方式,在系统部署开始时,即开始执行步骤201时,即可以从系统预存的内容中读取目标更新方式。In an example, when the above-mentioned target update method is preset in advance, the target update method has been pre-stored in the system, and when the system deployment starts, that is, when
在本发明实施例中,上述目标更新方式用于更新数据库。In the embodiment of the present invention, the above-mentioned target update manner is used to update the database.
在本发明实施例中,目标更新方式可以仅为脚本设置更新,还可以为比对数据库更新,还可以为即包括脚本设置更新,又包括比对数据库更新,本发明对此不作限定。In this embodiment of the present invention, the target update method may be only a script setting update, may also be a comparison database update, and may include both a script setting update and a comparison database update, which is not limited in the present invention.
步骤202:按照上述目标更新方式完成数据库更新。Step 202: Complete the database update according to the above target update method.
需要说明的是:It should be noted:
1.在目标更新方式为脚本设置更新的情况下,该脚本设置更新方式即为通过执行脚本对数据库进行更新,脚本的作用在于在新的系统部署中运行数据库,也即,当目标更新方式仅包括脚本设置更新时,实际上系统部署后的数据库与系统部署前的数据库的格式方面并没有关键差异。1. In the case where the target update method is the script setting update, the script setting update method is to update the database by executing the script. The function of the script is to run the database in the new system deployment, that is, when the target update method is only Including the script settings update, there are actually no critical differences in the format of the database after system deployment and the database before system deployment.
2.在目标更新方式为比对数据库更新的情况下,该比对数据库即为:比对系统部署前的数据库和系统部署后的数据库,即比对源数据库和目标数据库。其原因在于源数据库与目标数据库的格式内容有关键差异,在系统部署后,目标数据库无法完整承载源数据库中的内容,因此,需要通过比对数据库对目标数据库进行更新,例如,更新目标数据库中的字段,可以添加、和/或删除、和/或变更目标数据库中的字段。2. In the case where the target update method is to compare database updates, the comparison database is: comparing the database before system deployment with the database after system deployment, that is, comparing the source database and the target database. The reason is that there are key differences in the format and content of the source database and the target database. After the system is deployed, the target database cannot fully carry the content in the source database. Therefore, the target database needs to be updated by comparing the database, for example, updating the target database. fields, can add, and/or delete, and/or change fields in the target database.
3.在目标更新方式既包括脚本设置更新,又包括比对数据库更新,即可以认为在系统部署的过程中,需要通过脚本运行数据库,且源数据库和目标数据库的格式内容有关键差异,因此,需要使用两种更新方式对数据库进行更新。进一步的,由于包括两种更新方式,因此,该两种更新方式的使用顺序根据源数据库和目标数据库的实际情况可能有所不同,详细参照下文内容。3. The target update method includes both the script setting update and the comparison database update, that is, it can be considered that in the process of system deployment, the database needs to be run through the script, and there are key differences in the format and content of the source database and the target database. Therefore, The database needs to be updated using two update methods. Further, since two update methods are included, the order of use of the two update methods may be different according to the actual situation of the source database and the target database, and please refer to the following content for details.
步骤203:将预存的版本文件发送至N个部署点,启动目标操作。Step 203: Send the pre-stored version file to N deployment points to start the target operation.
本发明实施例中,上述目标操作为:部署系统代码。In the embodiment of the present invention, the above target operation is: deploying system code.
在本发明实施例中,上述N个部署点为系统预设的,也可以为用户自定义设置的,本发明对此不作限定。In this embodiment of the present invention, the above-mentioned N deployment points are preset by the system, and may also be user-defined settings, which are not limited in the present invention.
在本发明实施例中,上述N个部署点可以为N个不同地理位置对应的部署点。In this embodiment of the present invention, the above-mentioned N deployment points may be deployment points corresponding to N different geographic locations.
在本发明实施例中,上述版本文件用于部署系统代码,即更新系统代码。In the embodiment of the present invention, the above-mentioned version file is used to deploy system code, that is, update system code.
在本发明实施例中,上述版本文件可以为提前预设的,即系统中预存的。In this embodiment of the present invention, the above-mentioned version file may be preset in advance, that is, pre-stored in the system.
需要说明的是,系统部署的过程主要由两部分构成,第一部分为数据库更新,即对应步骤201和步骤202,第二部分为部署系统代码,即对应步骤203。It should be noted that the system deployment process is mainly composed of two parts, the first part is database update, corresponding to
步骤204:重新启动系统。Step 204: Reboot the system.
在本发明实施例中,在完成上述步骤201至步骤203之后,会自动重新启动系统,从而以完成新的系统运行。In this embodiment of the present invention, after completing the
在本申请实施例提供的系统部署方法中,通过获取系统数据库的目标更新方式(上述目标更新方式包括以下至少一项:脚本设置更新和比对数据库更新),并按照目标更新方式完成数据库更新,并将系统中预存的版本文件发送至N个部署点,启动部署系统代码的目标操作,最终重新启动系统,完成自动进行系统部署。在上述过程中,在系统提前设置好数据库和版本文件的情况下,无需人工操作,系统可以自动完成系统部署的全过程,从而大幅度减少人力物力的消耗,节约系统部署的部署时间,提高系统部署效率。In the system deployment method provided by the embodiment of the present application, by acquiring the target update mode of the system database (the above target update mode includes at least one of the following: script setting update and comparison database update), and completing the database update according to the target update mode, And send the version files pre-stored in the system to N deployment points, start the target operation of deploying the system code, and finally restart the system to complete the automatic system deployment. In the above process, when the database and version files are set in advance in the system, the system can automatically complete the whole process of system deployment without manual operation, thereby greatly reducing the consumption of human and material resources, saving the deployment time of system deployment, and improving the system Deployment efficiency.
可选地,在本申请实施例中,上述目标更新方式为上述脚本设置更新的情况下,上述步骤202中,本申请实施例提供的系统部署方法还包括如下步骤A1和步骤A2:Optionally, in the embodiment of the present application, in the case where the above-mentioned target update method is the above-mentioned script setting update, in the above-mentioned
步骤A1:上传预设脚本。Step A1: Upload the preset script.
示例性地,上述预设脚本用于运行上述数据库。Exemplarily, the above preset script is used to run the above database.
步骤A2:执行上述预设脚本。Step A2: Execute the above preset script.
可以理解的是,由前述内容可知,当目标更新方式仅为脚本设置更新的情况下,该更新方式中的脚本,即预设脚本可以为提前预设置好的,在需要使用该预设脚本进行数据库更新,运行数据库的情况下,直接调取,并上传该预设脚本即可。It can be understood that, as can be seen from the foregoing content, when the target update method is only the script setting update, the script in the update method, that is, the preset script, can be preset in advance, and the preset script needs to be used to perform the update. Database update, in the case of running the database, directly call and upload the preset script.
示例性地,上述预设脚本为提前预设的。Exemplarily, the above preset script is preset in advance.
如此,在上述目标更新方式为上述脚本设置更新的情况下,通过自动调取提前预设的预设脚本,并直接执行该预设脚本,即可完成系统部署中的数据库更新,无需人工操作,降低人工操作时间和效率。In this way, in the case where the above-mentioned target update method is the above-mentioned script setting update, the database update in the system deployment can be completed by automatically retrieving the preset script preset in advance and directly executing the preset script without manual operation. Reduce manual operation time and efficiency.
可选地,在本申请实施例中,上述目标更新方式为上述比对数据库更新的情况下,上述步骤202中,本申请实施例提供的系统部署方法还包括如下步骤B1至步骤B3:Optionally, in the embodiment of the present application, when the above-mentioned target update method is the above-mentioned comparison database update, in the above-mentioned
步骤B1:比对源数据库与目标数据库,确认上述源数据库与所述目标数据库的格式差异。Step B1: Compare the source database and the target database, and confirm the format difference between the source database and the target database.
步骤B2:生成针对上述目标数据库的更新脚本。Step B2: Generate an update script for the above target database.
步骤B3:执行更新脚本。Step B3: Execute the update script.
示例性地,上述源数据库为系统部署之前系统数据对应的数据库,上述目标数据库为系统部署完成后所述系统数据对应的数据库。Exemplarily, the source database is a database corresponding to the system data before the system is deployed, and the target database is a database corresponding to the system data after the system deployment is completed.
示例性地,上述目标更新方式为比对数据库更新可以参照前述描述,此处不再赘述。Exemplarily, the foregoing target update manner is to compare the database update, and reference may be made to the foregoing description, which will not be repeated here.
示例性地,在比对数据库的过程中,实际为比对上述源数据库与目标数据库,其比对的具体内容主要包括以下5类内容:Exemplarily, in the process of comparing databases, it is actually comparing the above-mentioned source database and target database, and the specific content of its comparison mainly includes the following 5 types of content:
1、比对源数据库和目标数据库的角色和用户的一致度,是否存在新增、删除的情况;1. Compare the consistency of the roles and users of the source database and the target database to see if there is any addition or deletion;
2、比对源数据库和目标数据库中的表是否有新增、删除,系统中的注释是否更改过,是否存在新增和删除索引的情况,字段是否存在增加、删除的情况,字段是否存在改名,字段非空、默认值、注释改动的情况,表本身是否有新增、删除触发器的情况;2. Compare whether the tables in the source database and the target database are added or deleted, whether the comments in the system have been changed, whether there are new and deleted indexes, whether the fields are added or deleted, and whether the fields are renamed. , the field is not empty, the default value, the comment is changed, whether the table itself has new or deleted triggers;
3、比对源数据库和目标数据库的视图、存储过程、函数、包的SQL语句是否存在改动的情况,是否存在新增和删除的情况;3. Compare the source and target database views, stored procedures, functions, and package SQL statements for changes, additions and deletions;
4、比对源数据库和目标数据库是否同步、系统的类型是否有新增、删除和修改的情况;4. Compare whether the source database and the target database are synchronized, and whether the system type is added, deleted or modified;
5、比对源数据库和目标数据库的表、视图、存储过程、包、同步授权是否存在新增或撤销的情况。5. Compare the tables, views, stored procedures, packages, and synchronization authorizations of the source database and the target database to see if there is a new or revoked situation.
进一步地,在比对完成后,若存在上述内容中的情况,则需要按照源数据库情况对目标数据库进行修正,以使得目标数据库可以承载源数据库中的数据,上述修正过程可以通过更新脚本完成,详细参照下文。Further, after the comparison is completed, if there is a situation in the above-mentioned content, the target database needs to be revised according to the source database situation, so that the target database can carry the data in the source database, and the above-mentioned revision process can be completed by updating the script, See below for details.
示例性地,根据上述比对过程比对后,可以生成更新脚本,该更新脚本及用于对目标数据库进行修正,在执行该更新脚本后,目标数据库可以承载源数据库中的数据。Exemplarily, after the comparison according to the above comparison process, an update script can be generated, and the update script can be used to revise the target database. After the update script is executed, the target database can carry the data in the source database.
如此,在上述目标更新方式为上述比对数据库更新的情况下,通过比对源数据库和目标数据库,并生成更新脚本,执行更新脚本,即可完成系统部署中的数据库更新,无需人工操作,降低人工操作时间和效率。In this way, in the case where the above-mentioned target update method is the above-mentioned comparison database update, by comparing the source database and the target database, generating an update script, and executing the update script, the database update in the system deployment can be completed, without manual operation, reducing the cost. Manual operation time and efficiency.
可选地,在本申请实施例中,上述目标更新方式为上述脚本设置更新和上述比对数据库更新的情况下,上述步骤202中,本申请实施例提供的系统部署方法还包括如下步骤C1至步骤C5:Optionally, in the embodiment of the present application, in the case that the above-mentioned target update method is the above-mentioned script setting update and the above-mentioned comparison database update, in the
步骤C1:上传预设脚本。Step C1: Upload the preset script.
步骤C2:在接收到上述比对数据库的指令的情况下,则连接源数据库与目标数据库。Step C2: In the case of receiving the above instruction for comparing the databases, connect the source database and the target database.
步骤C3:比对源数据库与目标数据库,确认上述源数据库与上述目标数据库的格式差异,生成针对上述目标数据库的更新脚本。Step C3: Compare the source database and the target database, confirm the format difference between the source database and the target database, and generate an update script for the target database.
步骤C4:确认上述预设脚本和上述更新脚本的执行顺序。Step C4: Confirm the execution sequence of the above-mentioned preset script and the above-mentioned update script.
步骤C5:按照上述执行顺序,依次执行上述预设脚本和上述更新脚本。Step C5: According to the above execution sequence, execute the above preset script and the above update script in sequence.
示例性地,上述预设脚本用于运行上述数据库。Exemplarily, the above preset script is used to run the above database.
示例性地,上述源数据库为系统部署之前系统数据对应的数据库,上述目标数据库为系统部署完成后上述系统数据对应的数据库。Exemplarily, the above-mentioned source database is a database corresponding to the system data before the system is deployed, and the above-mentioned target database is a database corresponding to the above-mentioned system data after the system deployment is completed.
示例性地,上述执行顺序为提前系统预设的。Exemplarily, the above execution sequence is preset by the system in advance.
示例性地,上述步骤C1可以参照前述内容对步骤A1的描述,步骤C3可以参照前述内容对步骤B1至步骤B3的描述,此处不再赘述。Exemplarily, the above-mentioned step C1 may refer to the description of step A1 in the foregoing content, and step C3 may refer to the description of step B1 to step B3 in the foregoing content, which will not be repeated here.
示例性地,由于上述目标更新方式包括:脚本设置更新和比对数据库更新两种更新方式,因此,在系统获取到预设脚本后,需要将源数据库和目标数据库进行连接,才能够进行后续的比对工作。Exemplarily, since the above-mentioned target update methods include: script setting update and comparison database update two update methods, therefore, after the system obtains the preset script, the source database and the target database need to be connected to be able to carry out the follow-up. Compare work.
示例性地,上述比对数据库的指令可以为系统获取到预设脚本后,自动触发电子设备发送的指令,用于连接源数据库与目标数据库。Exemplarily, the above-mentioned instruction for comparing the database may be an instruction that automatically triggers the electronic device to send after the system obtains the preset script, for connecting the source database and the target database.
示例性地,上述执行顺序可以为先执行预设脚本,然后执行更新脚本;也可以为先执行更新脚本,然后执行预设脚本,本发明实施例对此不作限定。Exemplarily, the above execution sequence may be that the preset script is executed first, and then the update script is executed; or the update script may be executed first, and then the preset script is executed, which is not limited in this embodiment of the present invention.
如此,上述目标更新方式为上述脚本设置更新和上述比对数据库更新的情况下,可以获取预存脚本并按照预设顺序执行预设脚本和执行更新脚本,从而完成数据库更新,无需人工操作,降低人工操作时间和效率。In this way, when the above-mentioned target update method is the above-mentioned script setting update and the above-mentioned comparison database update, the pre-stored script can be obtained and the preset script and the update script can be executed according to the preset order, thereby completing the database update without manual operation and reducing labor costs. Operation time and efficiency.
可选地,在本申请实施例中,在上述执行顺序为:先执行上述更行脚本,再执行上述预设脚本的情况下,上述步骤C5中,本申请实施例提供的系统部署方法还包括如下步骤D1和步骤D2:Optionally, in the embodiment of the present application, in the case where the above-mentioned execution sequence is: the above-mentioned update script is executed first, and then the above-mentioned preset script is executed, in the above-mentioned step C5, the system deployment method provided by the embodiment of the present application further includes: Steps D1 and D2 are as follows:
步骤D1:执行上述更新脚本,将所述目标数据库的第一数据库格式更新为第二数据库格式。Step D1: Execute the above update script to update the first database format of the target database to the second database format.
步骤D2:执行上述预设脚本。Step D2: Execute the above preset script.
示例性地,上述第二数据库格式与上述源数据库中的数据格式相匹配。Exemplarily, the above-mentioned second database format matches the data format in the above-mentioned source database.
示例性地,如前述内容所述,使用比对数据库更新的方式进行数据库更新的原因通常为源数据库和目标数据库的关键格式内容不同,因此,需要比对数据库更新。Exemplarily, as described in the foregoing content, the reason for performing database update by comparing database updates is usually that the key format content of the source database and the target database are different, therefore, it is necessary to compare the database updates.
进一步地,一般的,当源数据库和目标数据库的关键格式内容不同的情况下,需要先进行比对数据库更新,即执行更新脚本,再进行脚本设置更新,即执行预设脚本。Further, generally, when the key format content of the source database and the target database is different, it is necessary to compare the database update first, that is, execute the update script, and then perform the script setting update, that is, execute the preset script.
可选地,在本申请实施例中,上述步骤201之前,本申请实施例提供的系统部署方法还包括如下步骤E1和步骤E2:Optionally, in the embodiment of the present application, before the
步骤E1:录入系统部署信息。Step E1: Enter system deployment information.
步骤E2:上传系统部署文件。Step E2: Upload the system deployment file.
示例性地,上述系统部署信息包括以下至少一项:邮件信息、数据库信息、部署点信息;上述邮件信息用于向系统部署人员发送系统部署内容,上述数据库信息用于设置上述源数据库的数据库信息和上述目标数据库的数据库信息;上述部署点信息用于设置系统部署对应的服务器信息。Exemplarily, the above-mentioned system deployment information includes at least one of the following: mail information, database information, and deployment point information; the above-mentioned mail information is used to send the system deployment content to the system deployer, and the above-mentioned database information is used to set the database information of the above-mentioned source database. and the database information of the above target database; the above deployment point information is used to set the server information corresponding to the system deployment.
示例性地,上述系统部署文件包括以下至少一项:上述预设脚本、上述版本文件。Exemplarily, the above-mentioned system deployment file includes at least one of the following: the above-mentioned preset script and the above-mentioned version file.
示例性地,上述系统部署人员为系统部署过程中需要通知的人员。Exemplarily, the above-mentioned system deployment personnel are personnel who need to be notified during the system deployment process.
进一步地,不同的部署点可以对应不同的系统部署人员,也可以对应相同的系统部署人员,本发明实施例对此不作限定。Further, different deployment points may correspond to different system deployment personnel, or may correspond to the same system deployment personnel, which is not limited in this embodiment of the present invention.
示例性地,上述系统部署内容包括本次系统部署的内容。Exemplarily, the above-mentioned system deployment content includes the content of this system deployment.
进一步地,不同的部署点之间可以对应不同的系统部署的内容。也即,邮件信息的内容可以不同。Further, different deployment points may correspond to different system deployment contents. That is, the content of the mail information may be different.
示例性地,上述邮件信息的发送时间可以为提前设置的,例如,设置为在系统部署的前一天发送,也可以不提前设置,实时发送。Exemplarily, the sending time of the above-mentioned email information may be set in advance, for example, set to be sent one day before the system is deployed, or may not be set in advance and sent in real time.
示例性地,在系统部署的预定时间内,还可以自动发送消息,提醒系统部署人员即将进行系统部署。Exemplarily, within a predetermined time of system deployment, a message may also be automatically sent to remind the system deployer that the system is about to be deployed.
示例性地,上述源数据库的数据库信息可以包括:源数据库所在服务器、源数据库类型、源数据库名称、端口、用户名和密码,测试源数据库和目标数据库连接的连接结果信息,例如,连接成功或者连接失败。类似的,目标数据库的数据库信息可以包括:目标数据库所在服务器、目标数据库类型、目标数据库名称、端口、用户名和密码,测试源数据库和目标数据库连接的连接结果信息,例如,连接成功或者连接失败。Exemplarily, the database information of the above-mentioned source database may include: the server where the source database is located, the type of the source database, the name of the source database, the port, the user name and the password, and the connection result information of the connection between the test source database and the target database, for example, the connection is successful or the connection is made. fail. Similarly, the database information of the target database may include: the server where the target database is located, the type of the target database, the name of the target database, the port, the user name and the password, and the connection result information of the connection between the test source database and the target database, for example, the connection succeeds or the connection fails.
示例性地,上述源数据库的数据库信息和目标数据库的数据库信息还可以包括目标数据库更新方式。Exemplarily, the above-mentioned database information of the source database and the database information of the target database may further include an update method of the target database.
示例性地,上述目标数据库可以为一个数据库,也可以包括多个数据库。Exemplarily, the above-mentioned target database may be one database, or may include multiple databases.
示例性地,上述服务器信息可以为多个服务器信息。Exemplarily, the above server information may be multiple server information.
进一步地,上述录入部署点信息的方式可以通过接收用户输入的方式完成。例如,在电子设备中显示所有服务器信息,电子设备可以通过接收用户的点击输入,录入接收到用户点击输入的服务器信息。上述被选择的服务器信息对应的服务器会进行数据库更新和系统代码更新。Further, the above-mentioned manner of entering deployment point information may be accomplished by receiving user input. For example, all server information is displayed in the electronic device, and the electronic device can enter the server information that has received the user's click input by receiving the user's click input. The server corresponding to the above selected server information will perform database update and system code update.
示例性地,上述预设脚本可以为一个,也可以为多个,本发明实施例对此不作限定。Exemplarily, the foregoing preset script may be one or multiple, which is not limited in this embodiment of the present invention.
进一步地,当预设脚本为多个的情况下,应当对设置多个预设脚本的执行顺序。Further, when there are multiple preset scripts, the execution order of the multiple preset scripts should be set.
示例性地,上述系统部署文件还应当包括更新脚本和预设脚本的执行先后顺序。Exemplarily, the above-mentioned system deployment file should also include the execution sequence of the update script and the preset script.
示例性地,上述版本文件为最新版本的代码包文件。Exemplarily, the above-mentioned version file is the latest version of the code package file.
进一步地,如果仅更新系统代码中的部分代码,则可以只上传需要更新的那部分版本文件。需要说明的是,若只上传需要更新的那部分版本文件,需要上传代码目录结构。Further, if only part of the code in the system code is updated, only the part of the version file that needs to be updated can be uploaded. It should be noted that, if only the part of the version file that needs to be updated is uploaded, the code directory structure needs to be uploaded.
如此,在系统自动完成系统部署之前,通过上述简单的预设置操作,即可在后续系统部署过程中无需人工操作,自动完成系统部署,节约人力和时间,提高系统部署的效率。In this way, before the system automatically completes the system deployment, through the above simple preset operation, the system deployment can be automatically completed without manual operation in the subsequent system deployment process, saving manpower and time, and improving the efficiency of system deployment.
可选地,在本申请实施例中,上述步骤202和步骤203中,本申请实施例提供的系统部署方法还包括如下步骤F:Optionally, in the embodiment of the present application, in the
步骤F:存储执行日志。Step F: Store the execution log.
示例性地,上述执行日志为用于记录上述数据库更新和上述部署系统代码的过程性文件。Exemplarily, the above-mentioned execution log is a procedural file for recording the above-mentioned database update and the above-mentioned deployment system code.
可以理解的是,在系统部署的过程中,数据库更新和部署系统代码的每一个步骤,均会自动记录该执行过程,以便于后续在系统部署异常时查询问题。It is understandable that, in the process of system deployment, each step of updating the database and deploying the system code will automatically record the execution process, so as to facilitate subsequent inquiry of problems when the system deployment is abnormal.
可选地,在本申请实施例中,上述步骤205中,本申请实施例提供的系统部署方法可以包括如下步骤G1和步骤G2:Optionally, in the embodiment of the present application, in the foregoing step 205, the system deployment method provided by the embodiment of the present application may include the following steps G1 and G2:
步骤G1:确定N个部署点中的目标部署点。Step G1: Determine a target deployment point among the N deployment points.
步骤G2:根据上述目标部署点的执行日志,重新对上述目标部署点进行系统部署。Step G2: According to the execution log of the above-mentioned target deployment point, system deployment is performed on the above-mentioned target deployment point again.
示例性地,上述目标部署点为系统部署异常的部署点。Exemplarily, the above-mentioned target deployment point is a deployment point where the system deployment is abnormal.
示例性地,在目标部署点的系统部署异常的情况下,该目标部署点可以自动反馈部署异常信息,从而确定该目标部署点。Exemplarily, when the system deployment of the target deployment point is abnormal, the target deployment point can automatically feed back deployment abnormality information, so as to determine the target deployment point.
示例性地,上述重新对上述目标部署点进行系统部属即为对该目标部署点重新执行上述步骤201至步骤204。Exemplarily, the above-mentioned re-deployment of the system to the above-mentioned target deployment point is to re-execute the above-mentioned
如此,在任一部署点出现系统部署异常的情况下,可以根据系统部署过程中的执行日志,及时排查问题,并对该异常部署点重新进行系统部署,提高系统部署的成功率。In this way, in the event of an abnormal system deployment at any deployment point, the problem can be checked in time according to the execution log during the system deployment process, and the system can be re-deployed at the abnormal deployment point to improve the success rate of the system deployment.
为解决上述技术问题,本发明实施例还提供系统部署装置。具体请参阅图2,图2为本实施系统部署装置基本结构示意图。To solve the above technical problem, an embodiment of the present invention further provides a system deployment apparatus. Please refer to FIG. 2 for details. FIG. 2 is a schematic diagram of the basic structure of the system deployment apparatus according to the present embodiment.
如图2所示,一种系统部署装置,包括:获取模块301,用于获取系统数据库的目标更新方式,上述目标更新方式包括以下至少一项:脚本设置更新和比对数据库更新;更新模块302,用于按照上述获取模块301获取的上述目标更新方式完成数据库更新;启动模块303,用于将预存的版本文件发送至N个部署点,启动目标操作,上述目标操作为:部署系统代码;启动模块303,还用于重新启动系统。As shown in FIG. 2 , a system deployment device includes: an
系统部署装置通过获取系统数据库的目标更新方式(上述目标更新方式包括以下至少一项:脚本设置更新和比对数据库更新),并按照目标更新方式完成数据库更新,并将系统中预存的版本文件发送至N个部署点,启动部署系统代码的目标操作,最终重新启动系统,完成自动进行系统部署。在上述过程中,在系统提前设置好数据库和版本文件的情况下,无需人工操作,系统可以自动完成系统部署的全过程,从而大幅度减少人力物力的消耗,节约系统部署的部署时间,提高系统部署效率。The system deployment device obtains the target update method of the system database (the above target update method includes at least one of the following: script setting update and comparison database update), and completes the database update according to the target update method, and sends the version file pre-stored in the system. To N deployment points, start the target operation of deploying the system code, and finally restart the system to complete the automatic system deployment. In the above process, when the database and version files are set in advance in the system, the system can automatically complete the whole process of system deployment without manual operation, thereby greatly reducing the consumption of human and material resources, saving the deployment time of system deployment, and improving the system Deployment efficiency.
在一些实施方式中,上述目标更新方式为上述脚本设置更新的情况下,执行模块,用于上传预设脚本,上述预设脚本用于运行上述数据库;执行模块,还用于执行上述预设脚本。In some embodiments, when the above-mentioned target update method is the above-mentioned script setting update, the execution module is used to upload a preset script, and the above-mentioned preset script is used to run the above-mentioned database; the execution module is also used to execute the above-mentioned preset script. .
在一些实施方式中,上述目标更新方式为上述比对数据库更新的情况下,比对模块,用于比对源数据库与目标数据库,确认上述源数据库与上述目标数据库的格式差异,上述源数据库为系统部署之前系统数据对应的数据库,上述目标数据库为系统部署完成后上述系统数据对应的数据库;生成模块,用于生成针对上述目标数据库的更新脚本;执行模块,用于执行更新脚本。In some embodiments, when the above-mentioned target update method is the above-mentioned comparison database update, the comparison module is used to compare the source database and the target database, and confirm the format difference between the above-mentioned source database and the above-mentioned target database, and the above-mentioned source database is The database corresponding to the system data before the system is deployed, the target database is the database corresponding to the system data after the system deployment is completed; the generation module is used to generate an update script for the above target database; the execution module is used to execute the update script.
在一些实施方式中,上述目标更新方式为上述脚本设置更新和上述比对数据库更新的情况下,执行模块,用于上传预设脚本,上述预设脚本用于运行上述数据库;连接模块,用于在接收到上述比对数据库的指令的情况下,则连接源数据库与目标数据库,上述源数据库为系统部署之前系统数据对应的数据库,上述目标数据库为系统部署完成后上述系统数据对应的数据库;比对模块,用于比对源数据库与目标数据库,确认上述源数据库与上述目标数据库的格式差异,生成针对上述目标数据库的更新脚本;确认模块,用于确认上述预设脚本和上述更新脚本的执行顺序,上述执行顺序为提前系统预设的;执行模块,还用于按照上述执行顺序,依次执行上述预设脚本和上述更新脚本。In some embodiments, the above-mentioned target update method is that in the case of the above-mentioned script setting update and the above-mentioned comparison database update, the execution module is used for uploading a preset script, and the above-mentioned preset script is used for running the above-mentioned database; the connection module is used for In the case of receiving the above-mentioned instruction to compare the database, then connect the source database and the target database, the above-mentioned source database is the database corresponding to the system data before the system is deployed, and the above-mentioned target database is the database corresponding to the above-mentioned system data after the system deployment is completed; The pairing module is used for comparing the source database and the target database, confirming the format difference between the above-mentioned source database and the above-mentioned target database, and generating an update script for the above-mentioned target database; the confirmation module is used for confirming the execution of the above-mentioned preset script and the above-mentioned update script The above-mentioned execution order is preset by the system in advance; the execution module is further configured to execute the above-mentioned preset script and the above-mentioned update script in sequence according to the above-mentioned execution order.
在一些实施方式中,在上述执行顺序为:先执行上述更新脚本,再执行上述预设脚本的情况下,执行模块,用于执行上述更新脚本,将上述目标数据库的第一数据库格式更新为第二数据库格式,上述第二数据库格式与上述源数据库中的数据格式相匹配;执行模块,还用于执行上述预设脚本。In some embodiments, when the above-mentioned execution sequence is: firstly execute the above-mentioned update script, and then execute the above-mentioned preset script, the execution module is configured to execute the above-mentioned update script, and update the first database format of the above-mentioned target database to the first Second database format, the second database format matches the data format in the source database; the execution module is further configured to execute the preset script.
在一些实施方式中,录入模块,用于录入系统部署信息,上述系统部署信息包括以下至少一项:邮件信息、数据库信息、部署点信息;上述邮件信息用于向系统部署人员发送系统部署内容,上述数据库信息用于设置上述源数据库的数据库信息和上述目标数据库的数据库信息;上述部署点信息用于设置系统部署对应的服务器信息;上传模块,还用于上传系统部署文件;上述系统部署文件包括以下至少一项:上述预设脚本、上述版本文件。In some embodiments, the input module is used to input system deployment information, and the system deployment information includes at least one of the following: email information, database information, and deployment point information; the email information is used to send the system deployment content to the system deployer, The above-mentioned database information is used to set the database information of the above-mentioned source database and the database information of the above-mentioned target database; the above-mentioned deployment point information is used to set the server information corresponding to the system deployment; the upload module is also used to upload the system deployment file; the above-mentioned system deployment file includes At least one of the following: the above preset script, the above version file.
在一些实施方式中,上述系统部署装置还包括:存储模块,用于存储执行日志,上述执行日志为用于记录上述数据库更新和上述部署系统代码的过程性文件。In some embodiments, the system deployment apparatus further includes: a storage module configured to store an execution log, where the execution log is a procedural file for recording the database update and the deployment system code.
一些实施例中,上述系统部署装置还包括:确定模块,用于确定N个部署点中的目标部署点,上述目标部署点为系统部署异常的部署点;执行模块,用于根据上述目标部署点的执行日志,重新对上述目标部署点进行系统部署。In some embodiments, the above-mentioned system deployment apparatus further includes: a determination module for determining a target deployment point among the N deployment points, where the above-mentioned target deployment point is a deployment point with abnormal system deployment; an execution module for determining the target deployment point according to the above-mentioned target deployment point. , and redeploy the system to the above target deployment point.
为解决上述技术问题,本发明实施例还提供计算机设备。具体请参阅图3,图3为本实施例计算机设备基本结构框图。To solve the above technical problems, the embodiments of the present invention further provide computer equipment. For details, please refer to FIG. 3 , which is a block diagram of a basic structure of a computer device according to this embodiment.
如图3所示,计算机设备的内部结构示意图。该计算机设备包括通过系统总线连接的处理器、非易失性存储介质、存储器和网络接口。其中,该计算机设备的非易失性存储介质存储有操作系统、数据库和计算机可读指令,数据库中可存储有控件信息序列,该计算机可读指令被处理器执行时,可使得处理器实现一种数据关系重构方法。该计算机设备的处理器用于提供计算和控制能力,支撑整个计算机设备的运行。该计算机设备的存储器中可存储有计算机可读指令,该计算机可读指令被处理器执行时,可使得处理器执行一种数据关系重构方法。该计算机设备的网络接口用于与终端连接通信。本领域技术人员可以理解,图3中示出的结构,仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。As shown in Figure 3, a schematic diagram of the internal structure of the computer equipment. The computer device includes a processor, non-volatile storage medium, memory, and a network interface connected by a system bus. Wherein, the non-volatile storage medium of the computer device stores an operating system, a database and computer-readable instructions, and the database may store a sequence of control information. When the computer-readable instructions are executed by the processor, the processor can realize a A data relationship reconstruction method. The processor of the computer device is used to provide computing and control capabilities and support the operation of the entire computer device. Computer-readable instructions may be stored in the memory of the computer device, and when executed by the processor, the computer-readable instructions may cause the processor to perform a data relationship reconstruction method. The network interface of the computer equipment is used for communication with the terminal connection. Those skilled in the art can understand that the structure shown in FIG. 3 is only a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer equipment to which the solution of the present application is applied. Include more or fewer components than shown in the figures, or combine certain components, or have a different arrangement of components.
本实施方式中处理器用于执行图2中获取模块301、更新模块302和启动模块303的具体功能,存储器存储有执行上述模块所需的程序代码和各类数据。网络接口用于向用户终端或服务器之间的数据传输。本实施方式中的存储器存储有数据关系重构装置中执行所有子模块所需的程序代码及数据,服务器能够调用服务器的程序代码及数据执行所有子模块的功能。In this embodiment, the processor is used to execute the specific functions of the
本发明还提供一种存储有计算机可读指令的存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行上述任一实施例系统部署方法的步骤。The present invention also provides a storage medium storing computer-readable instructions, and when the computer-readable instructions are executed by one or more processors, the one or more processors perform the steps of the system deployment method in any of the foregoing embodiments.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,该计算机程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,前述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)等非易失性存储介质,或随机存储记忆体(Random Access Memory,RAM)等。Those of ordinary skill in the art can understand that the realization of all or part of the processes in the methods of the above embodiments can be accomplished by instructing relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and the program is During execution, it may include the processes of the embodiments of the above-mentioned methods. The aforementioned storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM), or a random access memory (Random Access Memory, RAM).
本技术领域技术人员可以理解,本申请中已经讨论过的各种操作、方法、流程中的步骤、措施、方案可以被交替、更改、组合或删除。进一步地,具有本申请中已经讨论过的各种操作、方法、流程中的其他步骤、措施、方案也可以被交替、更改、重排、分解、组合或删除。进一步地,现有技术中的具有与本申请中公开的各种操作、方法、流程中的步骤、措施、方案也可以被交替、更改、重排、分解、组合或删除。Those skilled in the art can understand that various operations, methods, steps, measures, and solutions in the process discussed in this application may be alternated, modified, combined or deleted. Further, other steps, measures, and solutions in the various operations, methods, and processes that have been discussed in this application may also be alternated, modified, rearranged, decomposed, combined, or deleted. Further, steps, measures and solutions in the prior art with various operations, methods, and processes disclosed in this application may also be alternated, modified, rearranged, decomposed, combined or deleted.
以上所述仅是本申请的部分实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本申请的保护范围。The above are only part of the embodiments of the present application. It should be pointed out that for those skilled in the art, without departing from the principles of the present application, several improvements and modifications can also be made. It should be regarded as the protection scope of this application.
Claims (11)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210180725.8A CN114510493A (en) | 2022-02-25 | 2022-02-25 | System deployment method, apparatus, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210180725.8A CN114510493A (en) | 2022-02-25 | 2022-02-25 | System deployment method, apparatus, computer equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114510493A true CN114510493A (en) | 2022-05-17 |
Family
ID=81554183
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210180725.8A Pending CN114510493A (en) | 2022-02-25 | 2022-02-25 | System deployment method, apparatus, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114510493A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115756553A (en) * | 2023-01-09 | 2023-03-07 | 傲网信息科技(厦门)有限公司 | Software server updating method |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106991104A (en) * | 2016-01-21 | 2017-07-28 | 泰康保险集团股份有限公司 | Database script deployment device and database script deployment method |
CN107832107A (en) * | 2017-11-24 | 2018-03-23 | 泰康保险集团股份有限公司 | System deployment method, device, electronic device and storage medium |
CN109032611A (en) * | 2018-06-06 | 2018-12-18 | 平安科技(深圳)有限公司 | Script dispositions method, device, computer equipment and storage medium |
-
2022
- 2022-02-25 CN CN202210180725.8A patent/CN114510493A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106991104A (en) * | 2016-01-21 | 2017-07-28 | 泰康保险集团股份有限公司 | Database script deployment device and database script deployment method |
CN107832107A (en) * | 2017-11-24 | 2018-03-23 | 泰康保险集团股份有限公司 | System deployment method, device, electronic device and storage medium |
CN109032611A (en) * | 2018-06-06 | 2018-12-18 | 平安科技(深圳)有限公司 | Script dispositions method, device, computer equipment and storage medium |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115756553A (en) * | 2023-01-09 | 2023-03-07 | 傲网信息科技(厦门)有限公司 | Software server updating method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110569130B (en) | A method, apparatus and device for cross-process communication | |
US11245758B2 (en) | System and method for automatic cloud-based full-data restore to mobile devices | |
US7716661B2 (en) | Embedded device update service | |
US20020087668A1 (en) | Automatic upgrade of live network devices | |
CN114024951B (en) | Cloud edge collaboration-based power edge heterogeneous deployment method | |
US9910733B2 (en) | Transaction completion in a synchronous replication environment | |
CN107291481B (en) | Component updating method, device and system | |
CN106557347B (en) | Software updating method and device | |
CN111752577B (en) | Upgrading method and equipment for system version | |
JP4982139B2 (en) | Relay server and information providing system | |
CN114996337A (en) | Multi-cluster database management system and method | |
CN114079615A (en) | Application synchronization method, system, medium and electronic device in multi-cluster environment | |
CN118673078A (en) | A method for synchronizing a logical replication slot and a related device | |
CN113821249A (en) | Method, apparatus, electronic device and readable storage medium for project development configuration | |
CN114510493A (en) | System deployment method, apparatus, computer equipment and storage medium | |
CN119166135A (en) | Method, device and computer equipment for reusing code components in low-code platform | |
CN116149713B (en) | Program upgrading method and device for all-level equipment under tree-type heterogeneous network | |
CN109325057B (en) | Middleware management method, device, computer equipment and storage medium | |
CN112130889A (en) | Resource management method and device, storage medium and electronic device | |
CN116360823A (en) | Method and device for updating application program in cloud mobile phone | |
CN117112690A (en) | Data synchronization method of distributed cluster and related equipment thereof | |
CN113761075B (en) | Method, device, apparatus and computer-readable medium for switching database | |
CN116048609A (en) | Configuration file updating method, device, computer equipment and storage medium | |
CN114579171A (en) | Code processing method and device, computer equipment and storage medium | |
CN113515305A (en) | Configuration information determining method, configuration snapshot generating method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20220517 |