Hot deployment optimization method and device, electronic equipment and computer readable storage medium
By analyzing the front-end web page update request during the hot deployment process, determining the target network additional storage directory and performing online hot updates, the problem of excessive input/output consumption caused by frequent scanning in the existing technology is solved, and the stability of the application system is achieved and reduce risks.
Patent Information
- Application Number
- CN202411267439.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-10
- Publication Date
- 2024-12-31
AI Technical Summary
During the update process, existing hot deployment technology will frequently scan the application deployment directory, resulting in excessive input/output consumption of the application server and affecting system stability.
By obtaining front-end web page update requests, analyzing update requirements, determining the target network additional storage directory, and loading update files in this directory for online hot updates, avoiding repeated scanning of the application directory of the application server.
It saves the input/output consumption of the application server, reduces application risks, and ensures the stability of the application system.
Smart Images

Figure CN119226649A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of data processing. The embodiments are applicable to but not limited to the field of financial technology, and in particular, relate to a hot deployment optimization method, device, electronic device and computer-readable storage medium. Background Art
[0002] With the rapid development of insurance business, agile development is becoming more and more popular, and the speed of updating and iterating financial insurance system versions is accelerating. In the daily operation and maintenance of financial insurance business systems, sometimes some front-end pages do not meet user expectations due to outdated versions, and users are eager to use new functions, but there is no release window during production time. At this time, the web page hot deployment function can be used to update the front-end page online. Through the network attached storage hot deployment solution, the potential risks of financial business can be greatly reduced, the application continuity of application systems in the financial field can be met, and the system stability can be guaranteed.
[0003] The principle of so-called hot deployment mainly involves the class loading mechanism of the Java virtual machine. In Java, classes are loaded dynamically at runtime rather than statically at compile time. This means that classes can be dynamically added, modified, or deleted while the application is running. That is, hot deployment is a deployment method that can update application functions online without restarting the application service. Most existing web server applications provide similar functions. When the web server runs in debug mode, the web server can implement hot deployment. However, the existing technology also has a shortcoming, that is, during the update process, the web server will keep scanning the application deployment directory. This scan will cause huge input / output consumption of the application server, and ultimately affect the stability of the application. Summary of the invention
[0004] The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.
[0005] In order to solve the problems mentioned in the above background technology, the embodiments of the present application provide a hot deployment optimization method, device, electronic device and computer-readable storage medium. During the hot deployment process, the application deployment directory will not be scanned continuously as usual, which saves the input / output consumption of the application server, reduces the application risk, and ensures the stability of the application system.
[0006] In a first aspect, an embodiment of the present application provides a hot deployment optimization method, which is applied to an application server, the application server is connected to an application host, and a plurality of network attached storage directories are set on the application host, the method comprising:
[0007] Get the front-end web page update request;
[0008] Analyze the front-end web page update request to obtain web page function update requirements;
[0009] According to the webpage function update requirement, determining a target network attached storage directory from the plurality of network attached storage directories of the application host;
[0010] Scanning the target network attached storage directory according to the webpage function update requirement;
[0011] In the case that the update file exists in the target network attached storage directory, the update file is loaded and instantiated based on a preset user class loader to perform online hot update processing on the functions of the front-end web page.
[0012] According to some embodiments of the present application, analyzing the front-end webpage update request to obtain the webpage function update requirement includes:
[0013] Extracting the tag bit of the front-end web page update request to obtain a target tag;
[0014] The target tag is matched with a preset function tag database to obtain the webpage function update requirement.
[0015] According to some embodiments of the present application, each of the network attached storage directories corresponds to a file type, and determining the target network attached storage directory from the plurality of network attached storage directories of the application host according to the webpage function update requirement includes:
[0016] Determine function update file type information according to the webpage function update requirement;
[0017] Matching the function update file type information with the file type corresponding to each of the network attached storage directories in the application host to obtain the target network attached storage directory;
[0018] The file type of the target network attached storage directory is consistent with the function update file type information.
[0019] According to some embodiments of the present application, scanning the target network attached storage directory according to the webpage function update requirement includes:
[0020] Determine webpage function update file information according to the webpage function update requirement;
[0021] The target network attached storage directory is scanned according to the webpage function update file information.
[0022] According to some embodiments of the present application, after scanning the target network attached storage directory according to the webpage function update requirement, the method further includes:
[0023] In the case that no update file exists in the target network attached storage directory, an online hot update process is performed on the functions of the front-end webpage based on preset system code program information.
[0024] According to some embodiments of the present application, when there is an update file in the target network attached storage directory, after loading and instantiating the update file based on a preset user class loader to perform online hot update processing on the function of the front-end webpage, the method further includes:
[0025] After completing the online hot update process for the function of the front-end webpage, performing a self-check process on the function of the front-end webpage to obtain a self-check result;
[0026] When the self-check result indicates that the function of the front-end webpage meets the preset functional requirements, hot update success indication information is fed back to the preset user monitoring terminal.
[0027] According to some embodiments of the present application, after performing self-check processing on the function of the front-end webpage and obtaining the self-check result, the method further includes:
[0028] When the self-check result indicates that the function of the front-end webpage does not meet the preset functional requirements, the update file is reloaded and instantiated based on the user class loader, and the function of the front-end webpage is hot-updated online using the instantiated update file.
[0029] In a second aspect, an embodiment of the present application further provides a hot deployment optimization device, wherein the hot deployment optimization device is arranged on an application server, the application server is connected to an application host, and a plurality of network attached storage directories are arranged on the application host, and the device comprises:
[0030] The first processing module is used to obtain a front-end web page update request;
[0031] The second processing module is used to analyze the front-end web page update request to obtain the web page function update requirement;
[0032] A third processing module, configured to determine a target network attached storage directory from the plurality of network attached storage directories of the application host according to the webpage function update requirement;
[0033] A fourth processing module, configured to scan the target network attached storage directory according to the webpage function update requirement;
[0034] The fifth processing module is used to load and instantiate the update file based on a preset user class loader when there is an update file in the target network attached storage directory, so as to perform online hot update processing on the functions of the front-end web page.
[0035] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the hot deployment optimization method as described in the first aspect above is implemented.
[0036] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute the hot deployment optimization method described in the first aspect above.
[0037] According to the hot deployment optimization method of the embodiment provided by the present application, there are at least the following beneficial effects: in the process of hot deployment optimization, firstly, a front-end web page update request is obtained, and then the front-end web page update request is analyzed to obtain the web page function update requirement; then, according to the web page function update requirement, a target network attached storage directory is determined from multiple network attached storage directories of the application host; then, according to the web page function update requirement, the target network attached storage directory is scanned; finally, when there is an update file in the target network attached storage directory, the update file is loaded and instantiated based on a preset user class loader to perform online hot update processing on the function of the front-end web page; through the above technical solution, in the process of hot deployment and update of the front-end web page, there is no need to repeatedly scan the application directory of the application server as in the past, and only the target network attached storage directory in the application host needs to be scanned, which saves the input / output consumption of the application server, reduces the application risk, and ensures the stability of the application system. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The accompanying drawings are used to provide further understanding of the technical solution of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the technical solution of the present application and do not constitute a limitation on the technical solution of the present application.
[0039] Figure 1 is a flow chart of a hot deployment optimization method provided by an embodiment of the present application;
[0040] Figure 2 is a specific flow chart of step S200 provided in one embodiment of the present application;
[0041] Figure 3 is a specific flow chart of step S300 provided in one embodiment of the present application;
[0042] Figure 4is a specific flow chart of step S400 provided in one embodiment of the present application;
[0043] Figure 5 It is a flow chart of online hot updating of the functions of the front-end webpage based on system code program information provided by an embodiment of the present application;
[0044] Figure 6 This is a flow chart of a self-check process for the functions of a front-end web page provided by an embodiment of the present application;
[0045] Figure 7 It is a flow chart of repeatedly performing online hot update of the functions of the front-end webpage based on the update file provided by an embodiment of the present application;
[0046] Figure 8 is a schematic diagram of a thermal deployment optimization device provided by an embodiment of the present application;
[0047] Fig. 9 It is a schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0048] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0049] It should be noted that although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification and claims and the above drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0050] It should be noted that, unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0051] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0052] AI is a new technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence. Artificial intelligence is a branch of computer science. Artificial intelligence attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Research in this field includes robots, language recognition, image recognition, natural language processing and expert systems. Artificial intelligence can simulate the information process of human consciousness and thinking. Artificial intelligence is also a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0053] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0054] Artificial intelligence is AI. AI is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0055] The servers involved in artificial intelligence technology can be independent servers or cloud servers that provide basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), as well as big data and artificial intelligence platforms.
[0056] The present application provides a hot deployment optimization method, device, electronic device and computer-readable storage medium. In the process of hot deployment optimization, firstly, a front-end web page update request is obtained, then the front-end web page update request is analyzed to obtain the web page function update requirement; then, according to the web page function update requirement, a target network attached storage directory is determined from multiple network attached storage directories of an application host; then, according to the web page function update requirement, the target network attached storage directory is scanned; finally, if there is an update file in the target network attached storage directory, the update file is loaded and instantiated based on a preset user class loader to perform online hot update processing on the function of the front-end web page; through the above technical solution, in the process of hot deployment and updating of the front-end web page, it is not necessary to repeatedly scan the application directory of the application server as in the past, and only the target network attached storage directory in the application host needs to be scanned, which saves the input / output consumption of the application server, reduces the application risk, and ensures the stability of the application system.
[0057] The hot deployment optimization method provided in the embodiment of the present application relates to the field of financial technology technology. The hot deployment optimization method provided in the embodiment of the present application can be applied to the terminal, can also be applied to the server side, and can also be software running in the terminal or the server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or it can be configured as a server cluster or distributed system composed of multiple physical servers, and can also be configured as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the hot deployment optimization method, etc., but is not limited to the above forms.
[0058] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0059] It should be noted that in each specific implementation of the present application, when it comes to the need to perform relevant processing based on data related to user identity or characteristics such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of these data will comply with relevant laws, regulations, and standards. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the normal operation of the embodiment of the present application will be obtained.
[0060] The embodiments of the present application are further described below in conjunction with the accompanying drawings.
[0061] like Figure 1 As shown, Figure 1 It is a flow chart of a hot deployment optimization method provided by an embodiment of the present application. The hot deployment optimization method is applied to an application server. The application server is connected to an application host. A plurality of network attached storage directories are arranged on the application host. The hot deployment optimization method includes but is not limited to steps S100 to S500.
[0062] Step S100, obtaining a front-end web page update request;
[0063] Step S200, analyzing the front-end web page update request to obtain the web page function update requirement;
[0064] Step S300, determining a target network attached storage directory from multiple network attached storage directories of the application host according to the webpage function update requirement;
[0065] Step S400, scanning the target network attached storage directory according to the webpage function update requirement;
[0066] Step S500, when there is an update file in the target network attached storage directory, the update file is loaded and instantiated based on a preset user class loader to perform online hot update processing on the functions of the front-end web page.
[0067] It should be noted that, in the process of hot deployment optimization, the front-end web page update request is first obtained, and then the front-end web page update request is analyzed to obtain the web page function update requirement; then, according to the web page function update requirement, the target network attached storage directory is determined from multiple network attached storage directories of the application host; then, according to the web page function update requirement, the target network attached storage directory is scanned; finally, if there is an update file in the target network attached storage directory, the update file is loaded and instantiated based on the preset user class loader to perform online hot update processing on the function of the front-end web page; through the above technical solution, in the process of hot deployment and update of the front-end web page, there is no need to repeatedly scan the application directory of the application server as in the past, and only the target network attached storage directory in the application host needs to be scanned, which saves the input / output consumption of the application server, reduces the application risk, and ensures the stability of the application system.
[0068] It is worth noting that application servers usually run on specific hardware devices to provide the services and functions required by the application. Application servers can run on many types of devices, including but not limited to: physical servers: traditional server hardware, which can be tower servers, rack servers or blade servers; virtual servers: in a virtualized environment, application servers can run on virtual machines, which can be deployed on physical servers; cloud servers: application servers can also be deployed on cloud platforms; containerized environments: modern application servers may run in containers, and they can run on any hardware that supports container technology; edge computing devices: in some cases, application servers may be deployed on edge computing devices, which are close to data sources and can provide low-latency services. In addition, the application host in the embodiment of the present application can be a computer system that provides various services and resources to other computers (called clients); servers can be physical devices or virtual devices.
[0069] It is worth noting that Network Attached Storage (NAS) is a storage device connected to a network that allows multiple users and devices in the network to access, store, and share data. NAS directory refers to the folder structure on the NAS device used to organize and classify stored data. The organization of NAS directories can be very flexible and usually depends on the needs of the user. NAS devices are usually equipped with an easy-to-use management interface that allows users to create, modify, and delete directories as needed. In addition, NAS also supports setting permissions and access control to ensure data security and compliance.
[0070] It is worth noting that the front-end web page update request can be for the user in the process of running the application system, some functions of the application system are found to have defects and vulnerabilities, so the front-end web page update request can be generated on the application system. In the process of obtaining the front-end web page update request, the subsequent application server will first obtain the user's permission or consent, and the collection, use and processing of these data will comply with relevant laws, regulations and standards. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or separate consent will be obtained by means of a pop-up window or jump to a confirmation page, etc. After clearly obtaining the user's separate permission or separate consent, the necessary user-related data for enabling the normal operation of the embodiment of the present application is obtained. Exemplarily, in the daily operation and maintenance process of the financial insurance business system, sometimes some front-end pages are encountered because the version does not meet the user's expectations, and the user is eager to use the new function, but there is no window for the production time to be released. At this time, a front-end web page update request can be generated to use the function of hot deployment of the web page to update the front-end page online.
[0071] It is worth noting that the web page function update requirement can be obtained by analyzing the front-end web page update request; subsequently, the target network attached storage directory can be determined from multiple network attached storage directories of the application host according to the web page function update requirement; then, the target network attached storage directory can be scanned according to the web page function update requirement; and when there is an update file in the target network attached storage directory, the update file can be recorded and instantiated based on the preset user class loader, so that the function of the front-end web page can be processed with online hot update; through the above technical solution, the network attached storage directory is first set on the application host, and subsequently only the network attached storage directory on the application host needs to be scanned, which avoids frequent scanning of the application directory of the application server, effectively prevents input / output consumption, and makes the application system more stable.
[0072] In some embodiments, Figure 2 As shown, the above step S200 may include but is not limited to steps S210 to S220.
[0073] Step S210, extracting the tag bit of the front-end web page update request to obtain a target tag;
[0074] Step S220, matching the target tag with a preset function tag database to obtain the webpage function update requirement.
[0075] It should be noted that, in the process of analyzing and processing the front-end web page update request, the tag bit of the front-end web page update request is first extracted to determine the target tag; then the target tag is matched with the pre-set function tag database to determine the web page function update requirement. Subsequently, the target network attached storage directory can be determined from multiple network attached storage directories of the application host according to the web page function update requirement, so as to prepare for the subsequent online hot deployment.
[0076] It should be noted that the function tag database includes multiple tags, and each tag corresponds to a function update information. Therefore, the target tag can be obtained by extracting the tag bit of the front-end web page update request, and then the target tag is matched with each tag in the function tag database, and the function update information corresponding to the matched tag is used as the web page function update requirement.
[0077] In some embodiments, Figure 3 As shown, each network attached storage directory corresponds to a file type, and the above step S300 may also include but is not limited to step S310 and step S320.
[0078] Step S310, determining function update file type information according to webpage function update requirements;
[0079] Step S320: Match the function update file type information with the file type corresponding to each network attached storage directory in the application host to obtain the target network attached storage directory.
[0080] It should be noted that, in the process of determining the target network attached storage directory from multiple network attached storage directories of the application host according to the webpage function update requirement, the function update file type information is first determined according to the webpage function update requirement; then the function update file type information is matched with the file type corresponding to each network attached storage directory in the application host, and the target network attached storage directory can be obtained; wherein the file type of the target network attached storage directory is consistent with the function update file type information. After the target network attached storage directory is determined to be obtained, the target network attached storage directory can be scanned and processed according to the webpage function update requirement.
[0081] It is worth noting that each network attached storage directory in the application host corresponds to a file type. Therefore, by matching the function update file type information with the file type corresponding to each network attached storage directory in the application host, the target network attached storage directory can be obtained, and the target network attached storage directory can be scanned and processed subsequently.
[0082] In some embodiments, Figure 4 As shown, the above step S400 may also include but is not limited to steps S410 to S420.
[0083] Step S410, determining webpage function update file information according to webpage function update requirements;
[0084] Step S420: Scan the target network attached storage directory according to the webpage function update file information.
[0085] It should be noted that, in the process of scanning and processing the target network additional storage directory according to the web page function update requirements, the web page function update file information is first determined according to the web page function update requirements; then the target network additional storage directory is scanned and processed according to the web page function update file information to determine whether there is an update file in the target network additional storage directory; through the above technical solution, the determination of the update file can be more accurate.
[0086] It is worth noting that after determining the web page function update file information according to the web page function update requirements, the target network attached storage directory can be scanned and processed according to the web page function update file information; in the embodiment of the present application, only the target network attached storage directory in the application host is scanned and processed to determine the update file. There is no need to frequently scan the application directory of the application server as in the past, which can greatly save input / output consumption and make the application server run more stably.
[0087] In some embodiments, Figure 5 As shown, after executing the above step S400, it may also include but not limited to step S430.
[0088] Step S430: When no update file exists in the target network attached storage directory, an online hot update process is performed on the functions of the front-end web page based on the preset system code program information.
[0089] It should be noted that after scanning the target network attached storage directory according to the web page function update requirements, if there is no update file in the target network attached storage directory, the function of the front-end web page can be hot-updated online based on the preset system code program information. Even if there is no update file in the target network attached storage directory, the function of the front-end web page can be hot-updated online through the preset system code program information to better complete the hot update deployment of the front-end web page.
[0090] It is worth noting that in some embodiments of the present application, in the financial industry, during the process of online hot deployment of the functions of the front-end pages of the financial industry, not only can the update files in the target network attached storage directory be used for hot update processing, but the functions of the front-end web pages of the financial industry can also be updated online through system code program information.
[0091] In some embodiments, Figure 6 As shown, after executing the above step S500, it may also include but not limited to step S610 and step S620.
[0092] Step S610, after completing the online hot update process for the function of the front-end webpage, performing a self-check process on the function of the front-end webpage to obtain a self-check result;
[0093] Step S620: When the self-check result indicates that the function of the front-end webpage meets the preset functional requirements, hot update success indication information is fed back to the preset user monitoring terminal.
[0094] It should be noted that, when there is an update file in the target network attached storage directory, the update file is loaded and instantiated based on the preset user class loader to perform online hot update processing on the functions of the front-end web page, and it is also necessary to perform self-inspection processing on the functions of the front-end web page to obtain self-inspection results; when the self-inspection results indicate that the functions of the front-end web page meet the preset functional requirements, hot update success indication information will be fed back to the preset user monitoring terminal; through the above technical solution, after the online hot deployment update of the functions of the front-end web page is completed, the functions of the front-end web page after the update are self-inspected, and when the self-inspection is successful, the hot update success indication information will be fed back to the preset user monitoring terminal, so that the hot update deployment can be more reliable.
[0095] For example, after the insurance inquiry webpage is hot-updated online, the related functions of the insurance inquiry webpage will also be self-checked. When the self-check results indicate that the functions of the insurance inquiry webpage meet the pre-set functional requirements, a hot-update success indication information will be fed back to the mobile phone of the system maintenance personnel.
[0096] In some embodiments, Figure 7 As shown, after executing the above step S610, it may also include but not limited to step S611.
[0097] Step S611, when the self-check result indicates that the function of the front-end webpage does not meet the preset function requirements, the update file is reloaded and instantiated based on the user class loader, and the function of the front-end webpage is online hot updated using the instantiated update file.
[0098] It should be noted that after the self-checking process is performed on the functions of the front-end webpage to obtain the self-checking result, if the self-checking result indicates that the functions of the front-end webpage fail to meet the preset functional requirements, it is necessary to reload and instantiate the update file based on the user class loader; through the above technical solution, when it is detected that the hot update deployment is not successful, the update file can be reloaded and instantiated based on the user class loader, and the functions of the front-end webpage can be re-processed for online hot update using the instantiated update file to better complete the hot update operation of the front-end webpage. In addition, a threshold value for the number of times the update file is reused to perform online hot update on the front-end webpage can be set. When the number of times the new file is reused to perform online hot update on the front-end webpage is greater than the threshold value, the hot update failure information will be fed back to the preset user monitoring terminal to inform the system maintenance personnel that another method is needed to perform online update on the functions of the front-end webpage.
[0099] In order to more clearly illustrate the hot deployment optimization method of the embodiment of the present application, it is explained below through a specific embodiment.
[0100] Apply for an application host A independently, with minimal configuration, to mount the network attached storage volume, mount the prepared network attached storage disk to the host server, and authorize the read and write permissions of the network attached storage to the application server B;
[0101] On application server B, a storage block is created based on the network attached storage volume to prepare for subsequent application services to read the files to be updated; in this way, when the update file is uploaded on application host A, application server B can read the file;
[0102] Plan the application host A and application server B in advance, and make a unified agreement on the file upload directory. Different file uploads correspond to the following file directories:
[0103] For js files, you can create the following file directory on application host A;
[0104] For jsp files, you can create the following file directory on application host A;
[0105] When the front-end web page functions are abnormal, the update file is uploaded to the network attached storage directory corresponding to the application host A through the page. At this time, when the application server B starts and loads the class file, it will scan the file directory agreed upon by the class in advance. If there is a file in the file directory, the class file is loaded and instantiated through the user class loader, and the latest code is updated to realize the online hot update of the function; if there is no file in the file directory, the loader loads the file of the program itself. In short, hot deployment is to read the files under the hot deployment directory path first, read and update if there is one, and use the system's own code program if there is none.
[0106] Through the optimized hot deployment solution, application server B does not need to scan the files in its own server directory in real time, but only needs to read the files in the network attached storage directory of application host A, which reduces the application input / output consumption and ensures application stability.
[0107] By reading and updating files based on network attached storage, not only the needs of financial business system users are met, but also the application server is prevented from frequently scanning its own service directory, which increases the input / output consumption of application services, reduces application risks, and ensures system stability.
[0108] This solution adds, updates, and deletes files on the server mounted with the network attached storage volume. The application host reads the files in the application host directory mounted with the network attached storage in a shared manner. There is no need to perform high-risk operations such as adding, deleting, and modifying the directory of the application server. This avoids the unavailability of business application services due to misoperation and greatly reduces the risk of operating the application server.
[0109] In addition, if Figure 8 As shown, an embodiment of the present application further provides a hot deployment optimization device 10, which is arranged on an application server, the application server is connected to an application host, and a plurality of network attached storage directories are arranged on the application host. The device includes
[0110] The first processing module 100 is used to obtain a front-end web page update request;
[0111] The second processing module 200 is used to analyze the front-end web page update request to obtain the web page function update requirement;
[0112] The third processing module 300 is used to determine a target network attached storage directory from multiple network attached storage directories of the application host according to the webpage function update requirement;
[0113] The fourth processing module 400 is used to scan the target network attached storage directory according to the webpage function update requirement;
[0114] The fifth processing module 500 is used to load and instantiate the update file based on a preset user class loader when the update file exists in the target network attached storage directory, so as to perform online hot update processing on the functions of the front-end web page.
[0115] It should be noted that, in the process of hot deployment optimization, the front-end web page update request is first obtained, and then the front-end web page update request is analyzed to obtain the web page function update requirement; then, according to the web page function update requirement, the target network attached storage directory is determined from multiple network attached storage directories of the application host; then, according to the web page function update requirement, the target network attached storage directory is scanned; finally, if there is an update file in the target network attached storage directory, the update file is loaded and instantiated based on the preset user class loader to perform online hot update processing on the function of the front-end web page; through the above technical solution, in the process of hot deployment and update of the front-end web page, there is no need to repeatedly scan the application directory of the application server as in the past, and only the target network attached storage directory in the application host needs to be scanned, which saves the input / output consumption of the application server, reduces the application risk, and ensures the stability of the application system.
[0116] The specific implementation of the hot deployment optimization device 10 is basically the same as the specific implementation of the above-mentioned hot deployment optimization method, and will not be repeated here.
[0117] In addition, if Fig. 9 As shown, an embodiment of the present application further provides an electronic device 700 , which includes: a memory 720 , a processor 710 , and a computer program stored in the memory 720 and executable on the processor 710 .
[0118] The processor 710 and the memory 720 may be connected via a bus or in other ways.
[0119] The non-transient software programs and instructions required to implement the hot deployment optimization methods of the above embodiments are stored in the memory 720 , and when executed by the processor 710 , the hot deployment optimization methods of the above embodiments are executed.
[0120] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0121] In addition, an embodiment of the present application also provides a computer-readable storage medium, which stores computer-executable instructions, and the computer-executable instructions are executed by a processor 710 or a controller, for example, by a processor 710 in the above-mentioned device embodiment, so that the above-mentioned processor 710 can execute the hot deployment optimization method in the above-mentioned embodiment.
[0122] The above embodiments may be used in combination, and modules with the same name in different embodiments may be the same or different.
[0123] The above describes specific embodiments of the present application, and other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily have to be performed in the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0124] Each embodiment in this application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, equipment, and computer-readable storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0125] The apparatus, device, computer-readable storage medium and method provided in the embodiments of the present application correspond to each other. Therefore, the apparatus, device and non-volatile computer storage medium also have similar beneficial technical effects as the corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the corresponding apparatus, device and computer storage medium will not be repeated here.
[0126] In the 1990s, it was very clear whether the improvement of a technology was hardware improvement (for example, improvement of the circuit structure of diodes, transistors, switches, etc.) or software improvement (improvement of the method flow). However, with the development of technology, many improvements of the method flow today can be regarded as direct improvements of the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that the improvement of a method flow cannot be implemented with a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask chip manufacturers to design and produce dedicated integrated circuit chips. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs. The original code before compilation must also be written in a specific programming language, which is called Hardware Description Language (HDL). There is not only one kind of HDL, but many kinds, such as ABEL (Advanced Bootean Express Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell Unity Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used one is VHDL (Very-High-Speed Integrated Circuit Hardware Description Language). Those skilled in the art should also be aware that by programming the method flow in the above-mentioned hardware description languages and programming it into an integrated circuit, a hardware circuit for implementing the logic method flow can be easily obtained.
[0127] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91 SAM, Microchip PIC18F26K20, and Silicon Labs C8051 F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the means for realizing various functions may be regarded as both a software module for realizing the method and a structure within a hardware component.
[0128] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0129] For the convenience of description, the above devices are described in terms of functions and are divided into various units. Of course, when implementing the embodiments of the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0130] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the embodiments of the present application may adopt the form of complete hardware embodiments, complete software embodiments, or embodiments in combination with software and hardware. Moreover, the embodiments of the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0131] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0132] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0133] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0134] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0135] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash memory (Flash RAM). The memory is an example of a computer-readable medium.
[0136] Computer readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (Transitory Med ia), such as modulated data signals and carrier waves.
[0137] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0138] In the embodiments of the present application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. Among them, A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can be represented by: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, c can be single or multiple.
[0139] Embodiments of the present application may be described in the general context of computer executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. Embodiments of the present application may also be practiced in distributed computing environments, where tasks are performed by remote processing devices connected via a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0140] Each embodiment in this application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0141] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A hot deployment optimization method, characterized in that: Applied to an application server, the application server is connected to an application host, and a plurality of network attached storage directories are arranged on the application host, the method comprises: Get the front-end web page update request; Analyze the front-end web page update request to obtain web page function update requirements; According to the webpage function update requirement, determining a target network attached storage directory from the plurality of network attached storage directories of the application host; Scanning the target network attached storage directory according to the webpage function update requirement; In the case that the update file exists in the target network attached storage directory, the update file is loaded and instantiated based on a preset user class loader to perform online hot update processing on the functions of the front-end web page.
2. The hot deployment optimization method according to claim 1, characterized in that: The analyzing the front-end web page update request to obtain the web page function update requirement includes: Extracting the tag bit of the front-end web page update request to obtain a target tag; The target tag is matched with a preset function tag database to obtain the webpage function update requirement.
3. The hot deployment optimization method according to claim 1, characterized in that: Each of the network attached storage directories corresponds to a file type, and determining a target network attached storage directory from the plurality of network attached storage directories of the application host according to the webpage function update requirement comprises: Determine function update file type information according to the webpage function update requirement; Matching the function update file type information with the file type corresponding to each of the network attached storage directories in the application host to obtain the target network attached storage directory; The file type of the target network attached storage directory is consistent with the function update file type information.
4. The hot deployment optimization method according to claim 1, characterized in that: The scanning of the target network attached storage directory according to the webpage function update requirement includes: Determine webpage function update file information according to the webpage function update requirement; The target network attached storage directory is scanned according to the webpage function update file information.
5. The hot deployment optimization method according to claim 1, characterized in that: After scanning the target network attached storage directory according to the webpage function update requirement, the method further includes: In the case that no update file exists in the target network attached storage directory, an online hot update process is performed on the functions of the front-end webpage based on preset system code program information.
6. The hot deployment optimization method according to claim 1, characterized in that: In the case where the update file exists in the target network attached storage directory, after the update file is loaded and instantiated based on a preset user class loader to perform online hot update processing on the function of the front-end webpage, the method further includes: After completing the online hot update process for the function of the front-end webpage, performing a self-check process on the function of the front-end webpage to obtain a self-check result; When the self-check result indicates that the function of the front-end webpage meets the preset functional requirements, hot update success indication information is fed back to the preset user monitoring terminal.
7. The hot deployment optimization method according to claim 6, characterized in that: After the self-checking process is performed on the function of the front-end webpage and the self-checking result is obtained, the method further includes: When the self-check result indicates that the function of the front-end webpage does not meet the preset functional requirements, the update file is reloaded and instantiated based on the user class loader, and the function of the front-end webpage is hot-updated online using the instantiated update file.
8. A thermal deployment optimization device, characterized in that: The hot deployment optimization device is arranged on an application server, the application server is connected to an application host, a plurality of network attached storage directories are arranged on the application host, and the device comprises: The first processing module is used to obtain a front-end web page update request; The second processing module is used to analyze the front-end web page update request to obtain the web page function update requirement; A third processing module, configured to determine a target network attached storage directory from the plurality of network attached storage directories of the application host according to the webpage function update requirement; A fourth processing module, configured to scan the target network attached storage directory according to the webpage function update requirement; The fifth processing module is used to load and instantiate the update file based on a preset user class loader when there is an update file in the target network attached storage directory, so as to perform online hot update processing on the functions of the front-end web page.
9. An electronic device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the hot deployment optimization method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing computer-executable instructions, characterized in that: The computer executable instructions are used to execute the hot deployment optimization method described in any one of claims 1 to 7.
