WO2018149395A1 - 视图文件的路由配置方法、存储介质、终端设备及装置 - Google Patents

视图文件的路由配置方法、存储介质、终端设备及装置 Download PDF

Info

Publication number
WO2018149395A1
WO2018149395A1 PCT/CN2018/076661 CN2018076661W WO2018149395A1 WO 2018149395 A1 WO2018149395 A1 WO 2018149395A1 CN 2018076661 W CN2018076661 W CN 2018076661W WO 2018149395 A1 WO2018149395 A1 WO 2018149395A1
Authority
WO
WIPO (PCT)
Prior art keywords
file
page application
target single
single page
routing configuration
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
Application number
PCT/CN2018/076661
Other languages
English (en)
French (fr)
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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to SG11201809083TA priority Critical patent/SG11201809083TA/en
Priority to US16/088,061 priority patent/US10887171B2/en
Publication of WO2018149395A1 publication Critical patent/WO2018149395A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]

Definitions

  • the present application relates to the field of single page application technologies, and in particular, to a route configuration method for a view file, a computer readable storage medium, a terminal device, and an apparatus.
  • a single-page application that is, a single page web application (SPA)
  • SPA single page web application
  • a single-page application is an application that has only one web page, and is a web application that loads a single HTML page and dynamically updates the page when the user interacts with the application.
  • rich, highly interactive views are key to whether a single-page application can appeal to users. Therefore, when building a single-page application, it is often necessary to create a large number of view files to enhance the user experience.
  • the present invention provides a routing configuration method for a view file, a computer readable storage medium, a terminal device, and a device, which can automatically configure the routing information of the view file and improve the update efficiency of the routing configuration information.
  • a first aspect of the embodiments of the present application provides a route configuration method for a view file, including:
  • a second aspect of embodiments of the present application provides a computer readable storage medium storing computer readable instructions that, when executed by a processor, implement the following steps:
  • a third aspect of an embodiment of the present application provides a terminal device including a memory, a processor, and computer readable instructions stored in the memory and executable on the processor, the processor executing the computer The following steps are implemented when the instructions are readable:
  • a fourth aspect of the embodiments of the present application provides a route configuration device for a view file, including:
  • An update detection module configured to detect whether an update of the view file of the target single page application exists
  • a view file determining module configured to determine an updated target view file if the detection result of the update detecting module is yes;
  • a status information obtaining module configured to acquire update status information of the target view file
  • a configuration information update module configured to update routing configuration information in the routing configuration file of the target single page application according to the update status information.
  • a target single page application is determined; then, detecting whether there is an update of the view file of the target single page application; if there is an update of the view file of the target single page application, determining the updated target view file; Then, the update status information of the target view file is obtained. Finally, the routing configuration information in the routing configuration file of the target single page application is updated according to the update status information.
  • the routing configuration information in the routing configuration file is automatically updated according to the update status information, thereby realizing the automatic configuration of the view file routing information. It improves the update efficiency of routing configuration information, reduces the probability of routing configuration errors, and reduces the development and maintenance costs of single-page applications.
  • FIG. 1 is a flow chart of a first embodiment of a route configuration method for a view file in the present application
  • FIG. 2 is a structural diagram of a first embodiment of a route configuration apparatus for a view file according to the present application
  • FIG. 3 is a structural diagram of a second embodiment of a route configuration apparatus for a view file according to the present application.
  • FIG. 4 is a structural diagram of a third embodiment of a route configuration apparatus for a view file according to the present application.
  • the present invention provides a route configuration method and device for a view file, which is used to solve the problem that the manual configuration view file routing information is inefficient and the routing configuration error is easy to occur.
  • a first embodiment of a route configuration method for a view file in this application includes:
  • step 103 Detect whether there is an update of the view file of the target single page application, and if yes, perform step 103, and if not, continue to detect;
  • the target single page application may be determined first. For example, in the initial stage of the construction of the single-page application project, it may be determined that the single-page application to be built is a target single-page application; or, the automatic routing configuration of the view files may be periodically performed on each single-page application in the system, and the single pages are respectively determined.
  • the app is a target single page app. It should be noted that, in the foregoing step 101, one, two or more target single page applications may be simultaneously determined, and then the above steps 102-105 are performed in parallel for each target single page application.
  • step 102 it can be understood that when the view file of the target single page application changes, that is, there is an update of the view file that is changed.
  • step 103 may be performed to determine the changed view file. Otherwise, you can continue to detect. It should be noted that, in this embodiment, when it is detected that the view file of the target single page application is not updated, the detection may be continued, and other operations may be performed according to a preset manner, which is not limited in this embodiment.
  • whether a new view file or a deleted view file exists in the view file of the target single page application may be detected to determine whether the view file of the target single page application has an update.
  • the judgment basis is generally the file name of the view file. Therefore, if the file name of the view file has not changed, it can be considered that there is no update of the view file, and vice versa.
  • step 103 in order to filter out the changed view file, it is possible to check which view files are updated from the operation log by checking the operation log of the target single page application. It can be understood that when the staff operates the view file in the target single page application, each step and state of the operation is recorded in the corresponding operation log. Therefore, by checking the operation log, which view files can be known. A change has occurred, which is which view files have been updated. Thus, these updated view files are determined as target view files.
  • obtaining the update status information of the target view file may include obtaining information such as what kind of update occurs in the target view file, and what is the updated status.
  • the update status information of the target view files may also be obtained from the operation log. For example, the staff added a view file A to the target single page application, and the file name of view file A is "AAA". Because the operation log records the operations of the staff, the update status information of the view file A can be obtained through the operation log, including: the update status is "new", and the file name is "AAA".
  • each target single page application can be configured with at least one routing configuration file, and the routing configuration file is written with routing configuration information about the view file of the target single page application. Therefore, when there is an update to the view file, the corresponding routing configuration information should also be updated.
  • the routing configuration information in the routing configuration file may be updated according to a preset configuration rule.
  • the processing of the foregoing step 105 may be: acquiring the first file name of the deleted view file from the update status information, searching and searching from the routing configuration file of the target single page application.
  • the routing configuration information corresponding to the first file name deletes the found routing configuration information. It can be understood that, before the routing configuration information is updated, the routing configuration information includes the file name of the deleted view file, so the routing configuration information corresponding to the first file name can be found and deleted.
  • the routing configuration information of the view file is deleted, when the single-page application is loaded, the deleted target view file is no longer attempted to be loaded, that is, the routing configuration update of the deleted view file is completed. .
  • the processing of the foregoing step 105 may be: obtaining a second file name of the newly added view file from the update status information, and then applying the target file to the target single page according to the second file name.
  • the routing configuration information is written to the specified location in the routing configuration file according to the preset configuration rules. It can be understood that the routing configuration information is written according to a preset configuration rule, and the routing configuration information written by the routing configuration information generally includes the file name of the view file, that is, the second file name.
  • the matching path of the view file may adopt multiple ways of indefinite matching, full matching, or parameter matching.
  • the code fragment in the routing configuration information is /index/:id, where "id” is a variable; and the "*" in the code fragment /index/* is a wildcard, indicating that the match starts with /index A full match of the path.
  • the matching path with parameters can be passed to the next view routing object with parameters to complete the jump of another view.
  • step 105 when there are multiple target view files, that is, when multiple update status information is acquired, the above step 105 may be repeatedly performed repeatedly, and the target single page is respectively determined according to each update status information.
  • the applied routing configuration file is updated, and finally the routing automatic configuration of all view files is implemented.
  • the target single page application may be further determined whether there is a routing configuration file corresponding to the target single page application, and if not, a new routing configuration file is created for the target single page application. It can be understood that when the target single page application does not have a corresponding routing configuration file, the target single page application is generally an application that is in the initial stage of construction, or an application that has just been built. At this point, you can create a new routing profile for this target single-page application, which is a blank routing configuration file.
  • the update status information may be recorded in a view file change list, where the view file change list may record the view file of the target single page application. All historical update status information. Therefore, the routing configuration information in the routing configuration file of the target single page application can be directly updated according to the view file change list. The routing configuration information is updated through the view file change list. For the newly created routing configuration file, the batch routing configuration of the view file can be implemented to achieve higher configuration efficiency.
  • the target single page application is determined; then, the view file of the target single page application is detected to be updated; if the view file of the target single page application is updated, the updated target view file is determined; Then, the update status information of the target view file is obtained. Finally, the routing configuration information in the routing configuration file of the target single page application is updated according to the update status information.
  • the routing configuration information in the routing configuration file is automatically updated according to the update status information, thereby realizing the automatic configuration of the view file routing information. It improves the update efficiency of routing configuration information, reduces the probability of routing configuration errors, and reduces the development and maintenance costs of single-page applications.
  • routing configuration method of a view file The above describes a routing configuration method of a view file.
  • a routing configuration device of a view file will be described in detail below.
  • Fig. 2 is a block diagram showing the first embodiment of a routing configuration apparatus for a view file in the present application.
  • a route configuration device of a view file includes:
  • An application determining module 201 configured to determine a target single page application
  • An update detection module 202 configured to detect whether an update of the view file of the target single page application exists
  • a view file determining module 203 configured to determine an updated target view file if the detection result of the update detecting module 202 is YES;
  • the status information obtaining module 204 is configured to acquire update status information of the target view file.
  • the configuration information update module 205 is configured to update routing configuration information in the routing configuration file of the target single page application according to the update status information.
  • FIG. 3 is a structural diagram showing a second embodiment of a routing configuration apparatus for a view file in the present application.
  • the update detection module 202 may further include:
  • the addition and deletion detection unit 2021 is configured to detect whether there is a new view file or a deleted view file in the view file of the target single page application.
  • the update status information may include a first file name of the deleted view file
  • the configuration information update module 205 may specifically include:
  • the configuration information searching unit 2051 is configured to search for routing configuration information corresponding to the first file name from a routing configuration file of the target single page application;
  • the configuration information deleting unit 2052 is configured to delete the discovered routing configuration information.
  • the update status information may include a second file name of the newly added view file
  • the configuration information update module 205 can include:
  • the configuration information writing unit 2053 is configured to write routing configuration information according to a preset configuration rule according to the second file name in a specified location in the routing configuration file of the target single page application.
  • FIG. 4 is a structural diagram showing a third embodiment of a route configuration apparatus for a view file in the present application.
  • the routing configuration apparatus may further include:
  • the configuration file determining module 206 is configured to determine whether there is a routing configuration file corresponding to the target single page application
  • the profile creation module 207 is configured to create a new route profile for the target single page application if the determination result of the profile determination module 206 is negative.
  • the embodiment of the present application further provides a computer readable storage medium storing computer readable instructions, which are executed by a processor to implement any one of the view files as shown in FIG. The steps of the route configuration method.
  • the embodiment of the present application further provides a terminal device, including a memory, a processor, and computer readable instructions stored in the memory and executable on the processor, when the processor executes the computer readable instruction.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本申请公开了一种视图文件的路由配置方法、计算机可读存储介质、终端设备及装置,用于解决人工配置视图文件路由信息效率低下且容易出现路由配置错误的问题。所述路由配置方法包括:确定目标单页面应用;检测所述目标单页面应用的视图文件是否存在更新;若所述目标单页面应用的视图文件存在更新,则确定更新的目标视图文件;获取所述目标视图文件的更新状态信息;根据所述更新状态信息更新所述目标单页面应用的路由配置文件中的路由配置信息。

Description

视图文件的路由配置方法、存储介质、终端设备及装置
本申请要求于2017年2月16日提交中国专利局、申请号为201710083295.7、发明名称为“一种视图文件的路由配置方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及单页面应用技术领域,尤其涉及一种视图文件的路由配置方法、计算机可读存储介质、终端设备及装置。
背景技术
单页面应用,即单页Web应用(single page web application,SPA),就是只有一张Web页面的应用,是加载单个HTML 页面并在用户与应用程序交互时动态更新该页面的Web应用程序。对单页面应用来说,丰富地、具有强交互性的视图是整个单页面应用能否吸引用户的关键。因此,在构建单页面应用时,往往需要创建大量的视图文件以增强用户的使用体验。
目前,在为单页面应用创建视图文件时,需要为每个视图文件分别进行路由信息的人工配置。然而,由于单页面应用一般需要大量的视图文件,这些视图文件的更新频率快,工作人员需要反复为这些更新的视图文件编写路由信息的代码,以实现视图文件的路由配置,效率低下且容易出现路由配置错误的问题,增加了单页面应用的开发维护成本。
技术问题
本申请提供了一种视图文件的路由配置方法、计算机可读存储介质、终端设备及装置,能够实现视图文件路由信息的自动配置,提高路由配置信息的更新效率。
技术解决方案
本申请实施例的第一方面提供了一种视图文件的路由配置方法,包括:
确定目标单页面应用;
检测所述目标单页面应用的视图文件是否存在更新;
若所述目标单页面应用的视图文件存在更新,则确定更新的目标视图文件;
获取所述目标视图文件的更新状态信息;
根据所述更新状态信息更新所述目标单页面应用的路由配置文件中的路由配置信息。
本申请实施例的第二方面提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可读指令,所述计算机可读指令被处理器执行时实现如下步骤:
确定目标单页面应用;
检测所述目标单页面应用的视图文件是否存在更新;
若所述目标单页面应用的视图文件存在更新,则确定更新的目标视图文件;
获取所述目标视图文件的更新状态信息;
根据所述更新状态信息更新所述目标单页面应用的路由配置文件中的路由配置信息。
本申请实施例的第三方面提供了一种终端设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现如下步骤:
确定目标单页面应用;
检测所述目标单页面应用的视图文件是否存在更新;
若所述目标单页面应用的视图文件存在更新,则确定更新的目标视图文件;
获取所述目标视图文件的更新状态信息;
根据所述更新状态信息更新所述目标单页面应用的路由配置文件中的路由配置信息。
本申请实施例的第四方面提供了一种视图文件的路由配置装置,包括:
应用确定模块,用于确定目标单页面应用;
更新检测模块,用于检测所述目标单页面应用的视图文件是否存在更新;
视图文件确定模块,用于若所述更新检测模块的检测结果为是,则确定更新的目标视图文件;
状态信息获取模块,用于获取所述目标视图文件的更新状态信息;
配置信息更新模块,用于根据所述更新状态信息更新所述目标单页面应用的路由配置文件中的路由配置信息。
有益效果
在本申请中,首先,确定目标单页面应用;然后,检测所述目标单页面应用的视图文件是否存在更新;若所述目标单页面应用的视图文件存在更新,则确定更新的目标视图文件;接着,获取所述目标视图文件的更新状态信息;最后,根据所述更新状态信息更新所述目标单页面应用的路由配置文件中的路由配置信息。在本申请中,通过自动检测单页面应用的视图文件是否存在更新,若存在更新,则自动根据更新状态信息对路由配置文件中的路由配置信息进行更新,实现了视图文件路由信息的自动配置,提高了路由配置信息的更新效率,并且降低了路由配置错误的概率,减少了单页面应用的开发维护成本。
附图说明
图1为本申请中一种视图文件的路由配置方法第一个实施例流程图;
图2为本申请中一种视图文件的路由配置装置第一个实施例结构图;
图3为本申请中一种视图文件的路由配置装置第二个实施例结构图;
图4为本申请中一种视图文件的路由配置装置第三个实施例结构图。
本发明的实施方式
本申请提供了一种视图文件的路由配置方法和装置,用于解决人工配置视图文件路由信息效率低下且容易出现路由配置错误的问题。
请参阅图1,本申请中一种视图文件的路由配置方法第一个实施例包括:
101、确定目标单页面应用;
102、检测所述目标单页面应用的视图文件是否存在更新,若是,则执行步骤103,若否,则继续检测;
103、确定更新的目标视图文件;
104、获取所述目标视图文件的更新状态信息;
105、根据所述更新状态信息更新所述目标单页面应用的路由配置文件中的路由配置信息。
对于上述步骤101,本实施例中,可以先确定目标单页面应用。比如,在单页面应用项目的构建初期,可以确定该待构建的单页面应用为目标单页面应用;或者,可以定期对系统中各个单页面应用进行视图文件的自动路由配置,分别确定这些单页面应用为目标单页面应用。需要说明的是,上述步骤101中,可以同时确定一个、两个或多个目标单页面应用,然后分别针对各个目标单页面应用并行执行上述步骤102~105。
对于上述步骤102,可以理解的是,当目标单页面应用的视图文件发生变动时,即表示这些发生变动的视图文件存在更新,此时,可以执行步骤103来确定发生变动的视图文件。反之,则可以继续检测。需要说明的是,本实施例中,当检测发现目标单页面应用的视图文件不存在更新时,可以继续检测,也可以按照预设的方式执行其它操作,对此本实施例不作限定。
具体地,对于上述步骤102,可以检测所述目标单页面应用的视图文件中是否存在新增的视图文件或者被删除的视图文件,来确定所述目标单页面应用的视图文件是否存在更新。可以理解的是,对于路由配置文件中的路由配置信息来说,该视图文件是否为同一个视图文件,其判断依据一般为视图文件的文件名。因此,视图文件的文件名若没有变动,则可以认为该视图文件不存在更新,反之,则存在更新。当视图文件存在更新时,可能存在两种情况:视图文件的新增和/或删除。
对于上述步骤103,为了将发生变动的视图文件筛选出来,可以通过检查目标单页面应用的操作日志,从操作日志中可以检查出哪些视图文件存在更新。可以理解的是,当工作人员对目标单页面应用中的视图文件进行操作时,其操作的各个步骤和状态均记录在对应的操作日志中,因此,通过检查操作日志,可以得知哪些视图文件发生了变动,也即哪些视图文件发生了更新。从而,将这些存在更新的视图文件确定为目标视图文件。
对于上述步骤104,可以理解的是,获取所述目标视图文件的更新状态信息可以包括获取这些目标视图文件发生了何种更新、更新后的状态是什么等信息。具体地,也可以从操作日志中获取到这些目标视图文件的更新状态信息。例如,工作人员在目标单页面应用中新增了一个视图文件A,视图文件A的文件名为“AAA”。由于操作日志对工作人员的各个操作均有记录,因此可以通过操作日志可以获取到该视图文件A的更新状态信息包括:更新状态为“新增”、文件名“AAA”。
对于上述步骤105,可以理解的是,每个目标单页面应用可以配置有至少一个路由配置文件,这些路由配置文件中写有关于目标单页面应用的视图文件的路由配置信息。因此,当视图文件存在更新时,也应当一并对相应的路由配置信息进行更新。在获取到目标视图文件的更新状态信息之后,可以按照预设的配置规则来更新该路由配置文件中的路由配置信息。
进一步地,由上述内容可知,目标视图文件的更新状态可能存在两种:新增和删除,因此,可以分别针对两种不同的更新状态进行不同的路由配置操作。
针对被删除的目标视图文件,上述步骤105的处理过程可以为:从更新状态信息中获取被删除的视图文件的第一文件名,从所述目标单页面应用的路由配置文件中查找与所述第一文件名对应的路由配置信息,删除查找到的所述路由配置信息。可以理解的是,在路由配置信息更新前,路由配置信息包括被删除的视图文件的文件名,因此可以查找到与所述第一文件名对应的所述路由配置信息并删除。对于单页面应用来说,删除了视图文件的路由配置信息之后,则在加载单页面应用时,不会再尝试加载被删除的目标视图文件,也即完成了被删除视图文件的路由配置的更新。
针对新增的目标视图文件,上述步骤105的处理过程可以为:从更新状态信息中获取新增的视图文件的第二文件名,然后,根据所述第二文件名在所述目标单页面应用的路由配置文件中指定位置按照预设的配置规则写入路由配置信息。可以理解的是,按照预设的配置规则写入路由配置信息,其写入的路由配置信息一般包括视图文件的文件名,此处也即第二文件名。另外,也可以包括视图文件的匹配路径,以便于视图文件之间的跳转。其中,视图文件的匹配路径可以采用不定匹配、全匹配或带参数匹配多种方式。例如,在URL中,路由配置信息中的代码片段为/index/:id,这里的“id”为变量;而代码片段/index/*中的“*”为通配符,表示匹配以/index开头的路径的全匹配。另外,带参数的匹配路径则可以带参数传入下一个视图路由对象,完成另一个视图的跳转。
可以理解的是,对于上述步骤105,当存在多个目标视图文件时,也即获取到多个更新状态信息时,可以多次、反复执行上述步骤105,分别根据各个更新状态信息对目标单页面应用的路由配置文件进行更新,最终实现所有视图文件的路由自动配置。也可以在执行上述步骤105时,并行处理多个更新状态信息。例如,当更新状态信息包括了新增的视图文件C1、新增的视图文件C2、被删除的视图文件C3,此时,可以同时分别对C1、C2、C3进行路由配置更新的并行处理,最后实现所有视图文件的路由自动配置。
进一步地,在上述步骤105之前,还可以判断是否存在与所述目标单页面应用对应的路由配置文件,若否,则为所述目标单页面应用创建新的路由配置文件。可以理解的是,当该目标单页面应用不存在对应的路由配置文件时,该目标单页面应用一般是处于构建初期的应用程序,或者刚刚构建完成的应用程序。此时,可以为这个目标单页面应用创建新的路由配置文件,也即空白的路由配置文件。
更进一步地,在获取所述目标视图文件的更新状态信息之后,可以将这些更新状态信息均记录在一个视图文件变化列表中,该视图文件变化列表可以记录下该目标单页面应用的视图文件的所有历史更新状态信息。从而,可以直接根据该视图文件变化列表更新所述目标单页面应用的路由配置文件中的路由配置信息。通过视图文件变化列表进行路由配置信息的更新,对于上述新创建的路由配置文件,实现视图文件的批量路由配置,可以达到更高的配置效率。
本实施例中,首先,确定目标单页面应用;然后,检测所述目标单页面应用的视图文件是否存在更新;若所述目标单页面应用的视图文件存在更新,则确定更新的目标视图文件;接着,获取所述目标视图文件的更新状态信息;最后,根据所述更新状态信息更新所述目标单页面应用的路由配置文件中的路由配置信息。在本实施例中,通过自动检测单页面应用的视图文件是否存在更新,若存在更新,则自动根据更新状态信息对路由配置文件中的路由配置信息进行更新,实现了视图文件路由信息的自动配置,提高了路由配置信息的更新效率,并且降低了路由配置错误的概率,减少了单页面应用的开发维护成本。
上面主要描述了一种视图文件的路由配置方法,下面将对一种视图文件的路由配置装置进行详细描述。
图2示出了本申请中一种视图文件的路由配置装置第一个实施例结构图。
本实施例中,一种视图文件的路由配置装置包括:
应用确定模块201,用于确定目标单页面应用;
更新检测模块202,用于检测所述目标单页面应用的视图文件是否存在更新;
视图文件确定模块203,用于若所述更新检测模块202的检测结果为是,则确定更新的目标视图文件;
状态信息获取模块204,用于获取所述目标视图文件的更新状态信息;
配置信息更新模块205,用于根据所述更新状态信息更新所述目标单页面应用的路由配置文件中的路由配置信息。
图3示出了本申请中一种视图文件的路由配置装置第二个实施例结构图。
如图3所示,进一步地,所述更新检测模块202可以包括:
增删检测单元2021,用于检测所述目标单页面应用的视图文件中是否存在新增的视图文件或者被删除的视图文件。
进一步地,所述更新状态信息可以包括被删除的视图文件的第一文件名;
所述配置信息更新模块205具体可以包括:
配置信息查找单元2051,用于从所述目标单页面应用的路由配置文件中查找与所述第一文件名对应的路由配置信息;
配置信息删除单元2052,用于删除查找到的所述路由配置信息。
进一步地,所述更新状态信息可以包括新增的视图文件的第二文件名;
所述配置信息更新模块205可以包括:
配置信息写入单元2053,用于根据所述第二文件名在所述目标单页面应用的路由配置文件中指定位置按照预设的配置规则写入路由配置信息。
图4示出了本申请中一种视图文件的路由配置装置第三个实施例结构图。
如图4所示,进一步地,所述路由配置装置还可以包括:
配置文件判断模块206,用于判断是否存在与所述目标单页面应用对应的路由配置文件;
配置文件创建模块207,用于若所述配置文件判断模块206的判断结果为否,则为所述目标单页面应用创建新的路由配置文件。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
本申请实施例还提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可读指令,所述计算机可读指令被处理器执行时实现如图1表示的任意一种视图文件的路由配置方法的步骤。
本申请实施例还提供一种终端设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现如图1表示的任意一种视图文件的路由配置方法的步骤。

Claims (20)

  1. 一种视图文件的路由配置方法,其特征在于,包括:
    确定目标单页面应用;
    检测所述目标单页面应用的视图文件是否存在更新;
    若所述目标单页面应用的视图文件存在更新,则确定更新的目标视图文件;
    获取所述目标视图文件的更新状态信息;
    根据所述更新状态信息更新所述目标单页面应用的路由配置文件中的路由配置信息。
  2. 根据权利要求1所述的路由配置方法,其特征在于,所述检测所述目标单页面应用的视图文件是否存在更新具体包括:
    检测所述目标单页面应用的视图文件中是否存在新增的视图文件或者被删除的视图文件。
  3. 根据权利要求2所述的路由配置方法,其特征在于,所述更新状态信息包括被删除的视图文件的第一文件名;
    所述根据所述更新状态信息更新所述目标单页面应用的路由配置文件中的路由配置信息具体包括:
    从所述目标单页面应用的路由配置文件中查找与所述第一文件名对应的路由配置信息;
    删除查找到的所述路由配置信息。
  4. 根据权利要求2所述的路由配置方法,其特征在于,所述更新状态信息包括新增的视图文件的第二文件名;
    所述根据所述更新状态信息更新所述目标单页面应用的路由配置文件中的路由配置信息具体包括:
    根据所述第二文件名在所述目标单页面应用的路由配置文件中指定位置按照预设的配置规则写入路由配置信息。
  5. 根据权利要求1至4中任一项所述的路由配置方法,其特征在于,在根据所述更新状态信息更新所述目标单页面应用的路由配置文件中的路由配置信息之前,还包括:
    判断是否存在与所述目标单页面应用对应的路由配置文件;
    若不存在与所述目标单页面应用对应的路由配置文件,则为所述目标单页面应用创建新的路由配置文件。
  6. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可读指令,其特征在于,所述计算机可读指令被处理器执行时实现如下步骤:
    确定目标单页面应用;
    检测所述目标单页面应用的视图文件是否存在更新;
    若所述目标单页面应用的视图文件存在更新,则确定更新的目标视图文件;
    获取所述目标视图文件的更新状态信息;
    根据所述更新状态信息更新所述目标单页面应用的路由配置文件中的路由配置信息。
  7. 根据权利要求6所述的计算机可读存储介质,其特征在于,所述检测所述目标单页面应用的视图文件是否存在更新具体包括:
    检测所述目标单页面应用的视图文件中是否存在新增的视图文件或者被删除的视图文件。
  8. 根据权利要求7所述的计算机可读存储介质,其特征在于,所述更新状态信息包括被删除的视图文件的第一文件名;
    所述根据所述更新状态信息更新所述目标单页面应用的路由配置文件中的路由配置信息具体包括:
    从所述目标单页面应用的路由配置文件中查找与所述第一文件名对应的路由配置信息;
    删除查找到的所述路由配置信息。
  9. 根据权利要求7所述的计算机可读存储介质,其特征在于,所述更新状态信息包括新增的视图文件的第二文件名;
    所述根据所述更新状态信息更新所述目标单页面应用的路由配置文件中的路由配置信息具体包括:
    根据所述第二文件名在所述目标单页面应用的路由配置文件中指定位置按照预设的配置规则写入路由配置信息。
  10. 根据权利要求6至9中任一项所述的计算机可读存储介质,其特征在于,在根据所述更新状态信息更新所述目标单页面应用的路由配置文件中的路由配置信息之前,还包括:
    判断是否存在与所述目标单页面应用对应的路由配置文件;
    若不存在与所述目标单页面应用对应的路由配置文件,则为所述目标单页面应用创建新的路由配置文件。
  11. 一种终端设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,其特征在于,所述处理器执行所述计算机可读指令时实现如下步骤:
    确定目标单页面应用;
    检测所述目标单页面应用的视图文件是否存在更新;
    若所述目标单页面应用的视图文件存在更新,则确定更新的目标视图文件;
    获取所述目标视图文件的更新状态信息;
    根据所述更新状态信息更新所述目标单页面应用的路由配置文件中的路由配置信息。
  12. 根据权利要求11所述的终端设备,其特征在于,所述检测所述目标单页面应用的视图文件是否存在更新具体包括:
    检测所述目标单页面应用的视图文件中是否存在新增的视图文件或者被删除的视图文件。
  13. 根据权利要求12所述的终端设备,其特征在于,所述更新状态信息包括被删除的视图文件的第一文件名;
    所述根据所述更新状态信息更新所述目标单页面应用的路由配置文件中的路由配置信息具体包括:
    从所述目标单页面应用的路由配置文件中查找与所述第一文件名对应的路由配置信息;
    删除查找到的所述路由配置信息。
  14. 根据权利要求12所述的终端设备,其特征在于,所述更新状态信息包括新增的视图文件的第二文件名;
    所述根据所述更新状态信息更新所述目标单页面应用的路由配置文件中的路由配置信息具体包括:
    根据所述第二文件名在所述目标单页面应用的路由配置文件中指定位置按照预设的配置规则写入路由配置信息。
  15. 根据权利要求11至14中任一项所述的终端设备,其特征在于,在根据所述更新状态信息更新所述目标单页面应用的路由配置文件中的路由配置信息之前,还包括:
    判断是否存在与所述目标单页面应用对应的路由配置文件;
    若不存在与所述目标单页面应用对应的路由配置文件,则为所述目标单页面应用创建新的路由配置文件。
  16. 一种视图文件的路由配置装置,其特征在于,包括:
    应用确定模块,用于确定目标单页面应用;
    更新检测模块,用于检测所述目标单页面应用的视图文件是否存在更新;
    视图文件确定模块,用于若所述更新检测模块的检测结果为是,则确定更新的目标视图文件;
    状态信息获取模块,用于获取所述目标视图文件的更新状态信息;
    配置信息更新模块,用于根据所述更新状态信息更新所述目标单页面应用的路由配置文件中的路由配置信息。
  17. 根据权利要求16所述的路由配置装置,其特征在于,所述更新检测模块包括:
    增删检测单元,用于检测所述目标单页面应用的视图文件中是否存在新增的视图文件或者被删除的视图文件。
  18. 根据权利要求17所述的路由配置装置,其特征在于,所述更新状态信息包括被删除的视图文件的第一文件名;
    所述配置信息更新模块具体包括:
    配置信息查找单元,用于从所述目标单页面应用的路由配置文件中查找与所述第一文件名对应的路由配置信息;
    配置信息删除单元,用于删除查找到的所述路由配置信息。
  19. 根据权利要求17所述的路由配置装置,其特征在于,所述更新状态信息包括新增的视图文件的第二文件名;
    所述配置信息更新模块包括:
    配置信息写入单元,用于根据所述第二文件名在所述目标单页面应用的路由配置文件中指定位置按照预设的配置规则写入路由配置信息。
  20. 根据权利要求16至19中任一项所述的路由配置装置,其特征在于,所述路由配置装置还包括:
    配置文件判断模块,用于判断是否存在与所述目标单页面应用对应的路由配置文件;
    配置文件创建模块,用于若所述配置文件判断模块的判断结果为否,则为所述目标单页面应用创建新的路由配置文件。
PCT/CN2018/076661 2017-02-16 2018-02-13 视图文件的路由配置方法、存储介质、终端设备及装置 Ceased WO2018149395A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
SG11201809083TA SG11201809083TA (en) 2017-02-16 2018-02-13 Routing configuration method for view file, and storage medium, terminal device and apparatus
US16/088,061 US10887171B2 (en) 2017-02-16 2018-02-13 Routing configuration method of view files, storage medium, terminal device and apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710083295.7 2017-02-16
CN201710083295.7A CN107800562B (zh) 2017-02-16 2017-02-16 一种视图文件的路由配置方法和装置

Publications (1)

Publication Number Publication Date
WO2018149395A1 true WO2018149395A1 (zh) 2018-08-23

Family

ID=61530102

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/076661 Ceased WO2018149395A1 (zh) 2017-02-16 2018-02-13 视图文件的路由配置方法、存储介质、终端设备及装置

Country Status (4)

Country Link
US (1) US10887171B2 (zh)
CN (1) CN107800562B (zh)
SG (1) SG11201809083TA (zh)
WO (1) WO2018149395A1 (zh)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111367522A (zh) * 2020-03-04 2020-07-03 上海上实龙创智慧能源科技股份有限公司 一种基于Vue.js框架的动态路由配置方法
CN113268260A (zh) * 2021-06-07 2021-08-17 京东科技控股股份有限公司 用于web前端的路由方法及装置
WO2021247119A1 (en) * 2020-06-01 2021-12-09 Microsoft Technology Licensing, Llc Service worker configured to serve multiple single page applications
CN114296704A (zh) * 2021-12-27 2022-04-08 杭州安恒信息技术股份有限公司 一种前端微服务的创建方法以及相关装置
US12278881B1 (en) 2023-10-25 2025-04-15 Microsoft Technology Licensing, Llc Domain agnostic offline runtime for single page applications

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110502232B (zh) * 2018-05-16 2023-10-10 杭州海康威视系统技术有限公司 页面应用的路由地址配置方法及配置装置
CN111399966B (zh) * 2020-06-03 2020-09-18 广东睿江云计算股份有限公司 一种隐藏网页页面的方法及系统
CN111857809B (zh) * 2020-07-30 2024-07-30 上海妙一生物科技有限公司 一种前端开发文件更新方法、装置及电子设备
CN113645138B (zh) * 2021-08-09 2022-12-09 杭州安恒信息技术股份有限公司 一种路由配置生成方法、装置、电子设备及存储介质
CN114268538A (zh) * 2021-12-08 2022-04-01 马上消费金融股份有限公司 前端路由的配置方法和装置
CN117112021B (zh) * 2023-10-24 2024-01-26 腾讯科技(深圳)有限公司 路由配置生成方法、装置、设备及计算机可读存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104283920A (zh) * 2013-07-05 2015-01-14 腾讯科技(深圳)有限公司 一种网络应用路由的方法、服务器、终端和系统
US20150278171A1 (en) * 2014-04-01 2015-10-01 Adobe Systems Incorporated Single page application authoring in a content management system
CN105630522A (zh) * 2014-10-31 2016-06-01 阿里巴巴集团控股有限公司 一种Web应用的更新方法、装置和系统
CN106126249A (zh) * 2016-06-29 2016-11-16 武汉斗鱼网络科技有限公司 一种在前端实现行为、数据、视图联动的方法及系统

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150007278A1 (en) * 2013-06-28 2015-01-01 Business Objects Software Ltd. Authentication for single page web interfaces
US9244660B2 (en) * 2013-08-13 2016-01-26 Salesforce.Com, Inc. Responsive self-service website template
US9875269B1 (en) * 2014-03-12 2018-01-23 Sprint Communications Company L.P. Collaborative editing in self-contained single page applications
US10402079B2 (en) * 2014-06-10 2019-09-03 Open Text Sa Ulc Threshold-based draggable gesture system and method for triggering events
US9967309B2 (en) * 2014-10-06 2018-05-08 Microsoft Technology Licensing, Llc Dynamic loading of routes in a single-page application
US10038605B2 (en) * 2016-02-16 2018-07-31 Microsoft Technology Licensing, Llc Processing and visualization of single-page application performance metrics
US10038736B2 (en) * 2016-02-16 2018-07-31 Microsoft Technology Licensing, Llc Real user monitoring of single-page applications

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104283920A (zh) * 2013-07-05 2015-01-14 腾讯科技(深圳)有限公司 一种网络应用路由的方法、服务器、终端和系统
US20150278171A1 (en) * 2014-04-01 2015-10-01 Adobe Systems Incorporated Single page application authoring in a content management system
CN105630522A (zh) * 2014-10-31 2016-06-01 阿里巴巴集团控股有限公司 一种Web应用的更新方法、装置和系统
CN106126249A (zh) * 2016-06-29 2016-11-16 武汉斗鱼网络科技有限公司 一种在前端实现行为、数据、视图联动的方法及系统

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111367522A (zh) * 2020-03-04 2020-07-03 上海上实龙创智慧能源科技股份有限公司 一种基于Vue.js框架的动态路由配置方法
WO2021247119A1 (en) * 2020-06-01 2021-12-09 Microsoft Technology Licensing, Llc Service worker configured to serve multiple single page applications
US11553030B2 (en) 2020-06-01 2023-01-10 Microsoft Technology Licensing, Llc Service worker configured to serve multiple single page applications
EP4447419A3 (en) * 2020-06-01 2024-12-18 Microsoft Technology Licensing, LLC Service worker configured to serve multiple single page applications
CN113268260A (zh) * 2021-06-07 2021-08-17 京东科技控股股份有限公司 用于web前端的路由方法及装置
CN114296704A (zh) * 2021-12-27 2022-04-08 杭州安恒信息技术股份有限公司 一种前端微服务的创建方法以及相关装置
US12278881B1 (en) 2023-10-25 2025-04-15 Microsoft Technology Licensing, Llc Domain agnostic offline runtime for single page applications

Also Published As

Publication number Publication date
US20200304366A1 (en) 2020-09-24
CN107800562B (zh) 2019-03-01
CN107800562A (zh) 2018-03-13
SG11201809083TA (en) 2018-11-29
US10887171B2 (en) 2021-01-05

Similar Documents

Publication Publication Date Title
WO2018149395A1 (zh) 视图文件的路由配置方法、存储介质、终端设备及装置
CN108399256B (zh) 异构数据库内容同步方法、装置及中间件
US10990511B2 (en) Apparatus and application interface traversing method
EP3072070B1 (en) Callpath finder
US9229691B2 (en) Method and apparatus for programming assistance
WO2020211236A1 (zh) 基于b+树的读写冲突解决方法、装置及存储介质
CN103559301A (zh) 更新数据的方法、数据库触发器和搜索引擎
US20190005057A1 (en) Methods and Devices for File Folder Path Identification and File Folder Cleaning
CN105677243A (zh) 数据写入装置及方法
WO2014117337A1 (zh) 数据更新方法及装置和产品
CN108491326A (zh) 测试行为重组方法、装置及存储介质
CN101499064A (zh) 建立模式匹配状态机的方法及装置
CN103412824B (zh) 写时拷贝快照方法及装置
JP2021002326A (ja) ソフトウェアプログラムにおける静的分析違反の修復パターンの精緻化
US20160154851A1 (en) Computing device, storage medium, and data search method
JP2016099857A (ja) 不正プログラム対策システムおよび不正プログラム対策方法
CN104700030A (zh) 一种病毒数据查找方法、装置及服务器
CN110825947A (zh) Url去重方法、装置、设备与计算机可读存储介质
CN107301177A (zh) 一种文件存储方法及装置
WO2019001321A1 (zh) 一种yang模型扩展校验的方法及装置、计算机可读存储介质
WO2014187216A1 (zh) 数据库结构对象处理方法及装置
CN108280085A (zh) 数据去重的方法及装置
WO2024052991A1 (ja) テストスクリプト修正装置、テストスクリプト修正方法及びプログラム
CN105701147B (zh) 可配置数据转移管理装置
HK1250105B (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: 18753729

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 21/11/2019)

122 Ep: pct application non-entry in european phase

Ref document number: 18753729

Country of ref document: EP

Kind code of ref document: A1