A front-end and back-end debugging system based on browser plug-in and its use method
By designing a front-end and back-end debugging system based on browser plug-ins, the problem of lack of feedback and complex defect positioning of browser plug-ins after debugging is solved, and rapid judgment and precise positioning are achieved, and plug-in performance and system performance are improved.
Patent Information
- Application Number
- CN202410613680.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-17
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2044-05-17
AI Technical Summary
The existing browser plug-ins lack feedback mechanism after front-end debugging, resulting in complex defect positioning, and it is impossible to quickly determine whether the program entity contains defects and lacks optimization processing.
Design a front-end and back-end debugging system based on browser plug-ins, including basic framework construction unit, data architecture application unit, browser plug-in development unit and debugging and optimization unit. Through the front-end separation module, debug feedback module and performance optimization module, it can realize The front-end debugging and performance optimization of the plug-in is used to optimize the index using the random search method and the Lucene search engine.
It realizes a quick judgment on whether the plug-in contains defects and accurately position it, reduces the complexity of defect retrieval, improves the performance of the plug-in and the overall system performance through optimization processing, and improves user experience and development efficiency.
Smart Images

Figure CN118535469B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a front-end and back-end debugging system based on a browser plug-in and a use method thereof. Background Art
[0002] A browser plug-in is a program that has its own running process and method. The plug-in is just a program that supplements the program. To ensure the compatibility between the plug-in and the browser, different plug-ins need to be debugged before formal application.
[0003] For example, the "Code Injection Browser Plug-in Automatic Operation Method and System" provided by Chinese Patent Publication No. CN114356433B includes the following steps: Step S10, creating an RPA and a plug-in carrying automation code; Step S20, loading the plug-in in the browser to obtain the browser's debugging permissions and the plug-in's communication permissions with the RPA; Step S30, the RPA opens the plug-in and developer tools based on the debugging permissions, and injects the automation code into the plug-in through the developer tools to obtain the automation plug-in; Step S40, the automation plug-in receives the operation instructions sent by the RPA based on the communication permissions, and then performs the automation operation.
[0004] In the above patent, although the problem of unsatisfactory application scope and functionality of browser plug-ins is solved by creating automated codes and plug-ins, there is a lack of feedback stage for debugging results after the front-end and back-end debugging of the plug-in, so it is impossible to quickly determine whether the program entity contains defects based on the feedback results. If the program entity contains defects, there is no guarantee that the use of the plug-in requires optimization of the defects. At this time, when locating the defect, it is necessary to search the programs one by one, which increases the complexity of the retrieval.
[0005] In view of this, the present application intends to propose a front-end and back-end debugging system based on a browser plug-in and a method of using the same. Summary of the invention
[0006] The purpose of the present invention is to provide a browser plug-in-based front-end and back-end debugging system and a method of using the same to solve the above problems.
[0007] To achieve the above object, the present invention provides the following technical solutions:
[0008] A front-end and back-end debugging system based on a browser plug-in, comprising a basic framework construction unit, a data architecture application unit, a browser plug-in development unit and a debugging and optimization unit;
[0009] The basic framework construction unit is used to build an information processing platform based on the B / S architecture, abstract various business requirements and data types, establish a relationship model, design data structure and business logic according to the relationship model, provide data storage, processing and business logic functions through the platform, and provide Web services to the outside world;
[0010] The data architecture application unit is used to perform simulation experiments on the framework constructed in the basic framework construction unit. If the experimental results can meet the preset functions of the architecture, the architecture is loaded into the system for application;
[0011] The browser plug-in development unit is used to develop plug-ins that are compatible with the current browser, and to test and use the plug-ins;
[0012] The debugging and optimization unit is used to perform front-end and back-end debugging on the plug-in, and optimize the performance of the front-end and back-end and the database according to the feedback results.
[0013] Furthermore, the basic framework construction unit includes a front-end construction module, a back-end construction module, a front-end and back-end separation module, and a separation optimization module;
[0014] The front-end building module uses the React-based Ant Design framework to build the front-end, and quickly parses and renders HTML and Java files through the browser to present visual content;
[0015] The backend construction module uses ASP.Net Core to build WebApi applications to implement backend construction, provide data processing and business logic functions, establish a backend database, and provide a calling interface to the front end through WebApi;
[0016] The front-end and back-end separation module is used for the back-end to provide a Restful API, the front-end sends an API request, obtains data to render the page, performs a simulation test on the front-end, and the back-end uses junit to perform API unit testing. After the test is completed, the connection is performed and the nginx reverse proxy is used to complete the front-end and back-end separation;
[0017] The separation optimization module is used to query and compare the separation results output by the front-end and back-end separation modules, and optimize the separation results after comparison.
[0018] Furthermore, the separation optimization module adopts a random search method when optimizing the front-end and back-end separation.
[0019] Furthermore, the browser plug-in development unit includes a user demand acquisition module, a plug-in automatic generation module, a plug-in operation test module and a test result output module;
[0020] The user demand acquisition module is used to display and receive user click events through the interactive layer, output event response results, complete the processing of user request events, and obtain user demand data;
[0021] The plug-in automatic generation module is used to receive the user data in the user demand acquisition module, perform feasibility analysis, and then automatically generate a browser plug-in that meets the user's needs. The plug-in functions include image information uploading, information recognition and information export;
[0022] The plug-in operation test module is used to quickly activate the plug-in generated in the plug-in automatic generation module, and then perform image information recognition and text export tests on the plug-in, and the test results are input into the test result output module;
[0023] The test result output module is used to generate a test report based on the test results in the plug-in running test module.
[0024] Furthermore, the debugging and optimization unit includes a front-end debugging module, a back-end debugging module, a debugging feedback module and a performance optimization module;
[0025] The front-end debugging module is used to perform front-end debugging on the plug-in with the help of the debugging capability of the browser, and the debugging result is sent to the debugging feedback module;
[0026] The backend debugging module uses CloudIDE itself to perform backend debugging on the plug-in and sends the debugging results to the debugging feedback module;
[0027] The debugging feedback module is used to compare the data before and after the front-end and back-end debugging, and use the defect location matrix to determine whether the program entity of the plug-in contains defects. If there are defects, the defects are located and a signal is sent to the performance optimization module;
[0028] The performance optimization module is used to receive the signal sent by the debugging feedback module and optimize the current plug-in.
[0029] Furthermore, when the front-end debugging module optimizes the front-end, the specific steps are as follows:
[0030] A1. Identify the function location of the code to be debugged, switch to the debugging instance, and call out the developer tools.
[0031] A2. Find the homepage of the plug-in in the page list, expand it down level by level, enter the search command, enter the name of the function to be debugged in the search box, find the function and set a breakpoint at the location where debugging is required in the function body;
[0032] A3. Click the refresh button on the browser to reload the page and hit the point where the page was interrupted in the above steps to complete the front-end debugging.
[0033] Furthermore, the performance optimization module also includes:
[0034] B1. Front-end optimization: By merging and compressing files, using image sprites and inline images to reduce HTTP requests, using CDN acceleration, enabling caching, delaying the loading of non-viewport content, and speeding up the loading of the first screen;
[0035] B2. Backend optimization: Use cache and asynchronous processing to optimize the code, adjust server parameters, use load balancing, vertical and horizontal expansion, enable cache system, reduce the number of database accesses, and use compression software to compress data during output;
[0036] B3. Database optimization: optimize indexes and queries in turn, use paging query function to reduce the amount of returned data after query, and perform batch processing when inserting, updating and deleting data.
[0037] Furthermore, when optimizing the index, the Lucene search engine is used to perform word segmentation processing on the current file content, and after the processing, an index is created based on the word segmentation result.
[0038] Furthermore, when the debugging feedback module determines whether the program contains defects, the matrix data is used to calculate the suspiciousness of each program entity, and the program entities are judged in descending order of the suspiciousness. The expression of the defect location matrix is as follows:
[0039]
[0040] In the formula, the left matrix represents the coverage of a program containing L program entities after running K test cases, and the right matrix records the execution results of K test cases, that is, success or failure.
[0041] A method for using a front-end and back-end debugging system based on a browser plug-in, comprising the following steps:
[0042] S1. Build the basic framework of the system through the basic framework building unit, perform separation processing after the front-end and back-end are built, and then quickly optimize the separation results. After optimization, apply the data architecture in the system;
[0043] S2. Obtain user requirements using the user requirements acquisition module, build a browser plug-in based on the requirements, perform performance testing on the generated plug-in, and determine whether there are any abnormalities when the plug-in is running;
[0044] S3. Debug the front-end and back-end of the plug-in, input the debugging results into the debugging feedback module, and back up them to the local and cloud databases for storage;
[0045] S4. Determine whether the program entity contains defects based on the debugging results, locate the defects, and then start optimization processing of the plug-in performance.
[0046] Beneficial effects of the present invention:
[0047] 1. In the present invention, the plug-in can be tested after it is generated by running the test module through the plug-in, so as to ensure the normal operation of the plug-in in the system. The debugging results of the front and back ends are obtained by the debugging feedback module, and the debugging results are compared with the standard data in the database. It is judged whether the plug-in needs to be optimized according to the comparison results, and then the relevant data of the feedback results are input into the matrix calculation, so that the defects in the program entity can be quickly judged and located. Since the location of program defects is relatively accurate, there is no need to search the program body one by one, which reduces the complexity of defect retrieval. The front end, back end and database of the plug-in can be optimized in turn through the performance optimization module, which can ensure the use effect of the plug-in in the system.
[0048] 2. In the present invention, by establishing the front end and the back end, the back end can be used to improve data support for the front end, and the front end can be used to realize data display and interaction, and assist in realizing the functions of the basic framework. The front-end and back-end separation modules can get rid of the mutual dependence between the front-end and back-end architectures of the plug-in, reduce the coupling degree of the system, improve development efficiency and deployment efficiency, improve the synergy of the system, speed up page loading speed, reduce network delay, improve user experience, reduce resource consumption, and calmly improve the overall performance of the system. The query speed of the database can be increased through indexes with a higher degree of matching, and the query delay degree can be reduced, which assists in debugging the back-end database, thereby ensuring the efficient response of the system when in use. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 A system block diagram of a front-end and back-end debugging system based on a browser plug-in and a method for using the same in the present invention;
[0050] Figure 2 A basic framework construction unit system diagram of a front-end and back-end debugging system based on a browser plug-in and a method for using the same in the present invention;
[0051] Figure 3 A system diagram of a browser plug-in development unit of a front-end and back-end debugging system based on a browser plug-in and a method for using the same in the present invention;
[0052] Figure 4 A system diagram of a debugging and optimization unit of a front-end and back-end debugging system based on a browser plug-in and a method for using the same in the present invention.
[0053] In the figure: 1. Basic framework construction unit; 11. Front-end construction module; 12. Back-end construction module; 13. Front-end and back-end separation module; 14. Separation optimization module; 2. Data architecture application unit; 3. Browser plug-in development unit; 31. User demand acquisition module; 32. Plug-in automatic generation module; 33. Plug-in operation test module; 34. Test result output module; 4. Debugging and optimization unit; 41. Front-end debugging module; 42. Back-end debugging module; 43. Debugging feedback module; 44. Performance optimization module. DETAILED DESCRIPTION
[0054] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0055] Embodiment 1
[0056] See also Figure 1-4 ,This design proposes an implementation method, a front-end and back-end debugging system based on browser plug-ins, including a basic framework construction unit 1, a data architecture application unit 2, a browser plug-in development unit 3 and a debugging and optimization unit 4;
[0057] The basic framework construction unit 1 is used to build an information processing platform based on the B / S architecture, abstract various business requirements and data types, establish a relational model, design data structure and business logic according to the relational model, provide data storage, processing and business logic functions through the platform, and provide Web services to the outside world;
[0058] The data architecture application unit 2 is used to perform simulation experiments on the framework constructed in the basic framework construction unit 1. If the experimental results can meet the preset functions of the architecture, the architecture is loaded into the system for application;
[0059] The browser plug-in development unit 3 is used to develop plug-ins adapted to the current browser, and to test and use the plug-ins;
[0060] The debugging and optimization unit 4 is used to debug the front-end and back-end of the plug-in, and optimize the performance of the front-end, back-end and database according to the feedback results.
[0061] The basic framework construction unit 1 includes a front-end construction module 11, a back-end construction module 12, a front-end and back-end separation module 13 and a separation optimization module 14; the front-end construction module 11 uses the React-based Ant Design framework to connect the front end, and quickly parses and processes HTML and Java files through the browser and renders them to present visual content; the back-end construction module 12 uses ASP.NetCore to build a WebApi application to realize back-end construction, provide data processing and business logic functions, establish a back-end database, and provide a calling interface to the front end through WebApi; the front-end and back-end separation module 13 is used to provide a Restful API to the back end, the front end sends an API request, obtains data rendering pages, and performs simulation tests on the front end. The back end uses junit to perform API unit testing, and after the test is completed, docking is performed, and nginx reverse proxy is used to complete the front-end and back-end separation; the separation optimization module 14 is used to query and compare the separation results output by the front-end and back-end separation module 13, and optimizes the separation results after comparison. When the separation optimization module 14 optimizes the front-end and back-end separation, a random search method is used.
[0062] The browser plug-in development unit 3 includes a user demand acquisition module 31, a plug-in automatic generation module 32, a plug-in operation test module 33 and a test result output module 34; the user demand acquisition module 31 is used to display and receive user click events through the interactive layer, output event response results, complete the processing of user request time, and obtain user demand data; the plug-in automatic generation module 32 is used to receive user data in the user demand acquisition module 31, perform feasibility analysis, and then automatically generate a browser plug-in that meets user needs. The plug-in functions include image information uploading, information recognition and information export; the plug-in operation test module 33 is used to quickly activate the plug-in generated in the plug-in automatic generation module 32, and then perform image information recognition and text export tests on the plug-in, and the test results are input into the test result output module 34; the test result output module 34 is used to generate a test report with the test results in the plug-in operation test module 33.
[0063] In this embodiment, the framework constructed by the basic framework construction unit 1 can be experimentally verified through the data architecture application unit 2, and then the application of the architecture is realized by loading it into the system. When the back-end is constructed, a back-end database can be established to provide information data entry, list data realization, file category data management, data acquisition and status monitoring functions, and then a targeted interface is established to transmit the back-end data to the front-end and present it at the front-end. The constructed front-end and back-end can be separated by the front-end and back-end separation module 13. After separation, the user's interactive experience can be improved. When the user uses a browser to access the application page, there is no need to reload it, which improves the page response speed. In this process, the server does not need to render, which can save server resources, reduce the amount of data exchanged between the front-end and back-end data, and reduce network traffic, thereby reducing the server load, ensuring smooth server operation, and improving the response speed to user operations. Since the front-end and the back-end are separated, the coupling degree of the front-end and the back-end of the plug-in is low, and different technologies can be implemented to expand functions and provide different functional services. The target data is searched by a random search method, which is convenient for improving the randomness when capturing the target data and improving the accuracy of querying and comparing the separation results.
[0064] Behavioral data highly associated with the user can be obtained based on user searches, click events, and event responses in the interactive layer. After screening and classifying the above-mentioned behavioral data, the current user's demand data can be obtained. A plug-in is generated based on the demand data to meet the user's basic needs and achieve a high degree of matching between the plug-in and the user. By testing the plug-in's image information upload, information recognition, and information export functions, it can be ensured that the plug-in provides stable services to users and provides users with a resource acquisition platform. The test report provided by the test result output module 34 is a visual report, which is convenient for intuitively displaying the advantages and disadvantages of the current plug-in function, and is convenient for subsequent programmers to optimize the related programs of the plug-in function and upgrade and manage the plug-in function.
[0065] Embodiment 2
[0066] See also Figure 1-4 ,This design proposes an implementation method, a front-end and back-end debugging system based on a browser plug-in, the debugging and optimization unit 4 includes a front-end debugging module 41, a back-end debugging module 42, a debugging feedback module 43 and a performance optimization module 44;
[0067] The front-end debugging module 41 is used to perform front-end debugging of the plug-in with the help of the browser's debugging capabilities, and the debugging results are sent to the debugging feedback module 43; the back-end debugging module 42 uses CloudIDE itself to perform back-end debugging of the plug-in, and sends the debugging results to the debugging feedback module 43; the debugging feedback module 43 is used to compare the data before and after the front-end and back-end debugging, and use the defect location matrix to determine whether the program entity of the plug-in contains defects. If a defect exists, the defect is located and a signal is sent to the performance optimization module 44; the performance optimization module 44 is used to receive the signal sent by the debugging feedback module 43 and optimize the current plug-in.
[0068] When the front-end debugging module 41 optimizes the front-end, the specific steps are as follows:
[0069] A1. Identify the function location of the code to be debugged, switch to the debugging instance, and call out the developer tools.
[0070] A2. Find the homepage of the plug-in in the page list, expand it down level by level, enter the search command, enter the name of the function to be debugged in the search box, find the function and set a breakpoint at the location where debugging is required in the function body;
[0071] A3. Click the refresh button on the browser to reload the page and hit the point where the page was interrupted in the above steps to complete the front-end debugging.
[0072] In this embodiment, through the debugging of the front-end and back-end, preliminary adjustments to the front-end and back-end can be achieved, making the front-end and back-end more suitable for current user needs. When optimizing the front-end, full use is made of developer tools. By locating and searching for debugging functions, precise regulation of functions can be achieved to avoid function search and debugging errors. When debugging the back-end, CloudIDE itself is used to process plug-ins to avoid calling other programs, which can reduce the search and calculation workload of the server, thereby reducing the server load and improving the server's response speed.
[0073] The performance optimization module 44 also includes the following steps when optimizing the plug-in:
[0074] B1. Front-end optimization: By merging and compressing files, using image sprites and inline images to reduce HTTP requests, using CDN acceleration, enabling caching, delaying the loading of non-viewport content, and speeding up the loading of the first screen;
[0075] B2. Backend optimization: Use cache and asynchronous processing to optimize the code, adjust server parameters, use load balancing, vertical and horizontal expansion, enable cache system, reduce the number of database accesses, and use compression software to compress data during output;
[0076] B3. Database optimization: optimize indexes and queries in turn, use paging query function to reduce the amount of returned data after query, and perform batch processing when inserting, updating and deleting data.
[0077] When optimizing the index, the Lucene search engine is used to perform word segmentation on the current file content, and then an index is created based on the word segmentation results.
[0078] In this example, by using compression tools to compress image information, the memory occupied by information can be reduced, and then the overall storage space can be increased through caching, which is convenient for accelerating network traffic, improving the optimization effect on the front end, and realizing the speed-up of the front end response. By adjusting the server parameters, a data cache space is established, which is convenient for the plug-in to query the information stored in the cache space, thereby effectively reducing the number of plug-ins accessing the database. Through the Lucene search engine, an index highly associated with the current plug-in can be established, thereby facilitating batch processing of data inside the database, shortening the database's processing time for data, and improving the system's response speed.
[0079] When the debugging feedback module 43 determines whether the program contains defects, the matrix data is used to calculate the suspiciousness of each program entity, and the program entities are judged in descending order of the suspiciousness. The expression of the defect location matrix is as follows:
[0080]
[0081] In the formula, the left matrix represents the coverage of a program containing L program entities after running K test cases, and the right matrix records the execution results of K test cases, that is, success or failure.
[0082] In this embodiment, an association with the judgment result is established through a matrix, and the suspicion of the program entity can be calculated through the matrix, so that multiple program entities are sorted according to the level of suspicion, which is convenient for the system to effectively traverse the current program entity and avoid duplication and omission during program traversal. The program body with defects can be quickly located through the sorting results, and the current program body is verified after positioning, and a signal is sent to the background programmer. When the programmer receives the signal, the defects of the program body are repaired in time. After the repair, the program body is calculated again using the matrix, thereby ensuring the repair effect of the program body.
[0083] Embodiment 3
[0084] See also Figure 1-4 This design proposes an implementation method, a method for using a front-end and back-end debugging system based on a browser plug-in, comprising the following steps:
[0085] Step 1: Build the basic framework of the system through the basic framework building unit 1, perform separation processing after the front-end and back-end are built, and then quickly optimize the separation results. After optimization, apply the data architecture in the system;
[0086] Step 2: Utilize the user demand acquisition module 31 to acquire user demand, build a browser plug-in according to the demand, perform performance testing on the generated plug-in, and determine whether there is an abnormality when the plug-in is running;
[0087] Step 3: Debug the front-end and back-end of the plug-in, input the debugging results into the debugging feedback module 43, and back up to the local and cloud databases for storage;
[0088] Step 4: Determine whether the program entity contains defects based on the debugging results, locate the defects, and then start optimizing the plug-in performance.
[0089] In this embodiment, an information processing platform can be built based on the B / S architecture through the basic framework construction unit 1. Through the abstract processing of data and the establishment of a relationship model, the various functions of the platform can be realized, thereby serving the construction and use of the entire system. The data architecture application unit 2 is used to perform simulation experiments to verify the feasibility of the current data architecture and ensure the normal use of the architecture during operation. The data collected by the system interaction layer and the service layer can assist in analyzing user needs, and a browser plug-in that meets user behavior is established based on user needs. The generated plug-in has the functions of uploading, identifying and exporting image information. Through performance testing of the plug-in, the stable operation of the plug-in in the system can be guaranteed. By using the front-end and back-end debugging and optimization of the plug-in, functional assistance for the plug-in can be achieved, and defects when the plug-in is used can be reduced, thereby ensuring the use effect of the plug-in.
[0090] In the present invention, the front-end and back-end of the basic framework can be constructed by the front-end construction module 11 and the back-end construction module 12, the front-end and back-end separation module 13 can be used to realize the separation of the front-end and back-end, and the separation optimization module 14 can be used to optimize the separation result, which can further improve the separation effect of the front-end and back-end. The front-end and back-end can realize parallel development of the software system, reduce the coupling degree of the system, and improve the development efficiency and deployment efficiency. The data architecture application unit 2 can assist the application of the entire architecture, and the user demand acquisition module 31 can be used to obtain the current user's needs at the front end, and the acquired data is stored in the matching back-end database. The preliminary processing of the data can be realized through the information data entry, list data realization and file category data management, and the data is monitored based on the current processing. The plug-in automatic generation module 32 is used to generate a plug-in adapted to the current browser, and the plug-in operation test module 33 is used to test the image information recognition and text export of the plug-in to ensure the feasibility of the plug-in operation;
[0091] The front-end debugging module 41 and the back-end debugging module 42 can be used to debug the plug-in, respectively. The debugging feedback module 43 can be used to obtain the debugging results of the front-end and back-end of the plug-in. Based on the comparison of the data, it can be determined whether the program entity has defects and the defects can be located. The location can avoid the system from searching the program one by one, thereby shortening the normal duration of the plug-in optimization. The performance optimization module 44 can be used to optimize the front-end, back-end and database, respectively, to enhance the index. After the front-end optimization, the page loading speed can be accelerated, the network delay can be reduced, the user experience can be improved, the resource consumption can be reduced, and the system performance can be improved. When performing index optimization, by creating a matching index, the full table scan can be avoided, the query operation can be accelerated, and the query speed of the database can be improved by using the index reasonably. By writing efficient query statements, inefficient nested loops and subqueries can be avoided, thereby accelerating the query.
[0092] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A front-end and back-end debugging system based on a browser plug-in, characterized in that: It includes basic framework construction unit (1), data architecture application unit (2), browser plug-in development unit (3) and debugging and optimization unit (4); The basic framework construction unit (1) is used to build an information processing platform based on a B / S architecture, abstract various business requirements and data types, establish a relationship model, design data structure and business logic based on the relationship model, provide data storage, processing and business logic functions through the platform, and provide Web services to the outside world; The basic framework construction unit (1) comprises a front-end construction module (11), a back-end construction module (12), a front-end and back-end separation module (13) and a separation optimization module (14); The front-end construction module (11) uses the Ant Design framework based on React to build the front-end, and quickly parses and processes HTML and Java files through the browser and renders them to present visual content; The backend construction module (12) uses ASP.Net Core to build a WebApi application to implement backend construction, provide data processing and business logic functions, establish a backend database, and provide a calling interface to the front end through WebApi; The front-end and back-end separation module (13) is used for the back-end to provide a Restful API, the front-end to send an API request, obtain data to render a page, perform a simulation test on the front-end, and the back-end to perform an API unit test using junit. After the test is completed, the connection is performed and the nginx reverse proxy is used to complete the front-end and back-end separation. The separation optimization module (14) is used to query and compare the separation results output by the front-end and back-end separation modules (13), and optimize the separation results after comparison. When the separation optimization module (14) optimizes the front-end and back-end separation, a random search method is used; The data architecture application unit (2) is used to perform a simulation experiment on the framework constructed in the basic framework construction unit (1); if the experimental result can meet the preset function of the architecture, the architecture is loaded into the system for application; The browser plug-in development unit (3) is used to develop a plug-in adapted to the current browser, and to test and use the plug-in; The browser plug-in development unit (3) comprises a user demand acquisition module (31), a plug-in automatic generation module (32), a plug-in operation test module (33) and a test result output module (34); The user demand acquisition module (31) is used to display and receive user click events through the interactive layer, output event response results, complete the processing of user request events, and obtain user demand data; The plug-in automatic generation module (32) is used to receive user data in the user demand acquisition module (31), perform feasibility analysis, and then automatically generate a browser plug-in that meets the user's needs. The plug-in functions include image information uploading, information recognition, and information exporting; The plug-in operation test module (33) is used to quickly activate the plug-in generated in the plug-in automatic generation module (32), and then perform image information recognition and text export tests on the plug-in, and the test results are input into the test result output module (34); The test result output module (34) is used to generate a test report based on the test results in the plug-in running test module (33); The debugging and optimization unit (4) is used to perform front-end and back-end debugging on the plug-in, and optimize the performance of the front-end and back-end and the database according to the feedback results; The debugging and optimization unit (4) comprises a front-end debugging module (41), a back-end debugging module (42), a debugging feedback module (43) and a performance optimization module (44); The front-end debugging module (41) is used to perform front-end debugging on the plug-in by means of the debugging capability of the browser, and the debugging result is sent to the debugging feedback module (43); The backend debugging module (42) uses CloudIDE itself to perform backend debugging on the plug-in and sends the debugging result to the debugging feedback module (43); The debugging feedback module (43) is used to compare the data before and after the front-end and back-end debugging, and use the defect location matrix to determine whether the program entity of the plug-in contains a defect. If a defect exists, the defect is located and a signal is sent to the performance optimization module (44); The performance optimization module (44) is used to receive the signal sent by the debugging feedback module (43) and optimize the current plug-in.
2. A front-end and back-end debugging system based on a browser plug-in according to claim 1, characterized in that: When the front-end debugging module (41) debugs the front-end, the specific steps are as follows: A1. Identify the function location of the code to be debugged, switch to the debugging instance, and call out the developer tools. A2. Find the homepage of the plug-in in the page list, expand it down level by level, enter the search command, enter the name of the function to be debugged in the search box, find the function and set a breakpoint at the location where debugging is required in the function body; A3. Click the refresh button on the browser to reload the page and hit the breakpoints in the above steps to complete the front-end debugging.
3. A browser plug-in-based front-end and back-end debugging system according to claim 2, characterized in that: The performance optimization module (44) further includes: B1. Front-end optimization: By merging and compressing files, using image sprites and inline images to reduce HTTP requests, using CDN acceleration, enabling caching, delaying the loading of non-viewport content, and speeding up the loading of the first screen; B2. Backend optimization: Use cache and asynchronous processing to optimize the code, adjust server parameters, use load balancing, vertical and horizontal expansion, enable cache system, reduce the number of database accesses, and use compression software to compress data during output; B3. Database optimization: optimize indexes and queries in turn, use paging query function to reduce the amount of returned data after query, and perform batch processing when inserting, updating and deleting data.
4. A front-end and back-end debugging system based on a browser plug-in according to claim 3, characterized in that: When optimizing the index, the Lucene search engine is used to perform word segmentation on the current file content, and then an index is created based on the word segmentation results.
5. A browser plug-in-based front-end and back-end debugging system according to claim 4, characterized in that: When the debugging feedback module (43) determines whether a program contains a defect, the matrix data is used to calculate the suspiciousness of each program entity, and the program entities are judged in descending order of the suspiciousness. The expression of the defect location matrix is as follows: ; In the formula, the left matrix represents the coverage of a program containing L program entities after running K test cases, and the right matrix records the execution results of K test cases, that is, success or failure.
6. A method for using a front-end and back-end debugging system based on a browser plug-in, characterized in that: A front-end and back-end debugging system based on a browser plug-in using any one of claims 1-5 comprises the following steps: S1. Build the basic framework of the system through the basic framework building unit (1), perform separation processing after the front-end and back-end are built, and then quickly optimize the separation results. After optimization, the data architecture is applied in the system; S2, using the user demand acquisition module (31) to acquire user demand, constructing a browser plug-in according to the demand, and performing a performance test on the generated plug-in to determine whether there is an abnormality when the plug-in is running; S3, debug the front-end and back-end of the plug-in, input the debugging results into the debugging feedback module (43), and back up to the local and cloud databases for storage; S4. Determine whether the program entity contains defects based on the debugging results, locate the defects, and then start optimization processing of the plug-in performance.
