WO2020206907A1 - 应用程序备用页面切换方法、装置、计算机设备和存储介质 - Google Patents
应用程序备用页面切换方法、装置、计算机设备和存储介质 Download PDFInfo
- Publication number
- WO2020206907A1 WO2020206907A1 PCT/CN2019/102590 CN2019102590W WO2020206907A1 WO 2020206907 A1 WO2020206907 A1 WO 2020206907A1 CN 2019102590 W CN2019102590 W CN 2019102590W WO 2020206907 A1 WO2020206907 A1 WO 2020206907A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- page
- default
- loading
- default page
- address
- 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.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44521—Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
Definitions
- This application relates to a method, device, computer equipment, and storage medium for switching alternate pages of an application program.
- the application program usually has a backup page for the key business function modules during development.
- the default page of the business module is a native page (Native page)
- the H5 page with the same page content is developed as the backup page
- the default page of the business module is the H5 page
- the native page is developed as the backup page.
- a method, device, computer device, and storage medium for switching an application standby page are provided.
- a method for switching alternate pages of an application program including:
- An application program standby page switching device including:
- the sending module is used to obtain the page load request carrying the default page address
- a loading module configured to load the default page corresponding to the default page address to the default page server according to the page loading request
- a monitoring module configured to obtain a static mapping table if an abnormal loading of the default page is detected
- An obtaining module configured to obtain a spare page address corresponding to the default page address according to the static mapping table
- the loading module is further configured to load the backup page corresponding to the backup page address to the backup page server based on the backup page address.
- a computer device including a memory and one or more processors, the memory stores computer readable instructions, when the computer readable instructions are executed by the processor, the one or more processors execute The following steps:
- the sending module is used to obtain the page load request carrying the default page address
- a loading module configured to load the default page corresponding to the default page address to the default page server according to the page loading request
- a monitoring module configured to obtain a static mapping table if an abnormal loading of the default page is detected
- An obtaining module configured to obtain a spare page address corresponding to the default page address according to the static mapping table
- the loading module is further configured to load the backup page corresponding to the backup page address to the backup page server based on the backup page address.
- One or more non-volatile storage media storing computer-readable instructions.
- the computer-readable instructions When executed by one or more processors, the one or more processors perform the following steps:
- the sending module is used to obtain the page load request carrying the default page address
- a loading module configured to load the default page corresponding to the default page address to the default page server according to the page loading request
- a monitoring module configured to obtain a static mapping table if an abnormal loading of the default page is detected
- An obtaining module configured to obtain a spare page address corresponding to the default page address according to the static mapping table
- the loading module is further configured to load the backup page corresponding to the backup page address to the backup page server based on the backup page address.
- Fig. 1 is an application scenario diagram of a method for switching alternate pages of an application according to one or more embodiments.
- Fig. 2 is a schematic flowchart of a method for switching an application standby page according to one or more embodiments.
- FIG. 3 is a schematic flowchart of the step of obtaining a static mapping table if an abnormal loading of the default page is detected according to one or more embodiments.
- Fig. 4 is a schematic flowchart of a method for switching an application standby page in another embodiment.
- Fig. 5 is a block diagram of an apparatus for switching an application standby page according to one or more embodiments.
- Figure 6 is a block diagram of a computer device according to one or more embodiments.
- the application standby page switching method provided in this application can be applied to the application environment as shown in FIG. 1.
- the user terminal 102 communicates with the default page server 104 through the network, and the user terminal 102 communicates with the backup page server 106 through the network.
- the user terminal 102 obtains the page load request carrying the default page address; the user terminal 102 loads the default page corresponding to the default page address to the default page server 104 according to the page load request; if the user terminal 102 detects that the default page load is abnormal, it obtains the static Mapping table; the user terminal 102 obtains the spare page address corresponding to the default page address according to the static mapping table; the user terminal 102 loads the spare page corresponding to the spare page address to the spare page server 106 based on the spare page address.
- the user terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablets, and portable wearable devices.
- the default server 104 and the backup page server 106 can be independent servers or a server cluster composed of multiple
- a method for switching an application standby page is provided. Taking the method applied to the user terminal 102 in FIG. 1 as an example for description, the method includes the following steps:
- Step S202 Obtain a page loading request carrying a default page address.
- a page loading request refers to a request to open a certain page of a business module in response to a user's operation in the application.
- the default page address is the page address of a certain page opened by the user operating the application.
- the default page type can be native page or H5 page depending on the type of application.
- the types of applications include Web App (Web-based application), Hybrid App (hybrid mobile application) and Native App (native app).
- the default page of the Web App is the H5 page
- the default page of the Hybrid App can be either the H5 page or the native page.
- the default page of the Native App is the native page.
- the user terminal automatically obtains the default page address entered by the user, and at the same time generates a page load request in response to user operations, and carries the default page address entered by the user in In the page loading request, the default page is subsequently loaded to the default page server corresponding to the default page address through the page load.
- the way to open the default page only requires the user to click on the control corresponding to the default page in the application by touching the screen or keying
- the user terminal is automatically triggered to obtain the default page address bound to the control in advance, and
- a page load request is generated in response to the user's click operation, and the pre-bound default page address is carried in the page load request, and then the default page is loaded to the default page server corresponding to the default page address through the page load.
- Step S204 according to the page loading request, load the default page corresponding to the default page address to the default page server.
- the default page server refers to a server that can respond to the default page loading request.
- the user terminal obtains the page loading request carrying the default page address through the user's operation of the application program, the user terminal sends the page loading request to the corresponding default page server.
- the default page corresponding to the carried default page address is loaded to the default page server.
- the default page server responds to the page loading request, and obtains the corresponding default page data packet according to the default page address.
- the default page server returns the default page data package to the user terminal, the user terminal loads the received default page data package to obtain the page content of the default page, and displays the page content obtained by loading on the user terminal connected On the display device.
- step S206 if an abnormal loading of the default page is detected, a static mapping table is obtained.
- Loading abnormality refers to the error condition that occurs when obtaining page content, including the user terminal cannot obtain the default page data package returned by the default server, or the user terminal obtains the default page data package returned by the default server, but after loading and parsing the data package Parsing errors or failures occurred during the process of the default page data packet.
- the static mapping table refers to the mapping relationship table between the default page address and the alternate page address of the business module with alternate pages in the application.
- the page monitoring function is started.
- the user terminal detects an abnormal loading of the default page during the monitoring process, it initiates a switching mechanism from the default page to the backup page, and the user terminal obtains the static mapping table according to the switching mechanism.
- the static mapping table can be pre-stored in the local database or configuration file of the user terminal through the mapping relationship between the default page address and the alternate page address set by the developer in advance.
- the switching mechanism is the logical task of switching the default page to the standby page. For example, if the default page is an H5 page, it will be switched to a native page set by the H5 page as a backup. If the default page is a native page, it will switch to the alternate H5 page set by the native page.
- Step S208 Obtain the alternate page address corresponding to the default page address according to the static mapping table.
- Step S210 based on the backup page address, load the backup page corresponding to the backup page address to the backup page server.
- the alternate page server is a server that can respond to the alternate page loading request.
- the user terminal 102 uses the mapping relationship between the default page address and the backup page address stored in the static mapping table to find the backup page address corresponding to the abnormally loaded default page address, and sends the backup page address to the backup page server.
- the backup server receives the backup page address sent by the user terminal, it obtains the corresponding backup page data packet according to the backup page address and feeds it back to the user terminal.
- the user terminal obtains the backup page by loading the backup page data package, and displays the backup page on the display device of the user terminal, which completes the switching of the application program backup page.
- the servers of the default page and the backup page are independent of each other, and not using the same server is to avoid the situation that the two cannot be used at the same time when the server fails.
- the above method for switching alternate pages of the application program firstly, by acquiring the page load request carrying the default page address, load the default page corresponding to the default page address to the default page server according to the page load request and perform real-time monitoring during the process of loading the default page. Ensure the smooth progress of page loading. If it is detected that the current default page loading is abnormal, the static mapping table is obtained. The alternate page address is obtained according to the static mapping table, and the alternate page corresponding to the alternate page address is loaded to the alternate page server based on the alternate page address, so that the alternate page is automatically switched when the business function module of the application is abnormal, without manual intervention, and is timely and effective Complete the page switching to ensure the normal use of the program.
- obtaining the static mapping table includes the following steps:
- Step S302 Obtain the abnormal type of the default page loading abnormality.
- the page loading exception types of native pages include: null pointer, array out of bounds, network failure, etc.
- the page loading exception types of H5 pages include: 403 error (access to the server is forbidden), 404 error (file or directory not found by the server), 501-505 error (server internal error), etc.
- the abnormal information is acquired. Determine the type of loading exception based on the exception information. For example, if the default page is an H5 page, when the user terminal requests the default page server to load the H5 page corresponding to the default page address, it is detected that the page loading is abnormal. And the exception information is "HTTP Error 403-forbidden", then the exception type of the loading exception is directly determined as the 403 error through the exception information.
- Step S304 judging whether the preset switching condition is met according to the abnormal type.
- the switching condition is a pre-set rule that determines whether to switch the default page to the backup page.
- the switching condition includes the exception type when the page loading is abnormal, and whether the exception type when the page loading exception occurs belongs to the abnormal type in the switching condition to determine whether to switch the alternate page.
- the pre-stored switching condition is obtained. Check whether the currently occurring exception type is included from the exception types included in the switching condition. If the current abnormality type has the same abnormality type in the switching condition, it means that the abnormality type meets the preset switching condition, and the alternate page can be switched. If the currently occurring exception type does not have the same exception type in the switching condition, it means that the currently occurring exception type does not meet the preset switching condition, and the standby page switching is not performed.
- Step S306 if it is satisfied, obtain a static mapping table.
- the static mapping table is acquired. Look up from the static mapping table to obtain the alternate page address corresponding to the default page address where the loading exception occurs. Based on the alternate page address, request the alternate page server to load the alternate page.
- a loading abnormality it is determined whether the switching condition is satisfied according to the abnormal type, and not only the switching reason is recorded for subsequent developers to adjust, but also the accuracy of the switching is ensured.
- before obtaining the abnormal type of the page loading abnormality it includes: obtaining the physical device identification, obtaining the corresponding physical device working state value according to the physical device identification; determining whether the physical network is turned on according to the physical device working state value; if the physical network is turned on, Then obtain the exception type of the page loading exception.
- the physical identification is a number or symbol used to distinguish and identify different physical devices.
- the physical device refers to the device that connects the hard disk to the system, including hosts, routers, and switches.
- a physical network is a network formed by connecting various physical devices and media (optical cables, cables, twisted pairs, etc.) in the network.
- the working state value refers to a logical value used to prompt the working state of a physical device.
- the page when the page is loaded abnormally, first obtain the physical identifiers of all physical devices connected to the user terminal system. Obtain the working status value of the corresponding physical device according to the physical identifier, and confirm whether the physical device is on the physical network or the physical network is in an available state according to the working status value. If the working status values of all physical devices indicate that the physical network is turned on and in an available state, it means that the page loading abnormality is not caused by the local device, but caused by the server corresponding to the page, and the abnormal type of the loading abnormality can be obtained. The alternate page switch is performed after the condition is determined according to the abnormal type.
- the working state value of a physical device includes but is not limited to power state value, system state value, wide area network state value, local area network state value, wireless state value, etc., as long as it can indicate the working condition of the physical device.
- the working status value is represented by logic values 0, 1, and 2
- 0 means the indicator light is always off
- 1 means the indicator light is always on
- 2 means the indicator light is flashing.
- the power state value of 1 indicates that the power of the physical device is normal
- the power state of 0 indicates that the power of the physical device is not powered on.
- a system status value of 0 means that the physical equipment system is faulty, if the system status value is 1, it means that the physical equipment system is initializing failure, and if the system status value is 2, it means that the physical equipment system is normal.
- a WAN status value of 0 indicates that the physical device network is not successfully connected
- a WAN status value of 1 indicates that the connection is successful but there is no corresponding data legend
- a WAN status value of 2 indicates that the connection is successful and there is data transmission, etc.
- the abnormal page loading is not only caused by an error in the connection between the server and the terminal, but may also be caused by a failure of the local physical device. Therefore, before switching the backup page, verify whether the physical network of the local physical device is turned on normally, so as to avoid blind switching, which may make it impossible to determine the true cause of the abnormal page loading.
- the corresponding preset prompt information is obtained according to the physical identifier; the user is instructed to turn on the physical network according to the preset prompt information.
- the prompt information is information preset and stored locally to prompt the user to perform a corresponding operation. Since each physical device is different, the working state value of different physical devices is different, and the working state value of the failure is also random and undecidable, so different prompt messages are set in advance for various situations.
- the corresponding prompt information when the physical network is not turned on is obtained according to the identification of the physical device and the faulty working state value. For example, if the power working status value of the router is 0, it can be determined that the power of the router is not turned on, and the corresponding prompt message is "Please turn on the power of the router". If there is no other situation when the user passes the prompt message The requested page can be loaded by turning on the power of the router and working normally. Then the prompt message "Please turn on the power of the router" is displayed on the display device of the user terminal to prompt the user to turn on the power of the router.
- the loading abnormality is caused by a physical device, the user is prompted to make changes through a preset prompt to avoid blind switching, and the real cause of the loading abnormality is determined.
- step S210 based on the alternate page address, after loading the alternate page corresponding to the alternate page address to the alternate page server, the method further includes:
- step S212 if an abnormal loading of the backup page is detected, the page loading request is interrupted until the page loading request carrying the new default page address is obtained again.
- Step S214 Reload the default page corresponding to the new default page address to the default page server according to the page loading request. And return to step S206 to monitor the loading of the default page
- Interrupting the page loading request is the end of the page loading request that instructs to load the open page. And, prompt the user to choose to reopen the page or confirm to end this operation. If the user decides to end this operation, the end page loading will display a blank page on the user terminal. If the user chooses to reopen the page, the user performs page operations on the terminal again to generate a page loading request carrying a new default page address. The user terminal loads the default page corresponding to the default page address to the default server according to the acquired new page loading request. When the default page corresponding to the new default page address is loaded, return to step S206 to monitor the default page loading condition.
- the loading situation of the backup page is monitored at the same time, when the backup page also has a loading exception, the current page loading request is completely stopped and interrupted, the backup page is not switched, and the default page is not returned to continue loading. Avoid the infinite loop of page loading. Only when the user continues to operate the page content of the default page is reloaded by obtaining a new page load request.
- the steps before obtaining the page load request carrying the default page address, the steps include: obtaining the startup instruction of the application program, and sending the startup instruction to the default page server; receiving the latest application program returned by the default page server in response to the startup instruction Version number: Get the current version number of the application, compare the latest version number and the current version number to determine whether the application needs to be updated; if so, update the application and the corresponding static mapping table.
- the start instruction refers to a request from a user to instruct the user terminal to start an application program through an operation. Since the application is continuously updated, the latest version number refers to the version number of the application that is updated to the current latest version. The current version number refers to the version number of the application program used locally on the user terminal.
- the corresponding application program needs to be started before the user requests to open the page, and when the user clicks the application program icon, the startup instruction is generated.
- the startup instruction is sent to the default server, and the default server obtains the latest version number of the application corresponding to the startup instruction and returns it to the user terminal.
- the user terminal obtains the current version number of the local version of the application, and compares the latest version number with the local version number. If the local version number is equal to the latest version number, it means that the local application is the latest version, with the latest default page and the backup page information corresponding to the default page.
- the local version number is less than the latest version number, it means that the local application is an old version, which means that the default page of the local application and the alternate page corresponding to the default page may have increased or decreased changes. Therefore, when the local version number is less than the latest version number, the update condition is met, that is, the local application is updated to the latest version, and the static mapping table corresponding to the application is simultaneously updated. In this embodiment, the information of the latest default page and the corresponding backup page is guaranteed by updating.
- the step of loading the backup page corresponding to the backup page address to the backup page server based on the backup page address it further includes the step of: acquiring switching information, the switching information includes page information of the current page, and the type of abnormal loading exception And switching time; log files are generated according to the switching information and sent to the default page server.
- the page information of the current page is the standby page information after switching to the standby page.
- the exception type of the loading exception is the exception type determined according to the exception information when the exception is loaded.
- the switching time is the system time when the default page is switched to the backup page.
- Log file generation can be obtained by obtaining a log file template stored locally, inputting switching information into the log file template according to the log file template to generate a log file, and naming the log file according to the current system time and date.
- the log file can be sent to the default server in real time, or it can be sent to the default server at a preset time after collecting multiple log files.
- the log file is generated by switching information and reported to the default server, so that the developer can solve the defect fault of the server in time according to the information.
- an apparatus for switching an application backup page which includes: a sending module 502, a loading module 504, a monitoring module 506, and an acquiring module 508,
- the sending module 502 is used to obtain a page loading request carrying a default page address.
- the loading module 504 is configured to load the default page corresponding to the default page address to the default page server according to the page loading request.
- the monitoring module 506 is configured to obtain a static mapping table if an abnormal loading of the default page is detected.
- the obtaining module 508 is configured to obtain the alternate page address corresponding to the default page address according to the static mapping table.
- the loading module 504 is also configured to load the backup page corresponding to the backup page address to the backup page server based on the backup page address.
- the monitoring module 506 is also used to obtain the abnormal type of the default page load abnormality; determine whether the preset switching condition is satisfied according to the abnormal type; if it is satisfied, obtain the static mapping table.
- the device for switching the standby page of the application further includes a judging module, which is used to obtain the identification of the physical device, and obtain the working state value of the corresponding physical device according to the physical device identification; determine whether the physical network is on according to the working state value of the physical device; When the network is turned on, the exception type of the page loading exception is obtained.
- a judging module which is used to obtain the identification of the physical device, and obtain the working state value of the corresponding physical device according to the physical device identification; determine whether the physical network is on according to the working state value of the physical device; When the network is turned on, the exception type of the page loading exception is obtained.
- the judging module is further configured to obtain corresponding preset prompt information according to the physical identifier if the physical network is not turned on; and instruct the user to turn on the physical network according to the preset prompt information.
- the loading module 504 is further configured to interrupt the page loading request if an abnormality in the loading of the backup page is detected, until the page loading request carrying the new default page address is re-acquired; according to the page loading request, it will retransmit to the default page server Load the default page corresponding to the new default page address.
- the device for switching an application standby page further includes an update module for obtaining a startup instruction of the application, and sending the startup instruction to the default page server; receiving the latest version of the application returned by the default page server in response to the startup instruction Number; Get the current version number of the application, compare the latest version number and the current version number to determine whether the application needs to be updated; if so, update the application and the corresponding static mapping table.
- the application standby page switching device further includes a generating module for acquiring switching information, the switching information includes page information of the current page, the abnormal type of loading exception, and the switching time; the log file is generated according to the switching information and sent to The default page server.
- Each module in the above application standby page switching device can be implemented in whole or in part by software, hardware, and a combination thereof.
- the foregoing modules may be embedded in the form of hardware or independent of the processor in the computer device, or may be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the foregoing modules.
- a computer device is provided.
- the computer device may be a terminal, and its internal structure diagram may be as shown in FIG. 6.
- the computer equipment includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus.
- the processor of the computer device is used to provide calculation and control capabilities.
- the memory of the computer device includes a non-volatile storage medium and an internal memory.
- the non-volatile storage medium stores an operating system and computer readable instructions.
- the internal memory provides an environment for the operation of the operating system and computer-readable instructions in the non-volatile storage medium.
- the network interface of the computer device is used to communicate with an external terminal through a network connection.
- the display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen
- the input device of the computer equipment can be a touch layer covered on the display screen, or it can be a button, a trackball or a touchpad set on the housing of the computer equipment , It can also be an external keyboard, touchpad, or mouse.
- FIG. 6 is only a block diagram of part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied.
- the specific computer device may Including more or fewer parts than shown in the figure, or combining some parts, or having a different arrangement of parts.
- a computer device includes a memory and one or more processors.
- the memory stores computer readable instructions.
- the one or more processors execute the following steps:
- the alternate page corresponding to the alternate page address is loaded to the alternate page server.
- One or more non-volatile storage media storing computer-readable instructions.
- the computer-readable instructions When executed by one or more processors, the one or more processors perform the following steps:
- the alternate page corresponding to the alternate page address is loaded to the alternate page server.
- Non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
- Volatile memory may include random access memory (RAM) or external cache memory.
- RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Channel (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
- SRAM static RAM
- DRAM dynamic RAM
- SDRAM synchronous DRAM
- DDRSDRAM double data rate SDRAM
- ESDRAM enhanced SDRAM
- SLDRAM synchronous chain Channel
- memory bus Radbus direct RAM
- RDRAM direct memory bus dynamic RAM
- RDRAM memory bus dynamic RAM
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Information Transfer Between Computers (AREA)
Abstract
一种应用程序备用页面切换方法,包括:获取携带有默认页面地址的页面加载请求;根据页面加载请求,向默认页面服务器加载默认页面地址对应的默认页面;若监测到默认页面加载异常,则获取静态映射表;根据静态映射表获取默认页面地址对应的备用页面地址;基于备用页面地址,向备用页面服务器加载与备用页面地址对应的备用页面。
Description
相关申请的交叉引用
本申请要求于2019年04月12日提交中国专利局,申请号为2019102956578,申请名称为“应用程序备用页面切换方法、装置、计算机设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及一种应用程序备用页面切换方法、装置、计算机设备和存储介质。
随着智能移动终端的普及和快速发展,安装在智能移动终端的应用程序(APP,Application)呈爆发式增长,成为人们生活必不可少的工具。为了应用程序的使用稳定,应用程序在开发时对于关键的业务功能模块通常为设置了备用页面。例如,业务模块默认页面为原生页面(Native页面)时,开发相同页面内容的H5页面作为备用页面,业务模块默认页面为H5页面时,开发原生页面作为备用页面。当业务模块不能正常加载出现故障时,切换启用备用页面加载获取页面模块的页面内容,以使应用程序正常使用。
然而,发明人意识到,传统应用程序的备用页面切换是需要人为在后端配置,更改参数。因此经常导致由于未能及时有效地更改而使得应用程序出现不能正常使用的情况。
发明内容
根据本申请公开的各种实施例,提供一种应用程序备用页面切换方法、 装置、计算机设备和存储介质。
一种应用程序备用页面切换方法,包括:
获取携带有默认页面地址的页面加载请求;
根据所述页面加载请求,向默认页面服务器加载所述默认页面地址对应的默认页面;
若监测到所述默认页面加载异常,则获取静态映射表;
根据所述静态映射表获取所述默认页面地址对应的备用页面地址;及
基于所述备用页面地址,向备用页面服务器加载与所述备用页面地址对应的备用页面。
一种应用程序备用页面切换装置,包括:
发送模块,用于获取携带有默认页面地址的页面加载请求;
加载模块,用于根据所述页面加载请求,向默认页面服务器加载所述默认页面地址对应的默认页面;
监测模块,用于若监测到所述默认页面加载异常,则获取静态映射表;
获取模块,用于根据所述静态映射表获取所述默认页面地址对应的备用页面地址;及
所述加载模块还用于基于所述备用页面地址,向备用页面服务器加载与所述备用页面地址对应的备用页面。
一种计算机设备,包括存储器和一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述一个或多个处理器执行以下步骤:
发送模块,用于获取携带有默认页面地址的页面加载请求;
加载模块,用于根据所述页面加载请求,向默认页面服务器加载所述默认页面地址对应的默认页面;
监测模块,用于若监测到所述默认页面加载异常,则获取静态映射表;
获取模块,用于根据所述静态映射表获取所述默认页面地址对应的备用页面地址;及
所述加载模块还用于基于所述备用页面地址,向备用页面服务器加载与所述备用页面地址对应的备用页面。
一个或多个存储有计算机可读指令的非易失性存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:
发送模块,用于获取携带有默认页面地址的页面加载请求;
加载模块,用于根据所述页面加载请求,向默认页面服务器加载所述默认页面地址对应的默认页面;
监测模块,用于若监测到所述默认页面加载异常,则获取静态映射表;
获取模块,用于根据所述静态映射表获取所述默认页面地址对应的备用页面地址;及
所述加载模块还用于基于所述备用页面地址,向备用页面服务器加载与所述备用页面地址对应的备用页面。
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征和优点将从说明书、附图以及权利要求书变得明显。
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。
图1为根据一个或多个实施例中应用程序备用页面切换方法的应用场景图。
图2为根据一个或多个实施例中应用程序备用页面切换方法的流程示意图。
图3为根据一个或多个实施例中若监测到默认页面加载异常,则获取静态映射表步骤的流程示意图。
图4为另一个实施例中应用程序备用页面切换方法的流程示意图。
图5为根据一个或多个实施例中应用程序备用页面切换装置的框图。
图6为根据一个或多个实施例中计算机设备的框图。
为了使本申请的技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本申请提供的应用程序备用页面切换方法,可以应用于如图1所示的应用环境中。用户终端102通过网络与默认页面服务器104进行通信,用户终端102通过网络与备用页面服务器106进行通信。用户终端102获取携带有默认页面地址的页面加载请求;用户终端102根据页面加载请求,向默认页面服务器104加载默认页面地址对应的默认页面;用户终端102若监测到默认页面加载异常,则获取静态映射表;用户终端102根据静态映射表获取默认页面地址对应的备用页面地址;用户终端102基于备用页面地址,向备用页面服务器106加载与备用页面地址对应的备用页面。用户终端102可以但不限于是各种个人计算机、笔记本电脑、智能手机、平板电脑和便携式可穿戴设备,默认服务器104和备用页面服务器106可以用独立的服务器或者是多个服务器组成的服务器集群来实现。
在一些实施例中,如图2所示,提供了一种应用程序备用页面切换方法,以该方法应用于图1中的用户终端102为例进行说明,包括以下步骤:
步骤S202,获取携带有默认页面地址的页面加载请求。
页面加载请求是指响应用户在应用程序的操作打开业务模块的某一个页面的请求。默认页面地址即为通过用户操作应用程序被打开的某一个页面的页面地址。默认页面类型根据应用程序的类型可以为原生页面,也可以为H5页面。应用程序的类型包括Web App(基于Web的应用程序)、Hybrid App(混合模式移动应用)以及Native App(原生app)。Web App的默认页面为H5页面,Hybrid App的默认页面可以为H5页面,也可以为原生页面,Native App 的默认页面即为原生页面。
具体地,当用户在用户终端通过触屏或者键控在应用程序界面操作打开任意一个默认页面时,若打开默认页面的方式是需要输入该默认页面的默认页面地址,则当用户在应用程序的地址栏完成默认页面地址的输入并点击确定或者跳转按钮后,用户终端自动获取用户所输入的默认页面地址,并且同时响应用户操作生成页面加载请求,并将用户所输入的默认页面地址携带在页面加载请求中,后续通过该页面加载向默认页面地址对应的默认页面服务器加载默认页面。若打开默认页面方式只需要用户通过触屏或者键控点击应用程序中该默认页面对应的控件,则当用户点击该控件后,自动触发用户终端获取预先为该控件绑定的默认页面地址,并且同时响应用户点击操作生成页面加载请求,并将该预先绑定的默认页面地址携带在页面加载请求中,后续通过该页面加载向默认页面地址对应的默认页面服务器加载默认页面。
步骤S204,根据页面加载请求,向默认页面服务器加载默认页面地址对应的默认页面。
默认页面服务器是指能够响应该默认页面加载请求的服务器。当用户终端通过用户在应用程序的操作下获取到携带有默认页面地址的页面加载请求时,用户终端将该页面加载请求发送至对应的默认页面服务器。根据该页面加载请求,向默认页面服务器加载所携带的默认页面地址对应的默认页面。
具体地,默认页面服务器接收到页面加载请求后,响应页面加载请求,并根据默认页面地址获取对应的默认页面数据包。默认页面服务器将该默认页面数据包返回给用户终端,用户终端将所接收到的默认页面数据包进行加载,得到默认页面的页面内容,并将加载获得的页面内容进行显示在用户终端所连接的显示装置上。
步骤S206,若监测到默认页面加载异常,则获取静态映射表。
加载异常是指获取页面内容时所出现的错误情况,包括用户终端无法获取到默认服务器返回的默认页面数据包,或者是用户终端获取到默认服务器返回的默认页面数据包后,但是在加载解析该默认页面数据包的过程中出现 解析错误或者失败等情况。静态映射表是指应用程序中具有备用页面的业务模块的默认页面地址和备用页面地址的映射关系表。
具体地,用户终端向默认页面服务器发送页面加载请求后,即启动页面监测功能。当用户终端在监控的过程中检测到出现默认页面加载异常的情况,则启动从默认页面切换为备用页面的切换机制,用户终端根据切换机制获取静态映射表。静态映射表可以通过开发人员预先设定好默认页面地址和备用页面地址的映射关系,预存在用户终端的本地数据库中或者配置文件中。切换机制即为将默认页面切换为备用页面的逻辑任务。例如,若默认页面为H5页面,则将切换成为该H5页面所设定备用的原生页面。若默认页面为原生页面,则将切换成为该原生页面所设定备用的H5页面。
步骤S208,根据静态映射表获取默认页面地址对应的备用页面地址。
步骤S210,基于备用页面地址,向备用页面服务器加载与备用页面地址对应的备用页面。
备用页面服务器即为能够响应该备用页面加载请求的服务器。具体地,用户终端102通过静态映射表中存储的默认页面地址与备用页面地址的映射关系,从中查找加载异常的默认页面地址对应的备用页面地址,并将备用页面地址发送至备用页面服务器。当备用服务器接收到用户终端发送的备用页面地址后,根据该备用页面地址获取对应的备用页面数据包反馈给用户终端。用户终端通过加载备用页面数据包获取得到备用页面,并将备用页面显示在用户终端的显示装置上,即完成了应用程序备用页面的切换。在本实施例中,默认页面与备用页面的服务器相互独立,不使用相同服务器则是为了避免当服务器出现故障时两者同时不能使用的情况
上述应用程序备用页面切换方法,首先通过获取的携带有默认页面地址的页面加载请求,根据页面加载请求向默认页面服务器加载默认页面地址对应的默认页面并且再加载默认页面过程中实时进行监测,从而保证页面加载的顺利进行。若监测得到当前默认页面加载出现异常,则获取静态映射表。根据静态映射表获取备用页面地址,基于备用页面地址向备用页面服务器加 载备用页面地址对应的备用页面,从而实现在应用程序的业务功能模块异常时自动进行备用页面的切换,无需人工干预,及时有效的完成页面切换以确保程序正常使用。
在一些实施例中,如图3所示,若监测到默认页面加载异常,则获取静态映射表包括以下步骤:
步骤S302,获取默认页面加载异常的异常类型。
不同的页面出现加载异常时有不同的异常类型。原生页面的页面加载异常类型包括:空指针、数组越界、网络无法连接等。而H5页面的页面加载异常类型则包括:403错误(服务器禁止访问)、404错误(服务器未找到文件或目录)、501-505错误(server内部错误)等。
具体地,由于当页面加载异常时会有对应的异常信息,则当用户终端向对应服务器请求加载页面时,若监测到页面加载异常,则获取异常信息。根据异常信息确定加载异常的类型。例如,若默认页面为H5页面,当用户终端向默认页面服务器请求加载默认页面地址对应的H5页面时被监测到页面加载出现异常。且异常信息为“HTTP错误403-forbidden”,则通过该异常信息直接确定加载异常的异常类型为403错误。
步骤S304,根据异常类型判断是否满足预设的切换条件。
切换条件是预先设置决定是否进行默认页面切换为备用页面的规则。切换条件则包括了页面加载异常时的异常类型,则当出现页面加载异常时的异常类型是否属于切换条件中的异常类型来判定是否进行备用页面切换。
具体地,当用户终端根据异常信息得到当前出现的异常类型后,获取预存的切换条件。从切换条件中包括的异常类型中查找是否包括当前出现的异常类型。若当前出现的异常类型在切换条件中有相同的异常类型,则表示该异常类型满足预设的切换条件,可以进行备用页面的切换。若当前出现的异常类型在切换条件中没有相同的异常类型,则表示当前出现的异常类型不满足预设的切换条件,则不进行备用页面切换。
步骤S306,若满足,则获取静态映射表。
具体地,当根据预设的切换条件判定当前出现的异常类型满足切换要求,则获取静态映射表。从静态映射表中查找获取出现加载异常的默认页面地址所对应的备用页面地址。基于该备用页面地址向备用页面服务器请求加载备用页面。在本实施例中,当出现加载异常的情况时,根据异常类型确定是否满足切换条件,不仅记录下切换原因供后续开发人员进行调整还保证了切换的准确性。
在一些实施例中,获取页面加载异常的异常类型之前包括:获取物理设备标识,根据物理设备标识获取对应物理设备工作状态值;根据物理设备工作状态值确定物理网络是否开启;若物理网络开启,则获取页面加载异常的异常类型。
物理标识是用于分辨识别不同物理设备所设定的编号或者符号。物理设备是指硬盘与系统连接的设备,包括主机、路由器以及交换机等。物理网络则是在网络中有各种物理设备和介质(光缆、电缆以及双绞线等)连接起来形成的网络。工作状态值是指用于提示物理设备工作状态的逻辑值。
具体地,当页面加载异常时,首先获取与用户终端系统所连接的所有的物理设备的物理标识。根据物理标识去获取对应物理设备的工作状态值,根据工作状态值确认该物理设备是否开启物理网络或者物理网络处于可用状态。若所有物理设备的工作状态值均表示物理网路开启且处于可用状态,则表示页面加载出现异常不是本地设备造成的,而是页面对应的服务器所造成的,则可以获取加载异常的异常类型,根据异常类型判定满足条件后进行备用页面切换。物理设备的工作状态值包括但不限于电源状态值、系统状态值、广域网状态值、局域网状态值以及无线状态值等等,只要能表示物理设备工作情况的均可以。
例如,假设工作状态值用逻辑值0、1和2表示,0表示指示灯常灭、1表示指示灯常亮、2表示指示灯闪烁。而电源状态值为1则表示物理设备的电源正常,电源状态至为0则表示物理设备的电源未通电。系统状态值为0则表示物理设备系统存在故障、若系统状态值为1则表示物理设备系统初始 化故障、若系统状态值为2则表示物理设备系统正常。以及广域网状态值为0则表示物理设备网络未连接成功、广域网状态值为1则表示连接成功但是没有相应数据传说、广域网状态值为2则表示连接成功且有数据传输等等。则当确定异常类型之前所获取的标识A为路由器的物理标识,则根据标识A获取到路由器的电源状态值、系统状态值、广域网状态值等等,根据不同状态值确定路由器电源、系统、广域网等是否均开启且正常工作。只有物理设备所有的状态值处于正常开启工作状态才能判定该物理设备的物理网络没用问题。在本实施例中,由于造成页面加载异常不仅仅只是服务器与终端连接出错,还可能是本地的物理设备的故障所造成。因此,在切换备用页面之前验证确定本地的物理设备的物理网络是否开启正常,避免盲目切换而导致无法确定页面加载异常的真实原因。
在一些实施例中,若物理网络没有开启,则根据物理标识获取对应的预设提示信息;根据预设提示信息指示用户开启物理网络。
提示信息为预先设定存储在本地用于提示用户进行相应操作的信息。而由于每个物理设备不同,不同物理设备的工作状态值不同,且出现故障的工作状态值也是随机不可定的,因此预先各种情况设定不同的提示信息。
具体地,当根据工作状态值确定用户物理网络没开启时,则根据物理设备的标识和故障工作状态值获取物理网络没有开启时对应的提示信息。例如,若通过获取路由器的电源工作状态值为0,则可以确定路由器的电源没有接通,则获取对应的提示信息为“请接通路由器电源”,若在没有其他情况下当用户通过提示信息打开路由器电源进行正常工作就可以加载得到所请求的页面。则将提示信息为“请接通路由器电源”显示在用户终端的显示装置上提示用户接通路由器电源。在本实施例中,当加载异常是由物理设备造成是,则通过预设的提示提示用户进行更改避免盲目切换,确定了加载异常的真实原因。
在一些实施例中,如图4所示,提供另一种应用程序备用页面切换方法,在步骤S210,基于备用页面地址,向备用页面服务器加载与备用页面地址对 应的备用页面后还包括:
步骤S212,若监测到备用页面加载异常,则中断页面加载请求,直至重新获取携带有新的默认页面地址的页面加载请求。
步骤S214,根据页面加载请求重新向默认页面服务器加载新的默认页面地址对应的默认页面。并返回步骤S206对默认页面加载情况进行监测
中断页面加载请求即为结束本次指示加载打开页面的页面加载请求。并且,提示用户选择重新打开页面或者确定结束本次操作。若用户选择确定结束本次操作,则结束页面加载在用户终端显示空白页面。若用户选择重新打开页面则用户重新在终端进行页面操作以便生成携带新的默认页面地址的页面加载请求。用户终端根据获取的新的页面加载请求向默认服务器加载默认页面地址对应的默认页面。当加载新的默认页面地址所对应的默认页面时,则返回步骤S206对默认页面加载情况进行监测。
在本实施例中,同时监测备用页面的加载情况,当备用页面也出现加载异常时完全停止中断本次页面加载请求,不切换备用页面,也不返回去继续加载默认页面。避免出现页面加载死循环的情况。只有当用户继续操作通过获取新的页面加载请求重新加载默认页面的页面内容。
在一些实施例中,获取携带有默认页面地址的页面加载请求之前包括步骤:获取应用程序的启动指令,将启动指令发送至默认页面服务器;接收默认页面服务器响应启动指令所返回的应用程序的最新版本号;获取应用程序的当前版本号,比较最新版本号和当前版本号确定应用程序是否需要更新;若是,则更新应用程序以及对应的静态映射表。
启动指令是指用户通过操作指示用户终端启动应用程序的请求。由于应用程序处于持续更新状态,则最新版本号是指应用程序更新到当前最新版本的版本号。当前版本号是指运用在用户终端本地的应用程序的版本号。
具体地,在用户请求打开页面之前需要启动对应的应用程序,当用户通过点击应用程序图标生成启动指令。用户终端获取到启动指令后将该启动指令发送给默认服务器,默认服务器则获取该启动指令对应的应用程序的最新 版本号返回给用户终端。用户终端获取应用程序的本地版本的当前版本号,比较最新版本号和本地版本号。若本地版本号等于最新版本号,则表示本地应用程序为最新版,拥有最新的默认页面以及默认页面对应的备用页面信息。若本地版本号小于最新版本号,则表示本地应用程序为旧版本,则表示本地应用程序的默认页面以及默认页面对应的备用页面可能有增加或者减少的变动。因此,当本地版本号小于最新版本号时,则满足更新条件,即将本地应用程序更新至最新版本,同时即将该应用程序对应的静态映射表同时更新。在本实施例中,通过更新保证了最新的默认页面以及对应的备用页面的信息。
在一些实施例中,基于备用页面地址,向备用页面服务器加载与备用页面地址对应的备用页面的步骤之后,还包括步骤:获取切换信息,切换信息包括当前页面的页面信息,加载异常的异常类型和切换时间;根据切换信息生成日志文件并发送至默认页面服务器。
当前页面的页面信息即为切换成备用页面后的备用页面信息。加载异常的异常类型即为加载异常时根据异常信息所判定的异常类型。切换时间即为将默认页面切换为备用页面时的系统时间。
具体地,当基于备用页面地址向备用页面服务器加载请求备用页面后,收集获取当前页面的页面信息、异常类型以及切换时间生成日志文件发送至默认页面服务器。日志文件生成可以通过获取预先存储在本地的日志文件模板,根据日志文件模板将切换信息输入至日志文件模板中生成日志文件,并且根据当前系统时间和日期为日志文件命名。日志文件生成后可以实时发送给默认服务器,也可以在收集多个日志文件后在预设时间定时发送给默认服务器。在本实施例中,通过切换信息生成日志文件上报至默认服务器,供开发人员根据信息及时解决服务端的缺陷故障。
应该理解的是,虽然图2-4的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图2-4中的至少一部分步骤可以包括多个子步骤或者 多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。
在一些实施例中,如图5所示,提供了一种应用程序备用页面切换装置,包括:发送模块502、加载模块504、监测模块506和获取模块508,
发送模块502,用于获取携带有默认页面地址的页面加载请求。
加载模块504,用于根据页面加载请求,向默认页面服务器加载默认页面地址对应的默认页面。
监测模块506,用于若监测到默认页面加载异常,则获取静态映射表。
获取模块508,用于根据静态映射表获取默认页面地址对应的备用页面地址。
加载模块504还用于基于备用页面地址,向备用页面服务器加载与备用页面地址对应的备用页面。
在一些实施例中,监测模块506还用于获取默认页面加载异常的异常类型;根据异常类型判断是否满足预设的切换条件;若满足,则获取静态映射表。
在一些实施例中,应用程序备用页面切换装置还包括判断模块,用于获取物理设备标识,根据物理设备标识获取对应物理设备工作状态值;根据物理设备工作状态值确定物理网络是否开启;若物理网络开启,则获取页面加载异常的异常类型。
在一些实施例中,判断模块还用于若物理网络没有开启,则根据物理标识获取对应的预设提示信息;根据预设提示信息指示用户开启物理网络。
在一些实施例中,加载模块504还用于若监测到备用页面加载异常,则中断页面加载请求,直至重新获取携带有新的默认页面地址的页面加载请求;根据页面加载请求重新向默认页面服务器加载新的默认页面地址对应的默认页面。
在一些实施例中,应用程序备用页面切换装置还包括更新模块,用于获取应用程序的启动指令,将启动指令发送至默认页面服务器;接收默认页面服务器响应启动指令所返回的应用程序的最新版本号;获取应用程序的当前版本号,比较最新版本号和当前版本号确定应用程序是否需要更新;若是,则更新应用程序以及对应的静态映射表。
在一些实施例中,应用程序备用页面切换装置还包括生成模块,用于获取切换信息,切换信息包括当前页面的页面信息,加载异常的异常类型和切换时间;根据切换信息生成日志文件并发送至默认页面服务器。
关于应用程序备用页面切换装置的具体限定可以参见上文中对于应用程序备用页面切换方法的限定,在此不再赘述。上述应用程序备用页面切换装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。
在一些实施例中,提供了一种计算机设备,该计算机设备可以是终端,其内部结构图可以如图6所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口、显示屏和输入装置。该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统和计算机可读指令。该内存储器为非易失性存储介质中的操作系统和计算机可读指令的运行提供环境。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机可读指令被处理器执行时以实现一种应用程序备用页面切换方法。该计算机设备的显示屏可以是液晶显示屏或者电子墨水显示屏,该计算机设备的输入装置可以是显示屏上覆盖的触摸层,也可以是计算机设备外壳上设置的按键、轨迹球或触控板,还可以是外接的键盘、触控板或鼠标等。
本领域技术人员可以理解,图6中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的 限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
一种计算机设备,包括存储器和一个或多个处理器,存储器中储存有计算机可读指令,计算机可读指令被处理器执行时,使得一个或多个处理器执行以下步骤:
获取携带有默认页面地址的页面加载请求;
根据页面加载请求,向默认页面服务器加载默认页面地址对应的默认页面;
若监测到默认页面加载异常,则获取静态映射表;
根据静态映射表获取默认页面地址对应的备用页面地址;及
基于备用页面地址,向备用页面服务器加载与备用页面地址对应的备用页面。
一个或多个存储有计算机可读指令的非易失性存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:
获取携带有默认页面地址的页面加载请求;
根据页面加载请求,向默认页面服务器加载默认页面地址对应的默认页面;
若监测到默认页面加载异常,则获取静态映射表;
根据静态映射表获取默认页面地址对应的备用页面地址;及
基于备用页面地址,向备用页面服务器加载与备用页面地址对应的备用页面。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一非易失性计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程 ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。
Claims (20)
- 一种应用程序备用页面切换方法,包括:获取携带有默认页面地址的页面加载请求;根据所述页面加载请求,向默认页面服务器加载所述默认页面地址对应的默认页面;若监测到所述默认页面加载异常,则获取静态映射表;根据所述静态映射表获取所述默认页面地址对应的备用页面地址;及基于所述备用页面地址,向备用页面服务器加载与所述备用页面地址对应的备用页面。
- 根据权利要求1所述的方法,其特征在于,所述若监测到所述默认页面加载异常,则获取静态映射表包括:获取所述默认页面加载异常的异常类型;根据所述异常类型判断是否满足预设的切换条件;及若满足,则获取静态映射表。
- 根据权利要求2所述的方法,其特征在于,所述获取所述页面加载异常的异常类型之前包括:获取物理设备标识,根据所述物理设备标识获取对应物理设备工作状态值;根据所述物理设备工作状态值确定物理网络是否开启;及若所述物理网络开启,则获取所述页面加载异常的异常类型。
- 根据权利要求3所述的方法,其特征在于,所述方法还包括:若所述物理网络没有开启,则根据所述物理标识获取对应的预设提示信息;及根据所述预设提示信息指示用户开启物理网络。
- 根据权利要求1所述的方法,其特征在于,所述方法还包括:若监测到所述备用页面加载异常,则中断所述页面加载请求,直至重新获取携带有新的默认页面地址的页面加载请求;及根据所述页面加载请求重新向默认页面服务器加载新的所述默认页面地址对应的默认页面。
- 根据权利要求1所述的方法,其特征在于,所述获取携带有默认页面地址的页面加载请求之前包括:获取应用程序的启动指令,将所述启动指令发送至默认页面服务器;接收默认页面服务器响应所述启动指令所返回的应用程序的最新版本号;获取所述应用程序的当前版本号,比较所述最新版本号和当前版本号确定所述应用程序是否需要更新;及若是,则更新所述应用程序以及对应的静态映射表。
- 根据权利要求1所述的方法,其特征在于,基于所述备用页面地址,向备用页面服务器加载与所述备用页面地址对应的备用页面之后,还包括:获取切换信息,所述切换信息包括当前页面的页面信息,加载异常的异常类型和切换时间;及根据所述切换信息生成日志文件并发送至默认页面服务器。
- 一种应用程序备用页面切换装置,包括:发送模块,用于获取携带有默认页面地址的页面加载请求;加载模块,用于根据所述页面加载请求,向默认页面服务器加载所述默认页面地址对应的默认页面;监测模块,用于若监测到所述默认页面加载异常,则获取静态映射表;获取模块,用于根据所述静态映射表获取所述默认页面地址对应的备用页面地址;及所述加载模块还用于基于所述备用页面地址,向备用页面服务器加载与所述备用页面地址对应的备用页面。
- 一种计算机设备,包括存储器及一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:获取携带有默认页面地址的页面加载请求;根据所述页面加载请求,向默认页面服务器加载所述默认页面地址对应的默认页面;若监测到所述默认页面加载异常,则获取静态映射表;根据所述静态映射表获取所述默认页面地址对应的备用页面地址;及基于所述备用页面地址,向备用页面服务器加载与所述备用页面地址对应的备用页面。
- 根据权利要求9所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时还执行以下步骤:获取所述默认页面加载异常的异常类型;根据所述异常类型判断是否满足预设的切换条件;及若满足,则获取静态映射表。
- 根据权利要求10所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时还执行以下步骤:获取物理设备标识,根据所述物理设备标识获取对应物理设备工作状态值;根据所述物理设备工作状态值确定物理网络是否开启;及若所述物理网络开启,则获取所述页面加载异常的异常类型。
- 根据权利要求11所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时还执行以下步骤:若所述物理网络没有开启,则根据所述物理标识获取对应的预设提示信息;及根据所述预设提示信息指示用户开启物理网络。
- 根据权利要求9所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时还执行以下步骤:若监测到所述备用页面加载异常,则中断所述页面加载请求,直至重新获取携带有新的默认页面地址的页面加载请求;及根据所述页面加载请求重新向默认页面服务器加载新的所述默认页面地址对应的默认页面。
- 根据权利要求9所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时还执行以下步骤:获取应用程序的启动指令,将所述启动指令发送至默认页面服务器;接收默认页面服务器响应所述启动指令所返回的应用程序的最新版本号;获取所述应用程序的当前版本号,比较所述最新版本号和当前版本号确定所述应用程序是否需要更新;及若是,则更新所述应用程序以及对应的静态映射表。
- 一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:获取携带有默认页面地址的页面加载请求;根据所述页面加载请求,向默认页面服务器加载所述默认页面地址对应的默认页面;若监测到所述默认页面加载异常,则获取静态映射表;根据所述静态映射表获取所述默认页面地址对应的备用页面地址;及基于所述备用页面地址,向备用页面服务器加载与所述备用页面地址对应的备用页面。
- 根据权利要求15所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时还执行以下步骤:获取所述默认页面加载异常的异常类型;根据所述异常类型判断是否满足预设的切换条件;及若满足,则获取静态映射表。
- 根据权利要求16所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时还执行以下步骤:获取物理设备标识,根据所述物理设备标识获取对应物理设备工作状态值;根据所述物理设备工作状态值确定物理网络是否开启;及若所述物理网络开启,则获取所述页面加载异常的异常类型。
- 根据权利要求17所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时还执行以下步骤:若所述物理网络没有开启,则根据所述物理标识获取对应的预设提示信息;及根据所述预设提示信息指示用户开启物理网络。
- 根据权利要求15所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时还执行以下步骤:若监测到所述备用页面加载异常,则中断所述页面加载请求,直至重新获取携带有新的默认页面地址的页面加载请求;及根据所述页面加载请求重新向默认页面服务器加载新的所述默认页面地址对应的默认页面。
- 根据权利要求15所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时还执行以下步骤:获取应用程序的启动指令,将所述启动指令发送至默认页面服务器;接收默认页面服务器响应所述启动指令所返回的应用程序的最新版本号;获取所述应用程序的当前版本号,比较所述最新版本号和当前版本号确定所述应用程序是否需要更新;及若是,则更新所述应用程序以及对应的静态映射表。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910295657.8A CN110119290A (zh) | 2019-04-12 | 2019-04-12 | 应用程序备用页面切换方法、装置、计算机设备和存储介质 |
| CN201910295657.8 | 2019-04-12 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2020206907A1 true WO2020206907A1 (zh) | 2020-10-15 |
Family
ID=67521030
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2019/102590 Ceased WO2020206907A1 (zh) | 2019-04-12 | 2019-08-26 | 应用程序备用页面切换方法、装置、计算机设备和存储介质 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN110119290A (zh) |
| WO (1) | WO2020206907A1 (zh) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116737143A (zh) * | 2022-03-04 | 2023-09-12 | 腾讯科技(深圳)有限公司 | 一种应用程序的页面构建方法、装置、设备及存储介质 |
| CN117390313A (zh) * | 2023-08-29 | 2024-01-12 | 中国银行股份有限公司 | 页面处理方法、装置、计算机设备、存储介质和产品 |
Families Citing this family (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110119290A (zh) * | 2019-04-12 | 2019-08-13 | 平安科技(深圳)有限公司 | 应用程序备用页面切换方法、装置、计算机设备和存储介质 |
| CN111290797A (zh) * | 2020-01-20 | 2020-06-16 | 北京字节跳动网络技术有限公司 | 页面切换方法、客户端、服务器、电子设备和系统 |
| CN111991803B (zh) * | 2020-08-28 | 2023-01-31 | 厦门雅基软件有限公司 | 云端游戏切换方法、装置及计算机可读存储介质 |
| CN113190370B (zh) * | 2021-05-08 | 2024-06-18 | 京东科技控股股份有限公司 | 一种应用的应急响应方法及装置 |
| CN113301148B (zh) * | 2021-05-21 | 2022-10-28 | 北京达佳互联信息技术有限公司 | 页面显示方法、装置、服务器、终端及存储介质 |
| CN114995861B (zh) * | 2022-08-02 | 2022-09-30 | 中航信移动科技有限公司 | 一种基于weex的应用程序更新方法、存储介质及电子设备 |
| CN115795195A (zh) * | 2022-11-15 | 2023-03-14 | 康键信息技术(深圳)有限公司 | 异常页面的处理方法、装置、系统、电子设备及介质 |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7325045B1 (en) * | 2003-08-05 | 2008-01-29 | A9.Com, Inc. | Error processing methods for providing responsive content to a user when a page load error occurs |
| CN107729352A (zh) * | 2017-08-30 | 2018-02-23 | 上海壹账通金融科技有限公司 | 页面资源加载方法及终端设备 |
| CN109474668A (zh) * | 2018-10-16 | 2019-03-15 | 平安科技(深圳)有限公司 | Cdn服务切换方法、装置、计算机设备及存储介质 |
| CN110119290A (zh) * | 2019-04-12 | 2019-08-13 | 平安科技(深圳)有限公司 | 应用程序备用页面切换方法、装置、计算机设备和存储介质 |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9471439B2 (en) * | 2014-03-13 | 2016-10-18 | Sybase, Inc. | Systems and methods for reducing load database time |
| CN106055564B (zh) * | 2016-05-18 | 2019-03-12 | 平安科技(深圳)有限公司 | 页面加载方法和装置 |
-
2019
- 2019-04-12 CN CN201910295657.8A patent/CN110119290A/zh active Pending
- 2019-08-26 WO PCT/CN2019/102590 patent/WO2020206907A1/zh not_active Ceased
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7325045B1 (en) * | 2003-08-05 | 2008-01-29 | A9.Com, Inc. | Error processing methods for providing responsive content to a user when a page load error occurs |
| CN107729352A (zh) * | 2017-08-30 | 2018-02-23 | 上海壹账通金融科技有限公司 | 页面资源加载方法及终端设备 |
| CN109474668A (zh) * | 2018-10-16 | 2019-03-15 | 平安科技(深圳)有限公司 | Cdn服务切换方法、装置、计算机设备及存储介质 |
| CN110119290A (zh) * | 2019-04-12 | 2019-08-13 | 平安科技(深圳)有限公司 | 应用程序备用页面切换方法、装置、计算机设备和存储介质 |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116737143A (zh) * | 2022-03-04 | 2023-09-12 | 腾讯科技(深圳)有限公司 | 一种应用程序的页面构建方法、装置、设备及存储介质 |
| CN117390313A (zh) * | 2023-08-29 | 2024-01-12 | 中国银行股份有限公司 | 页面处理方法、装置、计算机设备、存储介质和产品 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN110119290A (zh) | 2019-08-13 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2020206907A1 (zh) | 应用程序备用页面切换方法、装置、计算机设备和存储介质 | |
| KR102493449B1 (ko) | 엣지 컴퓨팅 테스트 방법, 장치, 전자 장치 및 컴퓨터 판독 가능 매체 | |
| TWI608419B (zh) | 軟體相容性預先檢測方法與其系統 | |
| WO2020253061A1 (zh) | 页面生成方法、装置、计算机设备和存储介质 | |
| US7603442B2 (en) | Method and system for maintaining service dependency relationships in a computer system | |
| CN110334303A (zh) | 表单校验方法、装置、计算机设备和存储介质 | |
| CN112035472A (zh) | 数据处理方法、装置、计算机设备和存储介质 | |
| CN113805925A (zh) | 分布式集群管理软件的在线升级方法、装置、设备及介质 | |
| CN115374083A (zh) | 数据源的切换方法、装置、电子设备及存储介质 | |
| CN108737153A (zh) | 区块链灾备系统、方法、服务器和计算机可读存储介质 | |
| US12117896B2 (en) | Stand-alone IOT device for repairing failures on a computing device | |
| TWI518680B (zh) | 維護電腦系統之檔案系統的方法 | |
| CN113612814A (zh) | 一种会话信息的筛选方法、装置、终端及存储介质 | |
| CN116489001A (zh) | 交换机故障诊断及恢复方法、装置、交换机及存储介质 | |
| CN111857744A (zh) | 一种超融合系统的安装方法、系统、设备以及介质 | |
| CN115562811A (zh) | 一种数据库一体机共享存储集群的升级方法及装置 | |
| US12513040B2 (en) | Management IP drift method and storage frame | |
| CN112379973A (zh) | 重载方法和装置 | |
| CN116010199A (zh) | 应用服务自调节方法、装置、计算机设备及存储介质 | |
| CN110262837A (zh) | 基于管理的服务器远程重启方法、装置、设备及存储介质 | |
| CN117312037A (zh) | 内存修复方法、装置、电子设备及存储介质 | |
| CN116893833A (zh) | 远程升级复杂可编程逻辑器件操作系统、方法及介质 | |
| CN115437873A (zh) | 一种集群资源管理方法、装置和计算机设备 | |
| CN117632644A (zh) | 服务异常监测方法、装置、电子设备及可读存储介质 | |
| CN117873520A (zh) | 基于基板管理控制器的主板固件升级方法、装置及设备 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19924595 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 19924595 Country of ref document: EP Kind code of ref document: A1 |