Movatterモバイル変換


[0]ホーム

URL:


CN115766445A - Automatic updating method and device for web application and application - Google Patents

Automatic updating method and device for web application and application
Download PDF

Info

Publication number
CN115766445A
CN115766445ACN202211399425.5ACN202211399425ACN115766445ACN 115766445 ACN115766445 ACN 115766445ACN 202211399425 ACN202211399425 ACN 202211399425ACN 115766445 ACN115766445 ACN 115766445A
Authority
CN
China
Prior art keywords
automation
client
web application
server
automation client
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211399425.5A
Other languages
Chinese (zh)
Inventor
李圣权
张克厚
黄红叶
倪林杰
赵军辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CCI China Co Ltd
Original Assignee
CCI China Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by CCI China Co LtdfiledCriticalCCI China Co Ltd
Priority to CN202211399425.5ApriorityCriticalpatent/CN115766445A/en
Publication of CN115766445ApublicationCriticalpatent/CN115766445A/en
Pendinglegal-statusCriticalCurrent

Links

Images

Landscapes

Abstract

Translated fromChinese

本申请提出了一种针对web应用的自动更新方法、装置及应用,包括以下步骤:基于selenium server脚本构建自动化客户端,基于selenium client脚本构建自动化服务端;用户在本地安装自动化客户端,之后在所述自动化客户端中填入web应用的配置信息,自动化客户端通过websocket将所述web应用的配置信息发送到所述自动化服务端中,所述自动化服务端根据所述web应用的配置信息登录到对应的web应用,并持续获取web应用的更新信息,当所述web应用存在更新信息时,所述自动化服务端对所述web应用进行更新操作。本方案对自动化客户端与自动化服务端建立连接,并通过websocket的方式进行信息传输,使得本方案可以自动进行web应用的更新。

Figure 202211399425

The application proposes an automatic update method, device and application for web applications, comprising the following steps: building an automation client based on a selenium server script, and building an automation server based on a selenium client script; the user installs the automation client locally, and then Fill in the configuration information of the web application in the automation client, the automation client sends the configuration information of the web application to the automation server through websocket, and the automation server logs in according to the configuration information of the web application to the corresponding web application, and continuously obtain the update information of the web application, and when the update information of the web application exists, the automation server performs an update operation on the web application. This solution establishes a connection between the automation client and the automation server, and transmits information through websocket, so that this solution can automatically update the web application.

Figure 202211399425

Description

Translated fromChinese
针对web应用的自动更新方法、装置及应用Automatic update method, device and application for web applications

技术领域technical field

本申请涉及web应用领域,特别是涉及一种针对web应用的自动更新方法、装置及应用。The present application relates to the field of web applications, in particular to an automatic update method, device and application for web applications.

背景技术Background technique

现在各行业都有自己的web应用,卖方注册web应用,然后发布供应、报价和产品等信息,但是web应用首页只能按照信息更新时间展示最近的10条或20条信息,卖方为了让自己的信息能够在首页排名靠前,每天大部分的时间都会坐在电脑前,手动地反复更新各家web应用的供应、报价和产品等信息到首页。手动更新则存在以下缺点:1.生产力低,大量的时间被浪费在电脑前;2.手动更新效率低,不能保证每天都有足够的时间坐在电脑前;3.手动更新效果差,更新信息很容易被他人信息覆盖;4.手动更新使得不能进行产品化,降低了软件产品的利润率。Now each industry has its own web application, the seller registers the web application, and then releases information such as supply, quotation and product, but the home page of the web application can only display the latest 10 or 20 pieces of information according to the information update time. The information can be ranked high on the homepage, and most of the time every day is sitting in front of the computer, manually repeatedly updating the supply, quotation and product information of various web applications to the homepage. Manual update has the following disadvantages: 1. Low productivity, a lot of time is wasted in front of the computer; 2. Manual update is inefficient and cannot guarantee enough time to sit in front of the computer every day; 3. Manual update effect is poor, updating information It is easy to be covered by other people's information; 4. Manual update makes it impossible to commercialize and reduces the profit margin of software products.

现有技术也有专门的自动化更新工具,常见的工具有selenium在现有技术中,使用selenium实现自动化更新的做法是把selenium Server、基于selenium Client的脚本和对应的浏览器、JRE环境放在一台机器上执行,使用这种方法进行自动化更新会使得客户端比较胖,资源全部保存在本地,比较占用空间,如果脚本需要变更,则所有用户机器上的脚本都需要更新,导致可维护性低,用户体验差,且不利于产品化。Existing technologies also have specialized automatic update tools, and the common tool is selenium. In the existing technology, the method of using selenium to realize automatic update is to put selenium Server, selenium Client-based scripts, corresponding browsers, and JRE environments in one Execute on the machine, using this method for automatic update will make the client fatter, and all resources are stored locally, which takes up more space. If the script needs to be changed, the script on all user machines needs to be updated, resulting in low maintainability. The user experience is poor, and it is not conducive to productization.

所以,亟需一种可以自动更新web应用的自动化更新工具。Therefore, there is an urgent need for an automatic update tool that can automatically update web applications.

发明内容Contents of the invention

本申请实施例提供了一种针对web应用的自动更新方法、装置及应用,采用自动更新的方式的同时解决了基于selenium的胖客户端不容易维护的缺点,实现了一套通用、易维护的、“瘦客户端—服务端”自动化更新产品架构。The embodiment of the present application provides an automatic update method, device and application for web applications. The automatic update method solves the disadvantage that the selenium-based fat client is not easy to maintain, and realizes a set of universal and easy-to-maintain , "Thin client-server" automatically updates the product architecture.

第一方面,本申请实施例提供了一种针对web应用的自动更新方法,所述方法包括:In the first aspect, the embodiment of the present application provides an automatic update method for web applications, the method comprising:

基于selenium server脚本构建自动化客户端,基于selenium client脚本构建自动化服务端;Build an automated client based on selenium server scripts, and an automated server based on selenium client scripts;

用户在本地安装所述自动化客户端,并在所述自动化客户端中填入需更新的web应用的配置信息,在所述自动化服务端中设置监听器,通过监听的方式与所述自动化客户端建立websocket连接,自动化客户端通过websocket将所述web应用的配置信息发送到所述自动化服务端中;The user installs the automation client locally, and fills in the configuration information of the web application to be updated in the automation client, sets a listener in the automation server, and communicates with the automation client by monitoring Establish a websocket connection, and the automation client sends the configuration information of the web application to the automation server through the websocket;

所述自动化服务端判断所述自动化客户端是否正在运行,若所述自动化客户端正在运行,所述自动化服务端根据所述web应用的配置信息登录到对应的web应用,并持续获取所述web应用的更新信息,基于所述配置信息对所述web应用进行更新操作,若所述自动化客户端关闭,则所述自动化服务端每隔一段时间向所述自动化客户端发送心跳连接,直到所述自动化客户端与所述自动化服务端重新连接成功。The automation server judges whether the automation client is running, if the automation client is running, the automation server logs in to the corresponding web application according to the configuration information of the web application, and continuously obtains the web application update information of the application, update the web application based on the configuration information, if the automation client is closed, the automation server sends a heartbeat connection to the automation client at regular intervals until the The automation client successfully reconnects with the automation server.

第二方面,本申请实施例提供了一种针对web应用的自动更新装置,包括:In the second aspect, the embodiment of the present application provides an automatic update device for web applications, including:

构建模块:基于selenium server脚本构建自动化客户端,基于seleniumclient脚本构建自动化服务端;Building modules: build an automated client based on selenium server scripts, and build an automated server based on seleniumclient scripts;

连接模块:用户在本地安装所述自动化客户端,并在所述自动化客户端中填入需更新的web应用的配置信息,在所述自动化服务端中设置监听器,通过监听的方式与所述自动化客户端建立websocket连接,自动化客户端通过websocket将所述web应用的配置信息发送到所述自动化服务端中;Connection module: the user installs the automation client locally, and fills in the configuration information of the web application to be updated in the automation client, sets a listener in the automation server, and communicates with the The automation client establishes a websocket connection, and the automation client sends the configuration information of the web application to the automation server through the websocket;

执行模块:所述自动化服务端判断所述自动化客户端是否正在运行,若所述自动化客户端正在运行,所述自动化服务端根据所述web应用的配置信息登录到对应的web应用,并持续获取所述web应用的更新信息,基于所述配置信息对所述web应用进行更新操作,若所述自动化客户端关闭,则所述自动化服务端每隔一段时间向所述自动化客户端发送心跳连接,直到所述自动化客户端与所述自动化服务端重新连接成功。Execution module: the automation server determines whether the automation client is running, if the automation client is running, the automation server logs in to the corresponding web application according to the configuration information of the web application, and continuously obtains The update information of the web application is based on the configuration information to update the web application, if the automation client is closed, the automation server sends a heartbeat connection to the automation client at regular intervals, until the automation client successfully reconnects with the automation server.

第三方面,本申请实施例提供了一种电子装置,包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器被设置为运行所述计算机程序以执行一种针对web应用的自动更新方法。In a third aspect, an embodiment of the present application provides an electronic device, including a memory and a processor, where a computer program is stored in the memory, and the processor is configured to run the computer program to execute a web application-oriented Automatic update method.

第四方面,本申请实施例提供了一种可读存储介质,所述可读存储介质中存储有计算机程序,所述计算机程序包括用于控制过程以执行过程的程序代码,所述过程包括一种针对web应用的自动更新方法。In a fourth aspect, an embodiment of the present application provides a readable storage medium, where a computer program is stored in the readable storage medium, and the computer program includes a program code for controlling a process to execute the process, and the process includes a An automatic update method for web applications.

本发明的主要贡献和创新点如下:Main contribution and innovation of the present invention are as follows:

本申请实施例发明了一种针对web应用的自动更新方法、装置及应用,本方案将原本在一台机器上执行的Selenium Server和Selenium Client脚本进行拆分得到基于selenium client设置自动化服务端以及基于selenium server设置自动化客户端,一个自动化服务端可以对应多个自动化客户端,每个用户的自动化更新在各自单独的线程内执行,互不干扰,且本方案的客户端和服务端完全解耦达到互不干扰的效果,使得当web应用发生变动时可以简化操作步骤;本方案通过自动化服务端向自动化客户端循环发送心跳连接,保证自动化客户端与自动化服务端之间的正常连接,以保证web应用自动更新的及时性;本申请实施例的自动化服务端使用selenium client脚本进行构建,自动化客户端使用selenium server脚本进行构建,当web应用进行变动时,只需要修改自动化服务端的脚本并重启,无需对自动化客户端进行修改。The embodiment of the present application has invented an automatic update method, device and application for web applications. This solution splits the Selenium Server and Selenium Client scripts that were originally executed on one machine to obtain an automated server based on the selenium client and an automatic server based on the selenium client. The selenium server sets up the automation client. One automation server can correspond to multiple automation clients. The automation updates of each user are executed in their own separate threads without interfering with each other. In addition, the client and server of this solution are completely decoupled to achieve The effect of non-interference makes it possible to simplify the operation steps when the web application changes; this solution sends a heartbeat connection to the automation client through the automation server to ensure the normal connection between the automation client and the automation server to ensure that the web The timeliness of automatic update of the application; the automation server of the embodiment of the application is constructed using selenium client scripts, and the automation client is constructed using selenium server scripts. When the web application changes, only the script of the automation server needs to be modified and restarted without Make modifications to the automation client.

本申请的一个或多个实施例的细节在以下附图和描述中提出,以使本申请的其他特征、目的和优点更加简明易懂。The details of one or more embodiments of the application are set forth in the accompanying drawings and the description below, so as to make other features, objects, and advantages of the application more comprehensible.

附图说明Description of drawings

此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:The drawings described here are used to provide a further understanding of the application and constitute a part of the application. The schematic embodiments and descriptions of the application are used to explain the application and do not constitute an improper limitation to the application. In the attached picture:

图1是根据本申请实施例的一种针对web应用的自动更新方法的流程图;Fig. 1 is a flow chart of an automatic update method for web applications according to an embodiment of the present application;

图2是根据本申请实施例一种针对web应用的自动更新方法的部署架构的流程图;FIG. 2 is a flowchart of a deployment framework for an automatic update method for web applications according to an embodiment of the present application;

图3是根据本申请实施例的一种针对web应用的自动更新装置的结构框图;FIG. 3 is a structural block diagram of an automatic update device for web applications according to an embodiment of the present application;

图4是根据本申请实施例的电子装置的硬件结构示意图。FIG. 4 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application.

具体实施方式Detailed ways

这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本说明书一个或多个实施例相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本说明书一个或多个实施例的一些方面相一致的装置和方法的例子。Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numerals in different drawings refer to the same or similar elements unless otherwise indicated. Implementations described in the following exemplary embodiments do not represent all implementations consistent with one or more embodiments of this specification. Rather, they are merely examples of apparatuses and methods consistent with aspects of one or more embodiments of the present specification as recited in the appended claims.

需要说明的是:在其他实施例中并不一定按照本说明书示出和描述的顺序来执行相应方法的步骤。在一些其他实施例中,其方法所包括的步骤可以比本说明书所描述的更多或更少。此外,本说明书中所描述的单个步骤,在其他实施例中可能被分解为多个步骤进行描述;而本说明书中所描述的多个步骤,在其他实施例中也可能被合并为单个步骤进行描述。It should be noted that in other embodiments, the steps of the corresponding methods are not necessarily performed in the order shown and described in this specification. In some other embodiments, the method may include more or less steps than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; multiple steps described in this specification may also be combined into a single step in other embodiments describe.

为了便于理解本方案,在此对本方案中的名字加以解释:In order to facilitate the understanding of this scheme, the names in this scheme are explained here:

Selenium:Selenium原本是用于软件自动化测试的工具,selenium可以直接运行在浏览器中,对于测试的任务就像真正的用户在实际操作一样,但它是自动化的,并且支持现在主流的所有浏览器,包括但不限于IE(7、8、9、10、11),Mozilla Firefox,Safari,Google Chrome,Opera,Edge。Selenium: Selenium was originally a tool for software automation testing. Selenium can run directly in the browser. The task of testing is like a real user operating in practice, but it is automated and supports all current mainstream browsers. , including but not limited to IE (7, 8, 9, 10, 11), Mozilla Firefox, Safari, Google Chrome, Opera, Edge.

webSocket:Websocket是一种在单个TCP连接上进行的全双工通信的协议,它使得客户端和服务端之间的数据交换变得更加简单,并且允许服务端主动向客户端推送数据,而且在WebSocket api中,浏览器和服务器只需完成一次握手,两者之间就可以创建持久性的连接,并进行双向数据传输。webSocket: Websocket is a protocol for full-duplex communication over a single TCP connection, which makes the data exchange between the client and the server easier, and allows the server to actively push data to the client, and in In the WebSocket API, the browser and the server only need to complete a handshake, and a persistent connection can be established between the two, and two-way data transmission can be performed.

selenium server:selenium的服务端;selenium server: the server of selenium;

seleniun client:selenium的客户端;selenium client: selenium's client;

产品服务端:是基于seleniun client写的自动化脚本的一个服务端;Product server: It is a server based on the automation script written by seleniun client;

产品客户端:是基于selenium server使用java语言开发的一个客户端;Product client: a client developed based on selenium server using java language;

ID元素:包含父元素的唯一识别码。ID element: contains the unique identification code of the parent element.

实施例一Embodiment one

本申请实施例提供了一种针对web应用的自动更新方法,可以通过selenium来部署架构来实现web应用的自动更新,具体地,参考图1,所述方法包括:The embodiment of the present application provides an automatic update method for web applications. The architecture can be deployed through selenium to implement automatic update of web applications. Specifically, referring to FIG. 1, the method includes:

基于selenium server脚本构建自动化客户端,基于selenium client脚本构建自动化服务端;Build an automated client based on selenium server scripts, and an automated server based on selenium client scripts;

用户在本地安装所述自动化客户端,并在所述自动化客户端中填入需更新的web应用的配置信息,在所述自动化服务端中设置监听器,通过监听的方式与所述自动化客户端建立websocket连接,自动化客户端通过websocket将所述web应用的配置信息发送到所述自动化服务端中;The user installs the automation client locally, and fills in the configuration information of the web application to be updated in the automation client, sets a listener in the automation server, and communicates with the automation client by monitoring Establish a websocket connection, and the automation client sends the configuration information of the web application to the automation server through the websocket;

所述自动化服务端判断所述自动化客户端是否正在运行,若所述自动化客户端正在运行,所述自动化服务端根据所述web应用的配置信息登录到对应的web应用,并持续获取所述web应用的更新信息,基于所述配置信息对所述web应用进行更新操作,若所述自动化客户端关闭,则所述自动化服务端每隔一段时间向所述自动化客户端发送心跳连接,直到所述自动化客户端与所述自动化服务端重新连接成功。The automation server judges whether the automation client is running, if the automation client is running, the automation server logs in to the corresponding web application according to the configuration information of the web application, and continuously obtains the web application update information of the application, update the web application based on the configuration information, if the automation client is closed, the automation server sends a heartbeat connection to the automation client at regular intervals until the The automation client successfully reconnects with the automation server.

在本方案中,由于Selenium Client的脚本在服务端,无法通过http调用每个用户的Selenium Server,引入websocket技术使得服务端的selenium命令可以通过websocket推送到每个用户客户端,然后客户端调用本地Selenium server执行。In this solution, since the Selenium Client script is on the server side, it is impossible to call each user's Selenium Server through http. The introduction of websocket technology enables the server's selenium commands to be pushed to each user client through websocket, and then the client calls the local Selenium server execution.

在本方案的实施例中,基于selenium server脚本、自动化脚本载体以及客户端执行环境构建自动化客户端,所述自动化客户端中的自动化脚本使用selenium规范基于selenium server进行编写,并通过websocket的方式进行启动,所述自动化服务端使用selenium规范基于selenium client进行编写。In the embodiment of this scheme, build automation client based on selenium server script, automation script carrier and client execution environment, the automation script in described automation client uses selenium standard to write based on selenium server, and through the mode of websocket start, the automation server uses the selenium specification to write based on the selenium client.

所述自动化脚本载体为浏览器程序,包括但不限于IE、Google chrome、Edge。The automation script carrier is a browser program, including but not limited to IE, Google chrome, Edge.

所述客户端执行环境为自动化客户端的运行环境,包括但不限于C++、Java、Python。The execution environment of the client is the operating environment of the automation client, including but not limited to C++, Java, and Python.

具体的,所述自动化客户端为可执行的exe文件,由所述自动化脚本、自动化脚本载体和客户端执行环境打包而成。Specifically, the automation client is an executable exe file, which is packaged by the automation script, the automation script carrier and the client execution environment.

示例性的,针对web应用的自动更新方法的部署架构如图2所示,所述自动化脚本为所述自动化客户端的可视化界面代码,所述自动化脚本载体为可视化界面的载体,可以为浏览器,在本方案中使用Google chrome,所述客户端执行环境为所述自动化客户端的执行环境,在本方案中程序由java开发,所以选择JRE作为客户端执行环境。Exemplarily, the deployment architecture of the automatic update method for web applications is shown in Figure 2, the automation script is the visual interface code of the automation client, the automation script carrier is the carrier of the visual interface, which can be a browser, In this scheme, Google chrome is used, and the execution environment of the client is the execution environment of the automation client. In this scheme, the program is developed by java, so JRE is selected as the execution environment of the client.

具体的,在“所述自动化客户端中的自动化脚本使用selenium规范进行编写”步骤中,根据id元素通过java代码和selenium规范来编写设置web网站的用户名输入框和密码输入框。Specifically, in the step of "the automation script in the automation client is written using the selenium specification", the user name input box and the password input box of the web site are written and set according to the id element through the java code and the selenium specification.

进一步的,根据id元素通过java代码和selenium规范来制作登录按钮和点击登录按钮的后续操作,根据link元素来获取可视化界面的素材信息,通过http调用的方式来获取web应用的更新信息和用户登录的身份验证操作。Further, according to the id element, the login button and the follow-up operation of clicking the login button are made through java code and selenium specification, the material information of the visual interface is obtained according to the link element, and the update information of the web application and user login are obtained through http calls authentication operation.

具体的,基于selenium client进行自动化服务端的编写目的是当由于网络问题导致所述自动化客户端停止运行时,基于selenium server编写的自动化客户端会自动重新和自动化服务端建立连接。Specifically, the purpose of writing the automation server based on the selenium client is that when the automation client stops running due to network problems, the automation client written based on the selenium server will automatically re-establish a connection with the automation server.

在一些实施例中,一个所述自动化服务端可以与多个自动化客户端进行连接,且每一自动化客户端都在单独的线程中执行。In some embodiments, one automation server can be connected with multiple automation clients, and each automation client is executed in a separate thread.

在一些实施例中,在“用户在本地安装自动化客户端,并在所述自动化客户端中填入web应用的配置信息”步骤中,用户在所述自动化客户端中注册账号,所述自动化客户端通过http调用的方式获取用户注册的账号信息,用户根据注册成功的账号信息登录到所述自动化客户端并生成个人本地信息,所述web应用的配置信息包括所述web应用的账号密码以及更新方法。In some embodiments, in the step of "the user installs the automation client locally, and fills in the configuration information of the web application in the automation client", the user registers an account in the automation client, and the automation client The terminal obtains the account information registered by the user through http calling, and the user logs in to the automation client according to the successfully registered account information and generates personal local information. The configuration information of the web application includes the account password of the web application and update method.

示例性的,所述账号信息包括用户名以及密码,用户名可以为用户的手机号或者自定义字符串,密码为用户自定义的字符串。Exemplarily, the account information includes a user name and a password, the user name may be the user's mobile phone number or a user-defined character string, and the password is a user-defined character string.

具体的,当用户安装好所述自动化客户端并成功注册后,在用户名输入框输入注册成功的用户名,在密码输入框输入对应的密码信息,之后点击登录按钮进行登录操作。Specifically, after the user installs the automated client and successfully registers, enter the successfully registered user name in the user name input box, enter the corresponding password information in the password input box, and then click the login button to perform a login operation.

示例性的,所述用户个人信息可以加密后存在本地文件中,防止登录信息泄露,若用户安装了数据库软件,也可以将用户个人信息加密后存在数据库中,所述web应用的更新方法通过http调用的方式发送给所述自动化服务端。Exemplarily, the user's personal information can be encrypted and stored in a local file to prevent leakage of login information. If the user has installed database software, the user's personal information can also be encrypted and stored in the database. The update method of the web application is through http The calling method is sent to the automation server.

进一步的,当用户登录到所述自动化客户端并填写好需要自动更新的web应用的配置信息后,点击自动化客户端的运行按钮进行后续操作。Further, after the user logs in to the automation client and fills in the configuration information of the web application that needs to be automatically updated, he clicks the run button of the automation client to perform subsequent operations.

进一步的,可以根据用户的账号信息将用户分为普通用户和vip用户,所述普通用户使用传统的方式进行手动的web应用更新,所述vip用户使用自动化更新的方式进行web应用更新。Further, the users may be divided into common users and VIP users according to their account information, and the common users use the traditional method to update the web application manually, and the vip users use the automatic update method to update the web application.

示例性的,可以为所述普通用户和vip用户分配不同的权限,例如可更新web应用的个数等。Exemplarily, different permissions can be assigned to the common user and the VIP user, for example, the number of web applications that can be updated.

在一些实施例中,在“在所述自动化服务端中设置监听器,通过监听的方式与所述自动化客户端建立websocket连接”步骤中,当用户使用账号信息登录到所述自动化客户端,所述监听器监听到所述自动化客户端已经登录后与所述自动化客户端建立websocket连接。In some embodiments, in the step of "setting a listener in the automation server, and establishing a websocket connection with the automation client by monitoring", when the user logs in to the automation client using account information, the After the listener detects that the automation client has logged in, it establishes a websocket connection with the automation client.

在一些实施例中,在“所述自动化服务端根据所述web应用的配置信息登录到对应的web应用,并持续获取所述web应用的更新信息”步骤中,所述自动化服务端通过http调用的方式对所述web应用进行登录操作,并通过http调用所述web应用的更新接口来持续获取web应用的更新信息。In some embodiments, in the step of "the automation server logs in to the corresponding web application according to the configuration information of the web application, and continuously acquires the update information of the web application", the automation server calls Log in the web application in a manner, and call the update interface of the web application through http to continuously obtain the update information of the web application.

具体的,所述自动化客户端和所述自动化服务端之间通过监听器的方式建立连接,所述监听器在自动化服务端中,通过netty的channelpipline来设置对传输数据的编解码类、websocket的协议处理类,最后通过绑定具体的web应用的端口来实现服务的启动,即通过inetsockaddress启动了对指定ip端口的监听。Specifically, the connection between the automation client and the automation server is established through a listener, and the listener is set in the automation server through the channelpipline of netty to set the codec class of the transmitted data, the websocket The protocol processing class finally realizes the start of the service by binding the port of the specific web application, that is, the monitoring of the specified ip port is started through the inetsockaddress.

具体的,所述web应用的更新信息通过json的方式将更新信息打包,并调用websocket.send(json)通过websocket将所述web应用的更新信息发送到所述自动化服务端。Specifically, the update information of the web application is packaged in the form of json, and websocket.send(json) is called to send the update information of the web application to the automation server through websocket.

具体的,所述自动化客户端接收自动化服务端通过websocket推送的指令信息,然后调用所述自动化客户端中的selenium-server驱动自动化脚本载体进行执行以达到建立连接的目的。Specifically, the automation client receives the instruction information pushed by the automation server through websocket, and then calls the selenium-server in the automation client to drive the automation script carrier to execute to achieve the purpose of establishing a connection.

示例性的,当web应用的登录验证为验证码验证、滑块验证、字符验证等方式时,可以在自动化服务端中部署一个卷积神经网络模型进行训练识别,从而完成登录验证。Exemplarily, when the login verification of the web application is verification code verification, slider verification, character verification, etc., a convolutional neural network model can be deployed in the automation server for training and recognition, so as to complete the login verification.

在一些具体实施例中,当web应用出现变动时,对所述自动化服务端的脚本程序进行修改,并重启所述自动化客户端,这样操作的目的是保证自动化客户端和自动化服务端完全解耦达到互不干扰的方式从而在达到变动目的的同时简化了操作步骤。In some specific embodiments, when the web application changes, the script program of the automation server is modified, and the automation client is restarted. The purpose of this operation is to ensure that the automation client and the automation server are completely decoupled to achieve The non-interference method simplifies the operation steps while achieving the purpose of change.

在一些实施例中,在“基于所述配置信息对所述web应用进行更新操作”步骤中,所述自动化客户端获取web应用的更新数据包,并通过websocket将所述更新数据包发送给所述自动化服务端,所述自动化服务端解析所述更新数据包并基于所述配置信息对web应用执行更新操作。In some embodiments, in the step of "updating the web application based on the configuration information", the automation client obtains the update data package of the web application, and sends the update data package to the The automation server, the automation server parses the update data packet and performs an update operation on the web application based on the configuration information.

具体的,所述自动化服务端根据所述配置信息中的更新方法对web应用执行更新操作。Specifically, the automation server performs an update operation on the web application according to the update method in the configuration information.

在一些具体实施例中,所述心跳连接使用websocket的reconnect操作。In some specific embodiments, the heartbeat connection uses the reconnect operation of websocket.

进一步的,当所述自动化客户端在开启状态,则会循环发送selenium命令给所述自动化服务端进行解析,当所述自动化客户端为关闭状态,所述自动化服务端通过状态位来对所述自动化客户端循环执行websocket的reconnect操作,直至所述自动化客户端再次开启,与所述自动化服务器重新连接。Further, when the automation client is in the open state, the selenium command will be sent cyclically to the automation server for analysis, and when the automation client is in the closed state, the automation server will pass the status bit to the The automation client executes the websocket reconnect operation cyclically until the automation client is turned on again and reconnects with the automation server.

在一些具体实施例中,所述selenium命令为自动更新指令,当所述自动化服务端接收到自动更新指令并解析后,所述自动化客户端启动浏览器来配合所述自动化服务端进行web应用的更新操作。In some specific embodiments, the selenium command is an automatic update instruction, and after the automatic update instruction is received and parsed by the automated server, the automated client starts a browser to cooperate with the automated server to perform web application update operation.

在一些实施例中,在“所述自动化服务端判断所述自动化客户端是否正在运行”步骤中,在所述自动化服务端为每一所述自动化客户端设置状态位,当所述自动化客户端正在运行时,则正在运行的自动化客户端的状态位为true,当所述自动化客户端关闭时,则关闭的自动化客户端的状态位为false。In some embodiments, in the step of "the automation server determines whether the automation client is running", the automation server sets a status bit for each of the automation clients, when the automation client is running When running, the status bit of the running automation client is true, and when the automation client is closed, the status bit of the closed automation client is false.

具体的,当所述自动化客户端在开启状态时,则所述自动化客户端的状态位为true,当所述自动化客户端在关闭状态时,则所述自动化客户端的状态位为false,当所述自动化客户端的状态位有true改变为false时触发reconnect操作,直至所述自动化客户端与所述自动化服务端连接成功,在一定程度上保证了软件系统的高可用问题。Specifically, when the automation client is in the open state, the status bit of the automation client is true; when the automation client is in the shutdown state, the status bit of the automation client is false; When the status bit of the automation client changes from true to false, the reconnect operation is triggered until the automation client is successfully connected to the automation server, which ensures the high availability of the software system to a certain extent.

具体的,当由于网络波动原因导致websocket断开连接,则判定所述自动化客户端的状态位为false,由所述自动化服务端触发reconnect操作进行重新连接,若网络断开关闭所述自动化客户端,并释放资源。Specifically, when the websocket is disconnected due to network fluctuations, it is determined that the status bit of the automation client is false, and the automation server triggers a reconnect operation to reconnect. If the network is disconnected, close the automation client, and release resources.

进一步的,当网络断开时所述自动化服务端也会一直触发reconnect操作以保证心跳连接,当网络重新连接时根据用户需求选择重新进行自动化更新或者停止更新。Further, when the network is disconnected, the automation server will always trigger the reconnect operation to ensure the heartbeat connection, and when the network is reconnected, it can choose to perform the automatic update or stop the update according to the user's needs.

实施例二Embodiment two

基于相同的构思,参考图3,本申请还提出了一种针对web应用的自动更新装置,包括:Based on the same idea, with reference to FIG. 3, the present application also proposes an automatic update device for web applications, including:

构建模块:基于selenium server脚本构建自动化客户端,基于seleniumclient脚本构建自动化服务端;Building modules: build an automated client based on selenium server scripts, and build an automated server based on seleniumclient scripts;

连接模块:用户在本地安装所述自动化客户端,并在所述自动化客户端中填入需更新的web应用的配置信息,在所述自动化服务端中设置监听器,通过监听的方式与所述自动化客户端建立websocket连接,自动化客户端通过websocket将所述web应用的配置信息发送到所述自动化服务端中;Connection module: the user installs the automation client locally, and fills in the configuration information of the web application to be updated in the automation client, sets a listener in the automation server, and communicates with the The automation client establishes a websocket connection, and the automation client sends the configuration information of the web application to the automation server through the websocket;

执行模块:所述自动化服务端判断所述自动化客户端是否正在运行,若所述自动化客户端正在运行,所述自动化服务端根据所述web应用的配置信息登录到对应的web应用,并持续获取所述web应用的更新信息,基于所述配置信息对所述web应用进行更新操作,若所述自动化客户端关闭,则所述自动化服务端每隔一段时间向所述自动化客户端发送心跳连接,直到所述自动化客户端与所述自动化服务端重新连接成功。Execution module: the automation server determines whether the automation client is running, if the automation client is running, the automation server logs in to the corresponding web application according to the configuration information of the web application, and continuously obtains The update information of the web application is based on the configuration information to update the web application, if the automation client is closed, the automation server sends a heartbeat connection to the automation client at regular intervals, until the automation client successfully reconnects with the automation server.

实施例三Embodiment Three

本实施例还提供了一种电子装置,参考图4,包括存储器404和处理器402,该存储器404中存储有计算机程序,该处理器402被设置为运行计算机程序以执行上述任一项针对web应用的自动更新方法实施例中的步骤。This embodiment also provides an electronic device, referring to FIG. 4 , including amemory 404 and aprocessor 402, thememory 404 stores a computer program, and theprocessor 402 is configured to run the computer program to perform any of the above-mentioned web-based The steps in the embodiment of the automatic updating method of the application.

具体地,上述处理器402可以包括中央处理器(CPU),或者特定集成电路(ApplicationSpecificIntegratedCircuit,简称为ASIC),或者可以被配置成实施本申请实施例的一个或多个集成电路。Specifically, theprocessor 402 may include a central processing unit (CPU), or an Application Specific Integrated Circuit (ASIC for short), or may be configured to implement one or more integrated circuits in the embodiments of the present application.

其中,存储器404可以包括用于数据或指令的大容量存储器404。举例来说而非限制,存储器404可包括硬盘驱动器(HardDiskDrive,简称为HDD)、软盘驱动器、固态驱动器(SolidStateDrive,简称为SSD)、闪存、光盘、磁光盘、磁带或通用串行总线(UniversalSerialBus,简称为USB)驱动器或者两个或更多个以上这些的组合。在合适的情况下,存储器404可包括可移除或不可移除(或固定)的介质。在合适的情况下,存储器404可在数据处理装置的内部或外部。在特定实施例中,存储器404是非易失性(Non-Volatile)存储器。在特定实施例中,存储器404包括只读存储器(Read-OnlyMemory,简称为ROM)和随机存取存储器(RandomAccessMemory,简称为RAM)。在合适的情况下,该ROM可以是掩模编程的ROM、可编程ROM(ProgrammableRead-OnlyMemory,简称为PROM)、可擦除PROM(ErasableProgrammableRead-OnlyMemory,简称为EPROM)、电可擦除PROM(ElectricallyErasableProgrammableRead-OnlyMemory,简称为EEPROM)、电可改写ROM(ElectricallyAlterableRead-OnlyMemory,简称为EAROM)或闪存(FLASH)或者两个或更多个以上这些的组合。在合适的情况下,该RAM可以是静态随机存取存储器(StaticRandom-AccessMemory,简称为SRAM)或动态随机存取存储器(DynamicRandomAccessMemory,简称为DRAM),其中,DRAM可以是快速页模式动态随机存取存储器404(FastPageModeDynamicRandomAccessMemory,简称为FPMDRAM)、扩展数据输出动态随机存取存储器(ExtendedDateOutDynamicRandomAccessMemory,简称为EDODRAM)、同步动态随机存取内存(SynchronousDynamicRandom-AccessMemory,简称SDRAM)等。Wherein, thememory 404 may include amass memory 404 for data or instructions. For example without limitation, thememory 404 may include a hard disk drive (HardDiskDrive, referred to as HDD), a floppy disk drive, a solid state drive (SolidStateDrive, referred to as SSD), flash memory, optical disk, magneto-optical disk, magnetic tape or Universal Serial Bus (UniversalSerialBus, abbreviated as a USB) drive or a combination of two or more of the above.Storage 404 may include removable or non-removable (or fixed) media, where appropriate.Memory 404 may be internal or external to the data processing arrangement, where appropriate. In a particular embodiment,memory 404 is a non-volatile (Non-Volatile) memory. In a specific embodiment, thememory 404 includes a read-only memory (Read-Only Memory, ROM for short) and a random access memory (Random Access Memory, RAM for short). In appropriate cases, the ROM can be mask programmed ROM, programmable ROM (Programmable Read-Only Memory, referred to as PROM), erasable PROM (Erasable Programmable Read-Only Memory, referred to as EPROM), electrically erasable PROM (Electrically Erasable Programmable Read -Only Memory, referred to as EEPROM), electrically rewritable ROM (Electrically Alterable Read-Only Memory, referred to as EAROM) or flash memory (FLASH) or a combination of two or more of these. Under appropriate circumstances, the RAM can be a static random access memory (Static Random-Access Memory, referred to as SRAM) or a dynamic random access memory (Dynamic Random Access Memory, referred to as DRAM), wherein the DRAM can be a fast page mode dynamic random access Memory 404 (FastPageModeDynamicRandomAccessMemory, referred to as FPMDRAM), extended data output dynamic random access memory (ExtendedDateOutDynamicRandomAccessMemory, referred to as EDODRAM), synchronous dynamic random access memory (SynchronousDynamicRandom-AccessMemory, referred to as SDRAM), etc.

存储器404可以用来存储或者缓存需要处理和/或通信使用的各种数据文件,以及处理器402所执行的可能的计算机程序指令。Thememory 404 may be used to store or cache various data files required for processing and/or communication, and possibly computer program instructions executed by theprocessor 402 .

处理器402通过读取并执行存储器404中存储的计算机程序指令,以实现上述实施例中的任意一种针对web应用的自动更新方法。Theprocessor 402 reads and executes the computer program instructions stored in thememory 404 to implement any one of the methods for automatically updating web applications in the above embodiments.

可选地,上述电子装置还可以包括传输设备406以及输入输出设备408,其中,该传输设备406和上述处理器402连接,该输入输出设备408和上述处理器402连接。Optionally, the above-mentioned electronic device may further include atransmission device 406 and an input-output device 408 , wherein thetransmission device 406 is connected to the above-mentionedprocessor 402 , and the above-mentioned input-output device 408 is connected to the above-mentionedprocessor 402 .

传输设备406可以用来经由一个网络接收或者发送数据。上述的网络具体实例可包括电子装置的通信供应商提供的有线或无线网络。在一个实例中,传输设备包括一个网络适配器(Network Interface Controller,简称为NIC),其可通过基站与其他网络设备相连从而可与互联网进行通讯。在一个实例中,传输设备406可以为射频(Radio Frequency,简称为RF)模块,其用于通过无线方式与互联网进行通讯。Transmission device 406 may be used to receive or transmit data via a network. The specific example of the above network may include a wired or wireless network provided by the communication provider of the electronic device. In one example, the transmission device includes a network interface controller (NIC for short), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, thetransmission device 406 may be a radio frequency (Radio Frequency, RF for short) module, which is used to communicate with the Internet in a wireless manner.

输入输出设备408用于输入或输出信息。在本实施例中,输入的信息可以是自动化客户端的前端代码和脚本代码等,输出的信息可以是web应用的更新结果等。Input andoutput devices 408 are used to input or output information. In this embodiment, the input information may be the front-end code and script code of the automation client, and the output information may be the update result of the web application.

可选地,在本实施例中,上述处理器402可以被设置为通过计算机程序执行以下步骤:Optionally, in this embodiment, theprocessor 402 may be configured to execute the following steps through a computer program:

S101、基于selenium server脚本构建自动化客户端,基于selenium client脚本构建自动化服务端;S101, build an automation client based on the selenium server script, and build an automation server based on the selenium client script;

S102、用户在本地安装所述自动化客户端,并在所述自动化客户端中填入需更新的web应用的配置信息,在所述自动化服务端中设置监听器,通过监听的方式与所述自动化客户端建立websocket连接,自动化客户端通过websocket将所述web应用的配置信息发送到所述自动化服务端中;S102. The user installs the automation client locally, and fills in the configuration information of the web application to be updated in the automation client, sets a listener in the automation server, and communicates with the automation through monitoring. The client establishes a websocket connection, and the automation client sends the configuration information of the web application to the automation server through the websocket;

S103、所述自动化服务端判断所述自动化客户端是否正在运行,若所述自动化客户端正在运行,所述自动化服务端根据所述web应用的配置信息登录到对应的web应用,并持续获取所述web应用的更新信息,基于所述配置信息对所述web应用进行更新操作,若所述自动化客户端关闭,则所述自动化服务端每隔一段时间向所述自动化客户端发送心跳连接,直到所述自动化客户端与所述自动化服务端重新连接成功。S103. The automation server determines whether the automation client is running. If the automation client is running, the automation server logs in to the corresponding web application according to the configuration information of the web application, and continuously obtains the update information of the web application, update the web application based on the configuration information, if the automation client is closed, the automation server sends a heartbeat connection to the automation client at regular intervals until The automation client successfully reconnects with the automation server.

需要说明的是,本实施例中的具体示例可以参考上述实施例及可选实施方式中所描述的示例,本实施例在此不再赘述。It should be noted that, for specific examples in this embodiment, reference may be made to the examples described in the foregoing embodiments and optional implementation manners, and details will not be repeated in this embodiment.

通常,各种实施例可以以硬件或专用电路、软件、逻辑或其任何组合来实现。本发明的一些方面可以以硬件来实现,而其他方面可以以可以由控制器、微处理器或其他计算设备执行的固件或软件来实现,但是本发明不限于此。尽管本发明的各个方面可以被示出和描述为框图、流程图或使用一些其他图形表示,但是应当理解,作为非限制性示例,本文中描述的这些框、装置、系统、技术或方法可以以硬件、软件、固件、专用电路或逻辑、通用硬件或控制器或其他计算设备或其某种组合来实现。In general, the various embodiments may be implemented in hardware or special purpose circuits, software, logic or any combination thereof. Some aspects of the invention may be implemented in hardware, while other aspects may be implemented in firmware or software which may be executed by a controller, microprocessor or other computing device, although the invention is not limited thereto. Although various aspects of the present invention may be shown and described as block diagrams, flowcharts, or using some other graphical representation, it should be understood that, as non-limiting examples, these blocks, devices, systems, techniques or methods described herein may be presented in hardware, software, firmware, special purpose circuits or logic, general purpose hardware or controllers or other computing devices, or some combination thereof.

本发明的实施例可以由计算机软件来实现,该计算机软件由移动设备的数据处理器诸如在处理器实体中可执行,或者由硬件来实现,或者由软件和硬件的组合来实现。包括软件例程、小程序和/或宏的计算机软件或程序(也称为程序产品)可以存储在任何装置可读数据存储介质中,并且它们包括用于执行特定任务的程序指令。计算机程序产品可以包括当程序运行时被配置为执行实施例的一个或多个计算机可执行组件。一个或多个计算机可执行组件可以是至少一个软件代码或其一部分。另外,在这一点上,应当注意,如图4中的逻辑流程的任何框可以表示程序步骤、或者互连的逻辑电路、框和功能、或者程序步骤和逻辑电路、框和功能的组合。软件可以存储在诸如存储器芯片或在处理器内实现的存储块等物理介质、诸如硬盘或软盘等磁性介质、以及诸如例如DVD及其数据变体、CD等光学介质上。物理介质是非瞬态介质。Embodiments of the invention may be implemented by computer software executable by a data processor of a mobile device, such as in a processor entity, or by hardware, or by a combination of software and hardware. Computer software or programs (also referred to as program products) including software routines, applets and/or macros can be stored on any device-readable data storage medium and they include program instructions for performing certain tasks. A computer program product may include one or more computer-executable components configured to perform an embodiment when the program is run. One or more computer-executable components may be at least one software code or a portion thereof. Also in this regard, it should be noted that any blocks of the logic flow as in FIG. 4 may represent program steps, or interconnected logic circuits, blocks and functions, or a combination of program steps and logic circuits, blocks and functions. Software may be stored on physical media such as memory chips or memory blocks implemented within a processor, magnetic media such as hard or floppy disks, and optical media such as, for example, DVD and its data variants, CD. Physical media are non-transient media.

本领域的技术人员应该明白,以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。Those skilled in the art should understand that the various technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, all possible combinations of the various technical features in the above embodiments are not described. There is no contradiction in the combination, and all should be considered as within the scope of the description.

以上实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本申请范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请的保护范围应以所附权利要求为准。The above examples only express several implementation modes of the present application, and the description thereof is relatively specific and detailed, but should not be construed as limiting the scope of the present application. It should be noted that those skilled in the art can make several modifications and improvements without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be determined by the appended claims.

Claims (10)

Translated fromChinese
1.一种针对web应用的自动更新方法,其特征在于,包括以下步骤:1. An automatic update method for web applications, characterized in that, comprising the following steps:基于selenium server脚本构建自动化客户端,基于selenium client脚本构建自动化服务端;Build an automated client based on selenium server scripts, and an automated server based on selenium client scripts;用户在本地安装所述自动化客户端,并在所述自动化客户端中填入需更新的web应用的配置信息,在所述自动化服务端中设置监听器,通过监听的方式与所述自动化客户端建立websocket连接,自动化客户端通过websocket将所述web应用的配置信息发送到所述自动化服务端中;The user installs the automation client locally, and fills in the configuration information of the web application to be updated in the automation client, sets a listener in the automation server, and communicates with the automation client by monitoring Establish a websocket connection, and the automation client sends the configuration information of the web application to the automation server through the websocket;所述自动化服务端判断所述自动化客户端是否正在运行,若所述自动化客户端正在运行,所述自动化服务端根据所述web应用的配置信息登录到对应的web应用,并持续获取所述web应用的更新信息,基于所述配置信息对所述web应用进行更新操作,若所述自动化客户端关闭,则所述自动化服务端每隔一段时间向所述自动化客户端发送心跳连接,直到所述自动化客户端与所述自动化服务端重新连接成功。The automation server judges whether the automation client is running, if the automation client is running, the automation server logs in to the corresponding web application according to the configuration information of the web application, and continuously obtains the web application update information of the application, update the web application based on the configuration information, if the automation client is closed, the automation server sends a heartbeat connection to the automation client at regular intervals until the The automation client successfully reconnects with the automation server.2.根据权利要求1所述的一种针对web应用的自动更新方法,其特征在于,基于selenium server脚本、自动化脚本载体以及客户端执行环境构建自动化客户端,所述自动化客户端中的自动化脚本使用selenium规范基于selenium server进行编写,并通过websocket的方式进行启动,所述自动化服务端使用selenium规范基于selenium client进行编写。2. a kind of automatic update method for web application according to claim 1, is characterized in that, builds automation client based on selenium server script, automation script carrier and client execution environment, automation script in described automation client The selenium specification is used to write based on the selenium server, and is started by way of websocket, and the automation server is written using the selenium specification based on the selenium client.3.根据权利要求1所述的一种针对web应用的自动更新方法,其特征在于,在“用户在本地安装自动化客户端,并在所述自动化客户端中填入web应用的配置信息”步骤中,用户在所述自动化客户端中注册账号,所述自动化客户端通过http调用的方式获取用户注册的账号信息,所述web应用的配置信息包括所述web应用的账号密码以及更新方法。3. A method for automatically updating web applications according to claim 1, wherein in the step of "the user installs the automation client locally, and fills in the configuration information of the web application in the automation client" In the method, the user registers an account in the automation client, and the automation client obtains the account information registered by the user through http calling, and the configuration information of the web application includes the account password and update method of the web application.4.根据权利要求3所述的一种针对web应用的自动更新方法,其特征在于,根据用户的账号信息将用户分为普通用户和vip用户,针对所述普通用户和所述vip用户区别不同的更新方法。4. A method for automatically updating web applications according to claim 3, wherein users are divided into ordinary users and vip users according to their account information, and the difference between the ordinary users and the vip users is different update method.5.根据权利要求3述的一种针对web应用的自动更新方法,其特征在于,在“在所述自动化服务端中设置监听器,通过监听的方式与所述自动化客户端建立websocket连接”步骤中,当用户使用账号信息登录到所述自动化客户端,所述监听器监听到所述自动化客户端已经登录后与所述自动化客户端建立websocket连接。5. A kind of automatic update method for web application according to claim 3, it is characterized in that, in the step of "setting a listener in the automation server, and establishing a websocket connection with the automation client by monitoring" wherein, when the user logs in to the automation client using account information, the listener establishes a websocket connection with the automation client after detecting that the automation client has logged in.6.根据权利要求1所述的一种针对web应用的自动更新方法,其特征在于,在“所述自动化服务端根据所述web应用的配置信息登录到对应的web应用,并持续获取所述web应用的更新信息”步骤中,所述自动化服务端通过http调用的方式对所述web应用进行登录操作,并通过http调用所述web应用的更新接口来持续获取web应用的更新信息。6. A method for automatically updating web applications according to claim 1, characterized in that, in "the automation server logs in to the corresponding web application according to the configuration information of the web application, and continuously acquires the In the step of "updating information of the web application", the automation server performs a login operation on the web application through an http call, and calls the update interface of the web application through http to continuously obtain the update information of the web application.7.根据权利要求1所述的一种针对web应用的自动更新方法,其特征在于,在“所述自动化服务端判断所述自动化客户端是否正在运行”步骤中,在所述自动化服务端为每一所述自动化客户端设置状态位,当所述自动化客户端正在运行时,则正在运行的自动化客户端的状态位为true,当所述自动化客户端关闭时,则关闭的自动化客户端的状态位为false。7. A kind of automatic update method for web application according to claim 1, it is characterized in that, in " described automation server judges whether described automation client is running " step, in described automation server is Each described automation client is set status bit, when described automation client is running, then the status bit of the automation client that is running is true, when described automation client is closed, then the status bit of the automation client that closes is false.8.一种针对web应用的自动更新装置,其特征在于,包括:8. An automatic updating device for web applications, comprising:构建模块:基于selenium server脚本构建自动化客户端,基于seleniumclient脚本构建自动化服务端;Building modules: build an automated client based on selenium server scripts, and build an automated server based on seleniumclient scripts;连接模块:用户在本地安装所述自动化客户端,并在所述自动化客户端中填入需更新的web应用的配置信息,在所述自动化服务端中设置监听器,通过监听的方式与所述自动化客户端建立websocket连接,自动化客户端通过websocket将所述web应用的配置信息发送到所述自动化服务端中;Connection module: the user installs the automation client locally, and fills in the configuration information of the web application to be updated in the automation client, sets a listener in the automation server, and communicates with the The automation client establishes a websocket connection, and the automation client sends the configuration information of the web application to the automation server through the websocket;执行模块:所述自动化服务端判断所述自动化客户端是否正在运行,若所述自动化客户端正在运行,所述自动化服务端根据所述web应用的配置信息登录到对应的web应用,并持续获取所述web应用的更新信息,基于所述配置信息对所述web应用进行更新操作,若所述自动化客户端关闭,则所述自动化服务端每隔一段时间向所述自动化客户端发送心跳连接,直到所述自动化客户端与所述自动化服务端重新连接成功。Execution module: the automation server determines whether the automation client is running, if the automation client is running, the automation server logs in to the corresponding web application according to the configuration information of the web application, and continuously obtains The update information of the web application is based on the configuration information to update the web application, if the automation client is closed, the automation server sends a heartbeat connection to the automation client at regular intervals, until the automation client successfully reconnects with the automation server.9.一种电子装置,包括存储器和处理器,其特征在于,所述存储器中存储有计算机程序,所述处理器被设置为运行所述计算机程序以执行权利要求1-7任一所述的一种针对web应用的自动更新方法。9. An electronic device, comprising a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to perform any one of claims 1-7. An automatic update method for web applications.10.一种可读存储介质,其特征在于,所述可读存储介质中存储有计算机程序,所述计算机程序包括用于控制过程以执行过程的程序代码,所述过程包括根据权利要求1-7任一项所述的一种针对web应用的自动更新方法。10. A readable storage medium, characterized in that, a computer program is stored in the readable storage medium, and the computer program includes program codes for controlling a process to execute the process, and the process comprises the following steps according to claim 1- An automatic update method for web applications described in any one of 7.
CN202211399425.5A2022-11-092022-11-09Automatic updating method and device for web application and applicationPendingCN115766445A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202211399425.5ACN115766445A (en)2022-11-092022-11-09Automatic updating method and device for web application and application

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202211399425.5ACN115766445A (en)2022-11-092022-11-09Automatic updating method and device for web application and application

Publications (1)

Publication NumberPublication Date
CN115766445Atrue CN115766445A (en)2023-03-07

Family

ID=85368671

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202211399425.5APendingCN115766445A (en)2022-11-092022-11-09Automatic updating method and device for web application and application

Country Status (1)

CountryLink
CN (1)CN115766445A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN116962029A (en)*2023-07-072023-10-27北京中睿天下信息技术有限公司Reporting and issuing method among multiple nodes of safety alarm data

Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN107528762A (en)*2016-06-212017-12-29天脉聚源(北京)科技有限公司A kind of method and system of real-time update wechat web page contents
CN109582848A (en)*2018-11-292019-04-05北京腾云天下科技有限公司A kind of method and calculating equipment of the browser operation record obtaining user
US20190303274A1 (en)*2018-03-302019-10-03Atlassian Pty LtdSystems and methods for monitoring performance of applications
CN114528473A (en)*2021-12-302022-05-24苏州空天信息研究院Websocket-based information integration release method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN107528762A (en)*2016-06-212017-12-29天脉聚源(北京)科技有限公司A kind of method and system of real-time update wechat web page contents
US20190303274A1 (en)*2018-03-302019-10-03Atlassian Pty LtdSystems and methods for monitoring performance of applications
CN109582848A (en)*2018-11-292019-04-05北京腾云天下科技有限公司A kind of method and calculating equipment of the browser operation record obtaining user
CN114528473A (en)*2021-12-302022-05-24苏州空天信息研究院Websocket-based information integration release method and system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN116962029A (en)*2023-07-072023-10-27北京中睿天下信息技术有限公司Reporting and issuing method among multiple nodes of safety alarm data

Similar Documents

PublicationPublication DateTitle
US10802906B2 (en)Monitoring method and apparatus of server, and storage medium
US12412117B2 (en)Simulation modeling exchange
US10540174B2 (en)Managed multi-container builds
US10812566B2 (en)Distributed steam processing
US11196728B1 (en)Caching login sessions to access a software testing environment
US12108487B2 (en)Matching pipeline for a communication system
US10564987B1 (en)Efficient infrastructure updates for executable code development
CN110929202B (en)Page request failure processing method and device and computer equipment
US11165783B1 (en)Quantifying permissiveness of access control policies using model counting techniques and automated policy downscaling
CN105512029A (en)Method, server and system for testing intelligent terminal
US10545853B2 (en)Stateless debugging of a script injected into a web application that is located in a mult-node cloud system
CN111897564A (en)Application updating method and system
US10324706B1 (en)Automated software deployment for electromechanical systems
CN111083180B (en) Internet of things system, Internet of things equipment linkage method and device
US12411676B1 (en)Resource aware patching service
WO2020248727A1 (en)Management method and device for software module, and server
CN112527397A (en)Method and device for modifying basic input output system options and computer equipment
US10733036B2 (en)Programmatic implementations generated from an API call log
CN109547490B (en)Monitoring method, device and storage medium
CN115766445A (en)Automatic updating method and device for web application and application
US10705945B1 (en)Computing system testing service
US10635508B1 (en)Programmatic implementations generated by recording user actions via an ephemeral user account
CN114860394A (en)RPA system and method for simulating user behavior to maintain login state
US10055516B1 (en)Testing open mobile alliance server payload on an open mobile alliance client simulator
US10951738B1 (en)Automatic API integration

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
WD01Invention patent application deemed withdrawn after publication

Application publication date:20230307


[8]ページ先頭

©2009-2025 Movatter.jp