CN113656281B - Method for dynamically expanding functions on Web line in real time - Google Patents
Method for dynamically expanding functions on Web line in real time Download PDFInfo
- Publication number
- CN113656281B CN113656281B CN202110780238.0A CN202110780238A CN113656281B CN 113656281 B CN113656281 B CN 113656281B CN 202110780238 A CN202110780238 A CN 202110780238A CN 113656281 B CN113656281 B CN 113656281B
- Authority
- CN
- China
- Prior art keywords
- expansion
- function
- point
- page
- real time
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
- Stored Programmes (AREA)
Abstract
The invention discloses a method for dynamically expanding functions on a Web line in real time, which comprises the steps of creating an expansion point unique identification code data structure and a buried point function of an expansion point; creating the name of the expansion point, the name of the function to be executed by the expansion point, designating the execution sequence of the function associated with the specific expansion point, and the number of parameters of a callback function structure associated with the expansion point; constructing a page and executing a main expansion point skeleton; setting and warehousing associated extension point callback function information, providing background configuration, and storing associated information into a data table; and the running state normally calls back the function to finish the user demand; if the execution callback function is abnormal, the association mark is abnormal, and the next running operation is not performed to automatically drop the abnormal extension function. According to the invention, through the dynamic expansion module, the function of the expansion module, the expansion page elements and the expansion points are independent, the development code quantity is simplified, the period of integrated test and regression test is reduced, the development working efficiency is improved, and the market response speed is improved.
Description
Technical Field
The invention relates to the technical field of computers, in particular to a method for dynamically expanding functions on a Web line in real time.
Background
Enterprise software often faces functional requirement adjustment after online, especially in the B test stage, its root causes are changes in market environment during long development period, changes in technology platform, capability accepted by actual users, etc., currently widely adopted or traditional new requirement development, integrated test, regression test, module (service) integral compilation packaging, traditional development flow of module (service) release, how to solve the problems of rapid iteration and dynamic update of online systems, and no effective solution has been proposed at present.
Disclosure of Invention
Aiming at the technical problems in the related art, the invention provides a method for dynamically expanding functions on a Web line in real time, which can overcome the defects of the prior art method.
In order to achieve the technical purpose, the technical scheme of the invention is realized as follows:
a method for dynamically expanding functions on a Web line in real time comprises the following steps:
s1, creating an expansion point unique identification code data structure, and creating a plurality of function sets, an execution priority field and an execution or non-execution field in the structure;
s2, creating a buried point function of the extension point, wherein the buried point function is provided with an extension point name and an additional function which is transmitted to the calling function;
s3, associating the expansion point function, creating the name of the expansion point, the name of the function to be executed by the expansion point, designating the execution sequence of the function associated with the specific expansion point, and the number of parameters received by the callback function of the associated expansion point;
s4, constructing a page and executing a main expansion point skeleton;
s5, associating expansion points to expand the function modules, and carrying out expansion points of the expansion module sublevel and the page sublevel;
s6, setting and warehousing associated extension point callback function information, providing background configuration by all the associated extension point callback function settings, storing associated information into a data table, matching the flow in the data table, and dynamically executing association with the flow; and the running state normally calls back the function to finish the user demand;
and S7, monitoring the expansion point, if the callback function is executed and is abnormal, marking the association as abnormal, and automatically disconnecting the abnormal expansion function when the callback function is operated next time.
Further, in step S1, the function set includes two fields, namely, creating a function name and whether a parameter is required to be transmitted.
Further, in step S4, the main extension point skeleton includes a background function extension point definition, a front-end page theme loading completion extension point definition, an initialization application extension point definition, and an application loading extension point definition.
Further, in step S5, if the theme of the front page is expanded, the page is laid out up, down, and the expansion function is added to the global expansion point queue first, and the custom expansion point is implemented in the expansion function and added to the global expansion point queue.
Further, in step S5, expanding the sub-level expansion points of the page, processing the reserved expansion points at the html tags of the web surface, adding the expansion points when the page is manufactured, searching for form tags, setting new screening conditions at the beginning and the end of the form respectively, associating the expansion points respectively according to requirements, and realizing the function of adding page elements.
Further, the global expansion queue comprises a header file, a content file and a folder file.
The invention has the beneficial effects that: the dynamic expansion module, the function of the expansion module, the expansion page element and the expansion point are independent, so that the development code quantity is simplified, the period of integrated test and regression test is reduced, the development working efficiency is improved, and the market response speed is improved; planning is carried out from two dimensions of the page and the background function, so that new demands are promoted to be expanded from the two dimensions of the page and the background function, and the method is adopted to independently develop independent tests, independently release and timely take effect to improve delivery efficiency; meanwhile, the normal expansion point elimination problem expansion point is maintained through the operation monitoring of the expansion point, and the stability of the system upgrade on the delivery quality guarantee line is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic diagram of an overall framework of a method for dynamically expanding functions on a Web line in real time according to an embodiment of the present invention.
Fig. 2 is a schematic diagram of a first stage structure of a hot-loading skeleton custom function of a method for dynamically expanding functions on a Web line in real time according to an embodiment of the present invention.
FIG. 3 is a schematic diagram of a second stage structure of a thermally loaded skeleton custom function of a method for dynamically expanding functions on a Web line in real time according to an embodiment of the present invention.
Fig. 4 is a schematic diagram of a presentation page stage structure of a method for dynamically expanding functions on a Web line in real time according to an embodiment of the present invention.
Fig. 5 is a schematic view of an extended page structure of a method for dynamically extending functions on a Web line in real time according to an embodiment of the present invention.
FIG. 6 is a schematic diagram of a page header component loading structure for a method of dynamically expanding functions on a Web line in real time according to an embodiment of the present invention.
Fig. 7 is a schematic diagram of a page content loading component in a method for dynamically expanding functions on a Web line in real time according to an embodiment of the present invention.
FIG. 8 is a schematic diagram of a page tail component loading structure for a method for dynamically expanding functions on a Web line in real time according to an embodiment of the present invention.
Fig. 9 is a schematic diagram of a component C sub-page content loading structure of a method for dynamically expanding functions on a Web line in real time according to an embodiment of the present invention.
Fig. 10 is a schematic diagram of a component D sub-page content loading structure of a method for dynamically expanding functions on a Web line in real time according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention are within the scope of the present invention, and the above technical solutions of the present invention will be described in detail below by way of specific usage modes for convenience of understanding the present invention.
As shown in fig. 1, the present invention proposes a method for dynamically setting an extension point and extending the functions of an on-line system in real time based on a queue data structure, which can predefine a function extension point skeleton according to the information management characteristics of each enterprise, and form an extended extension function chain by the skeleton after being on line due to expansion, wherein the dynamic function execution (Callback) characteristics of the extension point using various languages are separated from the original system by using new requirements, and are dynamically loaded when being called.
The method for dynamically expanding the functions on the Web line in real time comprises the steps of firstly creating a data structure of an expansion point unique identification code. The data structure is as follows:
{
"expansion point unique identification code": {
"callbacks" [ {// set of execution functions
"function": "function name 1",
"hav _args": 1// if there is no parameter to be entered parameter 0, 1 there is a parameter
},
{
"function": "function name 2",
"have_args": 1// if there is no parameter to be entered parameter 0, 1 there is a parameter
}
],
"priority": { }// execution priority
"doing": false// whether to execute
}
}
A buried point function of the extension point is then created, with the extension point name created in the buried point function and additional functions passed to the calling function. The following are provided:
do_feature($tag, $arg)
the following steps: the point name must be extended.
$arg: optionally, additional parameters.
And then, associating or deleting the expansion point function, wherein the name of the expansion point, the name of the function to be executed by the expansion point, the execution sequence of the function associated with the expansion point and the number of associated parameters are required to be created. The following are provided:
add_feature( $tag, $function, $priority,$have_args )
tag (must fill), name of the extension point to be executed.
The name of the function to be executed of the expansion point (the callback function) is filled in. And (3) injection: the setting is performed according to the development language, and the setting can be a global function or a class function.
The $ priority (optional) is used to specify the order of execution of functions associated with a particular extension point. The smaller the number, the earlier the execution, the functions with the same priority execute in the order they were added to the expansion point queue.
The number of parameters accepted by the callback function of the $ have_args (optional) associated extension point.
Associating whether an extension point has been executed, a doingfeature needs to be created as follows:
doing_feature($tag)
the following steps: (must fill in) the extension point name.
As shown in fig. 2-4, building pages and executing the main extension point skeleton are performed. According to the user demand level, function demand change is mainly provided at the page level and the function level, so that a main extension point skeleton definition is as follows (note: skeleton flow can be extended according to application characteristics, such as security check and cache processing extension), and the skeleton definition needs to be implemented in a page frame file:
the main skeleton includes:
the background function extension point defines do_feature ('modules_loaded'): functional function type: a system-level module core function which needs to be executed at the beginning of a website, and a user self-defines a module function set;
the front-end page theme load extension point defines do_feature ('setup_front'): functional function type: the user self-defines a front-end theme page and a theme function;
the front-end page theme load completion extension point defines do_feature ('after_setup_front'): functional function type: the user self-defines a front-end theme page and a theme function;
initializing an application extension point definition do_feature ('init'): functional function type: initializing a configuration function and initializing the function by user-defined configuration information;
the application load extension point defines do_feature ('app_loaded'): functional function type: and (5) applying the function executed after the loading is completed.
And then, associating expansion points to expand the functional modules, starting and initializing a website to sequentially execute a system level module core function and a custom module expansion function, initializing a configuration expansion function, a front-end website theme expansion function, and applying and loading the execution expansion function, and expanding a framework flow according to application characteristics to realize functions such as configuration initialization, page redirection rules, an Ajax framework, a restful interface framework, a website theme framework, loading the system core function and the user module and the function, user permission, security check, cache processing expansion and the like.
Such as: and setting WeChat sharing.
add_feature('modules_loaded ', 'WXShare::init' )
Such as: to add a new global constant.
add_feature('init', 'Order_Constant' )
function Order_Constant(){
Order_Status = {
All: 0,// is not limited
UnPaid 1,// to pay
Cancel 2,// cancelled
Process 3,// to be validated
Reserve success 4,// predetermined success
Reserve failed 5,// predetermined failure
In dispensing 6,// dispensing
Failed: 7,// delivery failure
Complete: 8,// delivery complete
Closed 9// order closing
}
}
As shown in fig. 5-10, extension module sub-level extension points are performed. As extended for front page theme (front), pages are laid out top-down.
Extending functions and adding to a global extension point queue:
header file: do_feature ('page_header')
Content file: do_feature ('page_content')
Footer file: do_feature ('page_feature')
Custom extension points (secondary development) are implemented within the extension function and added to the global extension point queue.
Such as adding an in-station message at the top of the page.
add_feature('page_header', 'Message::init' )
Such as adding a new network authentication display at the bottom of the page.
add_feature('page_footer', 'add_certificate' )
Realize (secondary development) the expansion function.
function add_certificate(){}
Expansion points for expansion page sub-levels. And processing reserved extension points in the web page HTML tag.
If the screening condition of the expansion page is met, expansion points are added when the page is manufactured, and the search Form labels are respectively set:
do_feature ('product_page_filter_front') sets new filter conditions at the form header
do_feature ('product_page_filter_end') sets new filter conditions at the end of the form
The expansion points are respectively associated according to new requirements, and the function of adding page elements is realized, for example, screening is carried out according to manufacturers:
add_feature('product_page_filter_end', 'add_productfactor_filter')
function add_productfactor_filter(){}
the related expansion point callback function information is set and put in storage, and placement and development of the buried point function are completed by planning the possible user requirement change points in advance, for example, the buried point function is added for the current requirement change or possible related requirement change codes of the existing system.
All associated extension point callback function settings (add_feature) provide background configuration, associated information is stored in a data table feature, and when the process is executed to do_feature, matching is performed on the data table feature and association is dynamically performed; and the normal callback function of running state, finish user's demand.
And finally, monitoring an expansion point, and if the do_feature execution callback function is abnormal, marking the association as abnormal, and automatically disconnecting the expansion function when running next time.
In summary, by means of the technical scheme, the development code quantity is simplified, the period of integrated test and regression test is reduced, the development working efficiency is improved, and the market response speed is improved through the independence of the dynamic expansion module, the function of the expansion module, the expansion page element and the expansion point; planning is carried out from two dimensions of the page and the background function, so that new demands are promoted to be expanded from the two dimensions of the page and the background function, and the method is adopted to independently develop independent tests, independently release and timely take effect to improve delivery efficiency; meanwhile, the normal expansion point elimination problem expansion point is maintained through the operation monitoring of the expansion point, and the stability of the system upgrade on the delivery quality guarantee line is improved.
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather is intended to cover all modifications, equivalents, alternatives, and improvements that fall within the spirit and scope of the invention.
Claims (6)
1. The method for dynamically expanding the functions on the Web line in real time is characterized by comprising the following steps of:
s1, creating an expansion point unique identification code data structure, and creating a plurality of function sets, an execution priority field and an execution or non-execution field in the structure;
s2, creating a buried point function of the extension point, wherein the buried point function is provided with an extension point name and an additional function which is transmitted to the calling function;
s3, associating the expansion point function, creating the name of the expansion point, the name of the function to be executed by the expansion point, designating the execution sequence of the function associated with the specific expansion point, and the number of parameters received by the callback function of the associated expansion point;
s4, constructing a page and executing a main expansion point skeleton;
s5, associating expansion points to expand the function modules, and carrying out expansion points of the expansion module sublevel and the page sublevel;
s6, setting and warehousing associated extension point callback function information, providing background configuration by all the associated extension point callback function settings, storing associated information into a data table, matching the flow in the data table, and dynamically executing association with the flow; and the running state normally calls back the function to finish the user demand;
and S7, monitoring the expansion point, if the callback function is executed and is abnormal, marking the association as abnormal, and automatically disconnecting the abnormal expansion function when the callback function is operated next time.
2. The method for dynamically expanding functions on a Web line in real time according to claim 1, wherein in step S1, the function set includes two fields of creating a function name and whether a parameter is required.
3. The method for dynamically expanding functions on a Web line in real time according to claim 1, wherein in step S4, the main expansion point skeleton includes a background function expansion point definition, a front-end page theme loading completion expansion point definition, an initialization application expansion point definition, and an application loading expansion point definition.
4. The method for dynamically expanding functions on a Web line in real time according to claim 1, wherein in step S5, expansion module sub-level expansion points, if the front-end page theme is expanded, the page is in an up-down layout, the expansion functions are first added to a global expansion point queue, and custom expansion points are implemented in the expansion functions and added to the global expansion point queue.
5. The method for dynamically expanding functions on a Web line in real time according to claim 1, wherein in step S5, expanding sub-level expansion points of a page, processing reserved expansion points on html tags of a Web surface, adding expansion points when a page is manufactured, searching form tags, setting new screening conditions at the head and the tail of the form respectively, associating expansion points respectively according to requirements, and realizing the function of adding page elements.
6. The method for dynamically expanding functions on a Web line in real time according to claim 4, wherein the global expansion queue comprises a header file, a content file, a folder file.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110780238.0A CN113656281B (en) | 2021-07-09 | 2021-07-09 | Method for dynamically expanding functions on Web line in real time |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110780238.0A CN113656281B (en) | 2021-07-09 | 2021-07-09 | Method for dynamically expanding functions on Web line in real time |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113656281A CN113656281A (en) | 2021-11-16 |
CN113656281B true CN113656281B (en) | 2023-06-30 |
Family
ID=78490032
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110780238.0A Active CN113656281B (en) | 2021-07-09 | 2021-07-09 | Method for dynamically expanding functions on Web line in real time |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113656281B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102495730A (en) * | 2011-12-02 | 2012-06-13 | 曙光信息产业(北京)有限公司 | Dynamic and extendable web interface method |
CN110674025A (en) * | 2018-07-03 | 2020-01-10 | 百度在线网络技术(北京)有限公司 | Interactive behavior monitoring method and device and computer equipment |
CN112579846A (en) * | 2020-12-30 | 2021-03-30 | 北京秒针人工智能科技有限公司 | Visualization method and system for user behavior track |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8095574B2 (en) * | 2008-07-31 | 2012-01-10 | International Business Machines Corporation | Dynamically mapping and maintaining a customized method set of tags particular to an extention point |
US9251026B2 (en) * | 2012-03-31 | 2016-02-02 | Bmc Software, Inc. | Application instrumentation code extension |
-
2021
- 2021-07-09 CN CN202110780238.0A patent/CN113656281B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102495730A (en) * | 2011-12-02 | 2012-06-13 | 曙光信息产业(北京)有限公司 | Dynamic and extendable web interface method |
CN110674025A (en) * | 2018-07-03 | 2020-01-10 | 百度在线网络技术(北京)有限公司 | Interactive behavior monitoring method and device and computer equipment |
CN112579846A (en) * | 2020-12-30 | 2021-03-30 | 北京秒针人工智能科技有限公司 | Visualization method and system for user behavior track |
Also Published As
Publication number | Publication date |
---|---|
CN113656281A (en) | 2021-11-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105069118B (en) | A kind of application scenarios management method and system based on GIS configurations | |
CN108845950A (en) | Test device, the method for test and storage medium | |
CN108829485A (en) | Update method, device, storage medium and the computer equipment of application interface layout | |
CN110908712A (en) | Data processing method and equipment for cross-platform mobile terminal | |
CN111459503B (en) | Web front-end project deployment method, device, server and storage medium | |
CN101286212A (en) | Business flow path execution method, business flow path engines and its deployment method | |
CN111090431B (en) | Data processing method and device | |
CN109753532A (en) | Interface service system and its implementation method for browser end access database | |
CN106354748A (en) | Webpage generation method and device | |
CN106874028A (en) | Using dispositions method and device | |
CN110309099A (en) | Interface managerial method, device, equipment and computer readable storage medium | |
CN109189380A (en) | Algorithm integration frame and method | |
CN109740765A (en) | A kind of machine learning system building method based on Amazon server | |
CN110297761A (en) | Acquisition methods, device, computer equipment and the storage medium of returned data | |
CN109936605A (en) | A kind of method and apparatus of loading interface data | |
CN101989294A (en) | Distributed file resolving method and resolving system | |
CN115860451A (en) | Flow operation method and device, electronic equipment and storage medium | |
CN106951227B (en) | Method and device for updating navigation bar | |
CN113259397B (en) | Method, device and equipment for executing plan and readable storage medium | |
CN113656281B (en) | Method for dynamically expanding functions on Web line in real time | |
CN114443239B (en) | Method and device for injecting container | |
CN110058849A (en) | Generation method, device, computer equipment and the storage medium of flow chart | |
CN116466915A (en) | MVP architecture-based iOS development framework construction method and device | |
CN108804236B (en) | AIDL file sharing method and system | |
CN110599112A (en) | Method and device for developing and maintaining network page |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |