Network page component reuse rate calculation method and device and readable storage medium

By obtaining request information from the financial monitoring system and creating module packaging plugins, the number of components and route arrays of web pages are counted, the component reuse rate is calculated and fed back to the interface, solving the problem of low efficiency of manual statistics and realizing simple and fast component reuse rate statistics.

CN116776028BActive Publication Date: 2026-01-02CHINA PING AN LIFE INSURANCE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310834414.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-07
Publication Date
2026-01-02
Estimated Expiration
2043-07-07

AI Technical Summary

Technical Problem

In existing technologies, the statistics on the reuse rate of web page components in financial monitoring systems rely on manual methods, which is labor-intensive and inefficient.

Method used

By obtaining reuse rate calculation request information, a module packaging plugin is created, the project route array, component quantity, and component library quantity of the network page are counted, the component reuse rate is calculated, and the results are fed back to the preset network interface.

Benefits of technology

It saves manpower and improves the efficiency of component reuse rate statistics, making the component reuse rate calculation process of financial web pages simpler and faster.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116776028B_ABST
    Figure CN116776028B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of financial technology, and provides a network page component reuse rate calculation method and device, electronic equipment and a computer readable storage medium. The method comprises the following steps: obtaining reuse rate calculation request information; determining a corresponding network page according to the reuse rate calculation request information, and creating a module packaging plug-in in the corresponding network page; counting a project route array of the network page based on the module packaging plug-in to obtain a page value; counting the number of components of the network page based on the module packaging plug-in to obtain a project component value; counting the number of component libraries of the network page based on the module packaging plug-in to obtain a component library component value; determining a component reuse rate according to the page value, the project component value and the component library component value; and feeding back the component reuse rate to a preset network interface. Through the technical scheme, the component reuse rate calculation process of a financial network page is more convenient and fast.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The embodiment of the present application relates to but not limited to the technical field of financial technology, and particularly relates to a network page component reuse rate calculation method and device, electronic equipment and computer readable storage medium. BACKGROUND

[0002] With the continuous development of the financial industry, for bank business, currently multiple financial monitoring systems are needed to monitor and manage the related business; each financial monitoring page needs to use page components to support operation, wherein the page component reuse rate reflects the complexity and compatibility of the related network page; at present, in the process of evaluating the componentization degree of the front-end project, the number of user interface library components and the number of route pages in the project are often obtained by artificial means, so as to obtain the number and reuse ratio report; however, such a way has the characteristics of consuming manpower and low statistical efficiency. SUMMARY

[0003] The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.

[0004] In order to solve the problems mentioned in the background art, the embodiment of the present application provides a network page component reuse rate calculation method, device, electronic equipment and computer readable storage medium, which can save manpower and improve the efficiency of reuse rate statistics, so that the component reuse rate calculation process of the financial network page is more convenient and fast.

[0005] In a first aspect, the embodiment of the present application provides a network page component reuse rate calculation method, which comprises:

[0006] Obtain the reuse rate calculation request information;

[0007] Determine the corresponding network page according to the reuse rate calculation request information, and create a module packaging plug-in in the corresponding network page;

[0008] Based on the module packaging plug-in, the project route array of the network page is counted to obtain a page value; based on the module packaging plug-in, the number of components of the network page is counted to obtain a project component value; and based on the module packaging plug-in, the number of component libraries of the network page is counted to obtain a component library component value;

[0009] Determine the component reuse rate according to the page value, the project component value and the component library component value;

[0010] Feed back the component reuse rate to the preset network interface.

[0011] According to some embodiments of the present application, the determining the corresponding network page according to the multiplexing rate calculation request information comprises:

[0012] The multiplexing rate calculation request information is analyzed and processed to obtain page statistical marker information;

[0013] The corresponding network page is extracted from a preset storage server according to the page statistical marker information.

[0014] According to some embodiments of the present application, the determining the corresponding network page according to the multiplexing rate calculation request information comprises:

[0015] The path array is obtained by performing path statistical processing on the item file of the network page based on the module packaging plug-in;

[0016] The number of de-duplication redirection paths is obtained by performing classification processing on the path array;

[0017] The number of de-duplication redirection paths is determined as the page value.

[0018] According to some embodiments of the present application, the determining the corresponding network page according to the multiplexing rate calculation request information comprises:

[0019] The item file type information is obtained by performing classification processing on the item format file of the network page;

[0020] The item component value is obtained by performing statistical processing on the item file type information based on the first hook function of the module packaging plug-in.

[0021] According to some embodiments of the present application, the determining the corresponding network page according to the multiplexing rate calculation request information comprises:

[0022] The initial component type information is obtained by performing differentiation processing on the component library component type of the network page;

[0023] The final component type information is obtained by performing de-duplication processing on the initial component type information based on the second hook function of the module packaging plug-in;

[0024] The component library component value is obtained by performing analysis processing on the final component type information.

[0025] According to some embodiments of the present application, the determining the corresponding network page according to the multiplexing rate calculation request information comprises:

[0026] The initial component type information is subjected to parameter adjustment processing based on the second hook function of the module packaging plug-in to obtain a classification result parameter, wherein the classification result parameter comprises a context object, and the context object carries publisher attribute information;

[0027] Duplicate file path information in the initial component type information is eliminated according to the publisher attribute information to obtain a component library file quantity;

[0028] The component library file quantity is determined as the final component type information.

[0029] According to some embodiments of the present application, the component reuse rate is determined according to the page quantity, the project component quantity and the component library component quantity, comprising:

[0030] The project component quantity and the component library component quantity are subjected to summation processing to obtain a component summation quantity;

[0031] The ratio of the component summation quantity to the page quantity is taken as the component reuse rate.

[0032] In a second aspect, the embodiments of the present application further provide a network page component reuse rate calculation device, comprising:

[0033] A first processing module is configured to acquire reuse rate calculation request information;

[0034] A second processing module is configured to determine a corresponding network page according to the reuse rate calculation request information, and create a module packaging plug-in in the corresponding network page;

[0035] A third processing module is configured to count a project route array of the network page based on the module packaging plug-in to obtain a page quantity, count a component quantity of the network page based on the module packaging plug-in to obtain a project component quantity, and count a component library quantity of the network page based on the module packaging plug-in to obtain a component library component quantity;

[0036] A fourth processing module is configured to determine a component reuse rate according to the page quantity, the project component quantity and the component library component quantity;

[0037] A fifth processing module is configured to feed back the component reuse rate to a preset network interface.

[0038] In a third aspect, the embodiments of the present application further provide an electronic device, comprising a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the processor implements the network page component reuse rate calculation method of the first aspect when executing the computer program.

[0039] In a fourth aspect, the embodiments of the present application further provide a computer readable storage medium storing computer executable instructions for implementing the network page component reuse rate calculation method according to the first aspect.

[0040] According to the network page component reuse rate calculation method provided by the embodiments of the present application, at least the following beneficial effects are achieved: in the process of calculating the network page component reuse rate, first, the reuse rate calculation request information is obtained, then the corresponding network page is determined according to the reuse rate calculation request information, and the module packaging plug-in is created in the corresponding network page, then the project routing array of the network page is counted based on the module packaging plug-in to obtain the page value; and the component quantity of the network page is counted based on the module packaging plug-in to obtain the project component value; and the component library quantity of the network page is counted based on the module packaging plug-in to obtain the component library component value; then the component reuse rate is determined according to the page value, the project component value and the component library component value; finally, the component reuse rate is fed back to the preset network interface, so as to facilitate the user to view. Through the above technical solution, the manpower can be saved and the efficiency of the reuse rate calculation can be improved, so that the component reuse rate calculation process of the financial network page is more convenient and fast. BRIEF DESCRIPTION OF DRAWINGS

[0041] The accompanying drawings are used to provide a further understanding of the technical solutions of the present application, and constitute a part of the specification, and are used to explain the technical solutions of the present application together with the embodiments of the present application, and do not constitute a limitation to the technical solutions of the present application.

[0042] Figure 1 is a flowchart of the network page component reuse rate calculation method provided by an embodiment of the present application;

[0043] Figure 2 is a flowchart of determining the corresponding network page in the network page component reuse rate calculation method provided by an embodiment of the present application;

[0044] Figure 3 is a flowchart of counting the project routing array of the network page in the network page component reuse rate calculation method provided by an embodiment of the present application;

[0045] Figure 4 is a flowchart of counting the component quantity of the network page in the network page component reuse rate calculation method provided by an embodiment of the present application;

[0046] Figure 5 is a flowchart of counting the component library quantity of the network page in the network page component reuse rate calculation method provided by an embodiment of the present application;

[0047] Figure 6is a flowchart of the initial component type information deduplication process in the network page component reuse rate calculation method provided by an embodiment of the present application;

[0048] Figure 7 is a flowchart of the component reuse rate calculation process in the network page component reuse rate calculation method provided by an embodiment of the present application;

[0049] Figure 8 is a schematic diagram of the network page component reuse rate calculation device provided by an embodiment of the present application;

[0050] Figure 9 is a schematic diagram of the electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0051] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.

[0052] It should be noted that although the functional modules are divided in the device schematic diagram, and the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a manner different from the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and above-described drawings are used to distinguish similar objects, and do not necessarily describe a specific order or sequence.

[0053] It should be noted that, unless otherwise defined, all technical and scientific terms used herein have the same meaning as understood by those skilled in the art to which the present application belongs. The terms used herein are only for the purpose of describing the embodiments of the present application, and are not intended to limit the present application.

[0054] The embodiments of the present application can acquire and process related data based on artificial intelligence technology. Artificial intelligence (AI) is the use of digital computers or computer-controlled machines to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0055] AI is a new technical science of theories, methods, technologies and application systems for simulating, extending and expanding human intelligence; artificial intelligence is a branch of computer science, and artificial intelligence attempts to understand the essence of intelligence and produce a new intelligent machine that can react in a similar way to human intelligence. The research in this field includes robots, language recognition, image recognition, natural language processing and expert systems. Artificial intelligence can simulate the information process of human consciousness and thinking. Artificial intelligence is also a theory, method, technology and application system for simulating, extending and expanding human intelligence by using a digital computer or a machine controlled by a digital computer, perceiving the environment, acquiring knowledge and using the knowledge to obtain the best results.

[0056] The basic technologies of artificial intelligence generally include technologies such as sensors, special artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction system, mechatronics, etc. The software technologies of artificial intelligence mainly include computer vision technology, robot technology, biometric technology, speech processing technology, natural language processing technology and machine learning / deep learning, etc.

[0057] Artificial intelligence is AI, which is a theory, method, technology and application system for simulating, extending and expanding human intelligence by using a digital computer or a machine controlled by a digital computer, perceiving the environment, acquiring knowledge and using the knowledge to obtain the best results.

[0058] The server involved in the artificial intelligence technology can be a stand-alone server, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and basic cloud computing services such as big data and artificial intelligence platforms.

[0059] The application provides a network page component reuse rate calculation method and device, electronic equipment and a computer readable storage medium. In the process of calculating the network page component reuse rate, first, the reuse rate calculation request information is obtained, then the corresponding network page is determined according to the reuse rate calculation request information, and the module packaging plug-in is created in the corresponding network page, then the project route array of the network page is counted based on the module packaging plug-in to obtain the page value; and the component quantity of the network page is counted based on the module packaging plug-in to obtain the project component value; and the component library quantity of the network page is counted based on the module packaging plug-in to obtain the component library component value; then the component reuse rate is determined according to the page value, the project component value and the component library component value; finally, the component reuse rate is fed back to the preset network interface, thereby facilitating the user to view. Through the above technical solution, the manpower can be saved and the efficiency of the reuse rate calculation can be improved, and the component reuse rate calculation process of the financial network page is more convenient and fast.

[0060] The network page component reuse rate calculation method provided by the application is related to the technical field of financial technology. The network page component reuse rate calculation method provided by the application can be applied to a terminal, can also be applied to a server end, and can also be software running in the terminal or the server end. In some embodiments, the terminal can be a smart phone, a tablet computer, a notebook computer, a desktop computer, etc.; the server end can be configured as a separate physical server, can also be configured as a server cluster or a distributed system composed of multiple physical servers, can also be configured as a cloud server providing basic cloud computing services such as cloud service, cloud database, cloud computing, cloud function, cloud storage, network service, cloud communication, middleware service, domain name service, security service, CDN, and big data and artificial intelligence platform; and the software can be an application for implementing the network page component reuse rate calculation method, but is not limited to the above forms.

[0061] The application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld devices or portable devices, tablet devices, multi-processor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The application can be described in the general context of computer-executable instructions executed by a computer, such as a program module. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The application can also be practiced in a distributed computing environment, in which tasks are performed by remote processing devices connected by a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media, including storage devices.

[0062] It should be noted that in all specific embodiments of this application, when processing data related to user identity or characteristics, such as user information, user behavior data, user historical data, and user location information, user permission or consent is obtained first. Furthermore, the collection, use, and processing of this data comply with relevant laws, regulations, and standards. In addition, when embodiments of this application require access to sensitive personal information of users, separate permission or consent from the user is obtained through pop-ups or redirection to confirmation pages. Only after obtaining the user's separate permission or consent is the necessary user-related data required for the proper functioning of these embodiments acquired.

[0063] The embodiments of this application will be further described below with reference to the accompanying drawings.

[0064] like Figure 1 As shown, Figure 1 This is a flowchart of a method for calculating the reuse rate of web page components according to an embodiment of this application. The method for calculating the reuse rate of web page components includes, but is not limited to, steps S100 to S500.

[0065] Step S100: Obtain reuse rate calculation request information;

[0066] Step S200: Determine the corresponding web page based on the reuse rate calculation request information, and create a module packaging plugin in the corresponding web page;

[0067] Step S300: Based on the module packaging plugin, the project route array of the web page is statistically analyzed to obtain the page value; and based on the module packaging plugin, the number of components of the web page is statistically analyzed to obtain the project component value; and based on the module packaging plugin, the number of component libraries of the web page is statistically analyzed to obtain the component library component value.

[0068] Step S400: Determine the component reuse rate based on the page values, project component values, and component library component values;

[0069] Step S500: Feedback the component reuse rate to the preset network interface.

[0070] It should be noted that in the process of calculating the network page component reuse rate, first, the reuse rate calculation request information is obtained, then the corresponding network page is determined according to the reuse rate calculation request information, and the module packaging plug-in is created in the corresponding network page, then the project route array of the network page is counted based on the module packaging plug-in to obtain the page value; and the component quantity of the network page is counted based on the module packaging plug-in to obtain the project component value; and the component library quantity of the network page is counted based on the module packaging plug-in to obtain the component library component value; then the component reuse rate is determined according to the page value, the project component value and the component library component value; finally, the component reuse rate is fed back to the preset network interface, thereby facilitating the user to view. Through the above technical solution, the manpower can be saved and the efficiency of reuse rate statistics can be improved, so that the component reuse rate calculation process of the financial network page is more convenient and fast.

[0071] It is worth noting that the reusable component extraction is an important link of front-end engineering, and a higher component reuse degree usually indicates that the project has higher code style consistency, more unified user interface style and interaction, and smaller build product volume; the code style consistency makes the code easier to understand, facilitating the development of front-end colleagues; the unified style and interaction meet the requirements of product and user interface, and the reduction of build product volume means less network request time consumption, which is beneficial to the performance improvement of the front-end page; in addition, high reuse can bring more test scenarios, and more robust code and better compatibility can be obtained through iteration.

[0072] It is worth noting that the financial monitoring system in the embodiment of the application can include an insurance system, a bank system, a transaction system and an order system, etc. These systems need to use various different components in the process of running, and the related components may exist in the reuse case. Therefore, in the process of calculating the component reuse rate of the network page of the related system by using the method of the embodiment of the application, the related manpower can be saved, and the calculation process is more convenient and fast.

[0073] It is worth noting that the use type and corresponding number of each source component in the project can be obtained at low cost through the module packaging plug-in, and the component reuse degree can be calculated through the page quantity, which has the advantages of less manpower consumption, convincing and easy-to-understand statistical results, easy-to-adjust and expand plug-in, etc.

[0074] It is worth noting that the component reuse rate is the proportion of the number of components reused in the statistical range to the total number of components. The index reflects the function, performance, quality and scalability of the component, and also reflects the design ability to some extent. The improvement of the component reuse rate will significantly improve the delivery rate and quality. Among them, the component can extend the hypertext markup language element and encapsulate the reusable code; the component needs to be registered before it can be used, and there are two ways of global registration and local registration; the component system is an important part of the progressive framework for building user interfaces. It can abstract and decompose a complex page into many small, independent, reusable components. By combining components to compose an application, combined with the routing function to map each component to the corresponding route, the jump navigation between each component and each page is realized through the change of the route. When switching routes, the component tree will be updated, and a new component tree will be rendered according to the defined route. The approximate switching process is as follows: deactivate and remove unnecessary components, verify the feasibility of switching, reuse components that have not been updated, enable and activate new components.

[0075] It should be noted that after obtaining the reuse rate calculation request information, the relevant reuse rate calculation request information will not be disclosed to other personnel without the user's permission, and the reuse rate calculation request information triggered by the user will maintain its privacy. When the reuse rate calculation request information involves data related to the user's identity or characteristics, such as user information, user behavior data, user history data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of these data will comply with relevant national and regional laws, regulations, and standards. In addition, when the embodiments of the present application need to obtain sensitive personal information of the user, the user's separate permission or separate consent will be obtained through a pop-up window or a jump to a confirmation page, and after obtaining the separate permission or separate consent of the user, the necessary user-related data for the normal operation of the embodiments of the present application will be obtained. Among them, the user can trigger the relevant click button on the relevant financial monitoring system to generate the corresponding reuse rate calculation request information through the financial monitoring system. For bank business, the financial monitoring system can be a deposit management system or a loan management system, etc. For insurance business, the financial monitoring system can be an insurance bill management system or an insurance sales system. For the above financial monitoring system, the component reuse rate of its web page can be calculated and processed.

[0076] It is worth noting that the corresponding network page is determined according to the multiplexing rate calculation request information, and a module packaging plug-in is created in the corresponding network page, wherein the module packaging plug-in is used to count the number of component references in the project; the module packaging plug-in can be divided into different types according to the events registered by the module packaging plug-in, and each event hook is predefined as a synchronous, asynchronous, waterfall or parallel hook. The hook is called internally by a calling method, and a list of supported hooks or a list of hooks that can be bound; the module packaging plug-in first applies the default configuration of the plug-in, and then applies its own default configuration, so that the plug-in has its own default configuration, while supporting the creation of a plug-in with a preset configuration.

[0077] It is worth noting that the page value is obtained by counting the project route array of the network page based on the module packaging plug-in; and the project component value is obtained by counting the number of components of the network page based on the module packaging plug-in; and the component library component value is obtained by counting the number of component libraries of the network page based on the module packaging plug-in; and finally the component multiplexing rate is determined based on the page value, the project component value and the component library component value.

[0078] It is worth noting that the component multiplexing rate is fed back to the network interface, so that the user can conveniently and quickly view the component multiplexing rate of the relevant network page, wherein the network interface can be a display interface on a computer or a display interface on a tablet or a display interface on a mobile phone.

[0079] In some embodiments, as shown in Figure 2 The above step S200 can include but is not limited to steps S210 to S220.

[0080] Step S210, analyzing and processing the multiplexing rate calculation request information to obtain page statistical marker information;

[0081] Step S220, extracting the corresponding network page from the preset storage server according to the page statistical marker information.

[0082] It should be noted that in the process of determining the corresponding network page, the page statistical marker information can be obtained by first analyzing and processing the multiplexing rate calculation request information, and then extracting the corresponding network page from the preset storage server according to the page statistical marker information.

[0083] It is worth noting that the corresponding page statistical marker information can be obtained by analyzing the multiplexing rate calculation request information, and each page statistical marker information corresponds to a corresponding network page, so the corresponding network page can be extracted from the preset storage server according to the page statistical marker information. Wherein the storage server stores a plurality of network pages, and each network page corresponds to a unique page statistical marker information.

[0084] Exemplarily, for the network page of the insurance system, the multiplexing rate calculation request information is analyzed and processed to obtain insurance system page statistical marker information; and then the corresponding insurance system network page can be extracted from the preset storage server according to the insurance system page statistical marker information.

[0085] In some embodiments, as shown in Figure 3 The step S300 can include but is not limited to steps S310-S330.

[0086] In step S310, the path array is obtained by performing path statistical processing on the project file of the network page based on the module packaging plug-in.

[0087] In step S320, the de-duplication redirection path quantity is obtained by performing classification processing on the path array.

[0088] In step S330, the de-duplication redirection path quantity is determined as the page value.

[0089] It should be noted that in the process of statistical processing on the project route array of the network page, first, the path array is obtained by performing path statistical processing on the project file of the network page based on the module packaging plug-in; then the de-duplication redirection path quantity is obtained by performing classification processing on the path array; finally, the de-duplication redirection path quantity is determined as the page value.

[0090] It is worth noting that the classification processing on the path array is to merge and de-duplicate the same paths in the path array to simplify the path array, so as to obtain the de-duplication redirection path quantity, and the de-duplication redirection path quantity is determined as the page value.

[0091] Exemplarily, the insurance system path array is obtained by performing path statistical processing on the project file of the insurance network page based on the module packaging plug-in; then the insurance system de-duplication redirection path quantity is obtained by performing classification processing on the insurance system path array; finally, the corresponding insurance page value is determined according to the insurance system de-duplication redirection path quantity.

[0092] In some embodiments, as shown in Figure 4 The step S300 can include but is not limited to steps S340 and S350.

[0093] In step S340, the project format file of the network page is classified to obtain project file type information.

[0094] In step S350, the project component value is obtained by performing statistical processing on the project file type information based on the first hook function of the module packaging plug-in.

[0095] It should be noted that, based on the module packaging plug-in, the component number of the network page is counted, and the project file type information can be obtained by classifying the project format file of the network page; and the project component value can be obtained by counting the project file type information based on the first hook function of the module packaging plug-in.

[0096] It should be noted that the module packaging plug-in is used to count the number of component references in the project; the module packaging plug-in can be divided into different types according to the events registered by the module packaging plug-in, and each event hook is defined as synchronous, asynchronous, waterfall or parallel hook in advance, the hook is called internally by calling method, and the supported hook list or the hook list that can be bound; the module packaging plug-in applies the default configuration of the plug-in first, and then applies the default configuration of itself, so that the plug-in has its own default configuration, and the plug-in for creating a preset configuration is supported. Exemplarily, for the bank loan system network page, the bank loan project file type information can be obtained by classifying the project format file of the bank loan system network page; and the project component value can be obtained by counting the bank loan project file type information based on the first hook function of the module packaging plug-in.

[0097] It should be noted that the hook function is part of the message processing mechanism, and by setting the "hook", the application program can filter all messages and events at the system level, and access messages that cannot be accessed under normal circumstances; the essence of the hook is a program for processing system messages, which is hung into the system through system call. Among them, the hook function is called by the system when the system message is triggered, and it will not trigger itself.

[0098] In some embodiments, as shown in Figure 5 The above step S300 can further include, but is not limited to, steps S360 to S380.

[0099] Step S360, the types of the component library components of the network page are distinguished to obtain initial component type information;

[0100] Step S370, the second hook function of the module packaging plug-in is used to remove the initial component type information to obtain final component type information;

[0101] Step S380, the final component type information is analyzed to obtain the component library component value.

[0102] It should be noted that, in the process of counting the number of component library components of the web page based on the module packaging plug-in, firstly, the type of the component library components of the web page is distinguished to obtain initial component type information; then, the initial component type information is processed by the second hook function of the module packaging plug-in to obtain final component type information; finally, the final component type information is analyzed to obtain the component library component value.

[0103] It is worth noting that the hook function is part of the message processing mechanism. By setting "hook", the application program can filter all messages and events at the system level, and access messages that cannot be accessed under normal circumstances. The essence of the hook is a program used to process system messages, which is hung into the system through system calls. The hook function is called by the system when the system message is triggered, and it will not trigger itself.

[0104] Specifically, for the transaction system network page, the types of the component library components of the transaction system network page are distinguished to obtain initial transaction system component type information, and then the initial transaction system component type information is processed by the second hook function of the module packaging plug-in to obtain final transaction system component type information; finally, the final transaction system component type information is analyzed to obtain the transaction system component library component value.

[0105] In some embodiments, as shown in Figure 6 The above step S370 can include but is not limited to steps S371-S373.

[0106] Step S371: The initial component type information is processed by the second hook function of the module packaging plug-in to obtain classification result parameters, wherein the classification result parameters include a context object, and the context object carries publisher attribute information.

[0107] Step S372: According to the publisher attribute information, the repeated file path information in the initial component type information is removed to obtain the number of component library files.

[0108] Step S373: The number of component library files is determined as the final component type information.

[0109] It should be noted that, in the process of processing the initial component type information by the second hook function of the module packaging plug-in, firstly, the initial component type information is processed by the second hook function of the module packaging plug-in to obtain classification result parameters, wherein the classification result parameters include a context object, and the context object carries publisher attribute information; then, according to the publisher attribute information, the repeated file path information in the initial component type information is removed to obtain the number of component library files; finally, the number of component library files can be determined as the final component type information.

[0110] It is worth noting that the hook function is part of the message processing mechanism, by setting "hook", the application can filter all messages, events at the system level, access to messages that cannot be accessed under normal circumstances; the essence of the hook is a program to handle system messages, through system calls, hang into the system. Among them, the hook function is called by the system when the system message triggers, and it does not trigger itself. Illustratively, the hook function existing in the insurance system is called by the insurance system when the system message triggers, and it cannot trigger itself to run.

[0111] In some embodiments, as shown in Figure 7 The step S400 can further include, but not limited to, step S410 and step S420.

[0112] Step S410, summing the project component value and the component library component value to obtain a component sum value;

[0113] Step S420, taking the ratio of the component sum value and the page value as the component reuse rate.

[0114] It should be noted that in the process of calculating the component reuse rate, first summing the project component value and the component library component value to obtain a component sum value, and then dividing the component sum value by the page value to obtain the component reuse rate. Illustratively, for the order system network page, summing the order system project component value and the component library component value to obtain the order system component sum value, and taking the ratio of the order system component sum value and the page value as the order system component reuse rate.

[0115] In addition, as shown in Figure 8 One embodiment of the present application further provides a network page component reuse rate calculation device 10, comprising:

[0116] The first processing module 100 is used for obtaining reuse rate calculation request information;

[0117] The second processing module 200 is used for determining the corresponding network page according to the reuse rate calculation request information, and creating a module packaging plug-in in the corresponding network page;

[0118] The third processing module 300 is used for counting the project route array of the network page based on the module packaging plug-in to obtain a page value, counting the component quantity of the network page based on the module packaging plug-in to obtain a project component value, and counting the component library quantity of the network page based on the module packaging plug-in to obtain a component library component value;

[0119] The fourth processing module 400 is configured to determine the component reuse rate according to the page value, the project component value and the component library component value.

[0120] The fifth processing module 500 is configured to feed back the component reuse rate to a preset network interface.

[0121] It should be noted that, in the process of calculating the network page component reuse rate, the reuse rate calculation request information is first obtained, then the corresponding network page is determined according to the reuse rate calculation request information, and the module packaging plug-in is created in the corresponding network page, then the page value is obtained by counting the project route array of the network page based on the module packaging plug-in; and the project component value is obtained by counting the component quantity of the network page based on the module packaging plug-in; and the component library component value is obtained by counting the component library quantity of the network page based on the module packaging plug-in; then the component reuse rate is determined according to the page value, the project component value and the component library component value; finally, the component reuse rate is fed back to the preset network interface, so that the user can view conveniently. Through the above technical solution, the manpower can be saved and the efficiency of reuse rate statistics can be improved, so that the component reuse rate calculation process of the financial network page is more convenient and fast.

[0122] It should be noted that, the reusable component extraction is an important link of front-end engineering, and a higher component reuse degree usually indicates that the project has higher code style consistency, more unified user interface style and interaction, and smaller build product volume; the code style consistency makes the code easier to understand, facilitating the development of front-end colleagues; the unified style and interaction meet the requirements of product and user interface, and the reduction of build product volume means less network request time consumption, which is beneficial to the performance improvement of front-end page; in addition, high reuse can bring more test scenarios, and can iteratively obtain more robust code and better compatibility.

[0123] It should be noted that, through the module packaging plug-in, the usage types and corresponding times of each source component in the project can be obtained at low cost, and the component reuse degree can be calculated by the page quantity, which has the advantages of less manpower consumption, convincing and easy-to-understand statistical results, easy-to-adjust and expand plug-in, etc.

[0124] The specific implementation of the network page component reuse rate calculation device 10 is basically the same as that of the above-mentioned network page component reuse rate calculation method, and will not be repeated here.

[0125] In addition, as shown in Figure 9 one embodiment of the present application also provides an electronic device 700, which comprises a memory 720, a processor 710 and a computer program stored in the memory 720 and executable on the processor 710.

[0126] The processor 710 and the memory 720 can be connected by a bus or other means.

[0127] The non-transitory software programs and instructions required to implement the network page component reuse rate calculation method of the above embodiments are stored in the memory 720, and when executed by the processor 710, the network page component reuse rate calculation method of the above embodiments is executed, for example, the method steps S100 to S500 in the above description Figure 1 , the method steps S210 to S220 in the above description Figure 2 , the method steps S310 to S330 in the above description Figure 3 , the method steps S340 to S350 in the above description Figure 4 , the method steps S360 to S380 in the above description Figure 5 , the method steps S371 to S373 in the above description Figure 6 , and the method steps S410 to S420 in the above description Figure 7 .

[0128] The apparatus embodiments described above are only schematic, and the units described as separate components can or can not be physically separate, i.e., can be located in one place or distributed on multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the present embodiment.

[0129] In addition, an embodiment of the present application also provides a computer readable storage medium storing computer executable instructions, which are executed by a processor 710 or a controller, for example, a processor 710 in the above device embodiment, so that the above processor 710 executes the network page component reuse rate calculation method in the above embodiments, for example, executes the method steps S100 to S500 in the above description Figure 1 , the method steps S210 to S220 in the above description Figure 2 , the method steps S310 to S330 in the above description Figure 3 , the method steps S340 to S350 in the above description Figure 4 , the method steps S360 to S380 in the above description Figure 5 , the method steps S371 to S373 in the above description Figure 6 , and the method steps S410 to S420 in the above description Figure 7 .

[0130] The above embodiments can be used in combination, and the modules with the same name in different embodiments can be the same or different.

[0131] The above-described embodiments of the application have been described in connection with what are presently considered to be the most practical and preferred implementations, it is to be understood that the application is not to be limited to the disclosed embodiments, but on the contrary, is intended to cover various modifications and equivalent arrangements. In addition, there are many alternative ways of implementing the application. It is intended to cover all alternatives, modifications and equivalents. Additionally one of ordinary skill will recognize that some of the steps in the described embodiments can be order dependent, while some can be order independent. Likewise, some steps can be performed simultaneously, rather than sequentially, and some steps can be performed concurrently. Certain of the steps described herein can be grouped together and performed as a combined step from implementation to implementation, and that certain of steps described herein can alternatively be insolated or distributed as sub-steps from implementation to implementation. Other changes, modifications and variations are also possible in light of the teachings described herein, and it is therefore intended that the application encompass such changes, modifications and variations as fall within the scope of the appended claims. Moreover, unless specifically stated otherwise, it is intended that equivalents of aspects included in this specification and its teachings can be utilized as alternatives thereof, in which case the generic and specific description are deemed to be incorporated by reference.

[0132] Various embodiments in this application are described with progressive manner, and the same or similar parts between various embodiments can be referred to each other. Each embodiment focuses on the difference from other embodiments. Especially, the device, apparatus and computer readable storage medium embodiments are described simply, because they are similar to the method embodiments.

[0133] The device, apparatus, computer readable storage medium and method provided by the embodiments of the application are corresponding, therefore, the device, apparatus and computer readable storage medium have similar beneficial technical effects with the method. Since the beneficial technical effects of the method have been described in detail above, the beneficial technical effects of the corresponding device, apparatus and computer readable storage medium will not be repeated here.

[0134] In the 1990s, it was relatively easy to distinguish whether an improvement in a technology was a hardware improvement (e.g., an improvement in the circuit structure of a diode, transistor, switch, etc.) or a software improvement (an improvement in a method flow). However, as technology has evolved, many improvements in method flows today can be considered as direct improvements in hardware circuit structures. Designers almost always obtain the corresponding hardware circuit structures by programming the improved method flows into hardware circuits. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using hardware entity modules. For example, a programmable logic device (PLD) (e.g., a field programmable gate array (FPGA)) is an integrated circuit whose logic function is determined by user programming of the device. A digital system is "integrated" on a PLD by the designer programming the PLD, rather than by ordering a custom integrated circuit chip from a chip fabricator. Moreover, instead of manually fabricating an integrated circuit chip, this programming is now most often implemented using "logic compiler" software, which is similar to software compilers used in program development, and the original code to be compiled is written in a specific programming language, which is called a hardware description language (HDL), and there are many such languages, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc., and the most commonly used are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should be aware that, as long as the method flow is logically programmed in one of the above-mentioned hardware description languages and programmed into an integrated circuit, a hardware circuit implementing the logical method flow can be easily obtained.

[0135] The controller can be implemented in any suitable way, for example, the controller can take the form of a microprocessor or processor and a computer readable medium storing computer readable program code, such as software or firmware, executable by the (micro)processor, logic gates, switches, an application specific integrated circuit (ASIC), a programmable logic controller and an embedded microcontroller, examples of which include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicone Labs C8051F320, the memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also know that, in addition to being implemented in pure computer readable program code, the controller can also be implemented to perform the same functions in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers and embedded microcontrollers, etc. by logically programming the method steps. Therefore, such a controller can be considered as a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can even be considered as both a software module implementing a method and a structure within a hardware component.

[0136] The systems, apparatuses, modules or units illustrated by the above embodiments can be specifically implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer can be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0137] For the sake of description, the above apparatuses are described in functional division and are described respectively as various units. Of course, the functions of the units can be implemented in the same or multiple software and / or hardware in the implementation of the embodiments of the present application.

[0138] Those skilled in the art will understand that the embodiments of the present application can be provided as a method, a system or a computer program product. Therefore, the embodiments of the present application can take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware aspects. Moreover, the embodiments of the present application can take the form of a computer program product implemented on one or more computer usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer usable program code.

[0139] This specification is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 2 A device that provides the functions specified in one or more boxes.

[0140] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 3 One or more processes and / or boxes Figure 4 The function specified in one or more boxes.

[0141] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 5 One or more processes and / or boxes Figure 6 Figure 7 Figure 1 Figure 2 Figure 3 Figure 4 Figure 5 Figure 6 Figure 7 Figure 1 Figure 2 Figure 3 Figure 4 Figure 5 Figure 6 Figure 7 Figure 1 Figure 2 Figure 3 Figure 4 Figure 5 The steps of the function specified in one or more boxes.

[0142] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0143] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0144] Computer-readable media includes permanent and non-permanent, movable and non-movable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette, magnetic disk storage or other magnetic storage device, or any other non-transmission medium that can be used to store information accessible by a computing device. According to the definition herein, computer-readable media does not include transitory media such as modulated data signals and carriers.

[0145] It should also be noted that the terms "comprising", "including", or any other variant thereof are intended to cover non-exclusive inclusion, so that processes, methods, articles or devices including a series of elements not only include those elements, but also include other elements not explicitly listed, or inherent to such processes, methods, articles or devices. Without more limitations, the element defined by the statement "including a" does not exclude the presence of other identical elements in the process, method, article or device including the element.

[0146] In the embodiments of the present application, "at least one" means one or more, and "multiple" means two or more. The association relationship between the associated objects is described by "and / or", which means that there can be three kinds of relationships, for example, A and / or B, which can represent the cases of A alone, A and B together, and B alone. Wherein A, B can be singular or plural. The character " / " generally represents that the associated objects before and after are in an "or" relationship. "At least one of the following" and the like means any combination of these items, including any combination of single or multiple items. For example, at least one of a, b and c can represent: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, c can be single or multiple.

[0147] Embodiments of the present application can be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, and the like, that perform particular tasks or implement particular abstract data types. Embodiments of the present application can also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules can be located in both local and remote computer storage media including memory storage devices.

[0148] Various embodiments in the present application are described in progressive manner, and the same or similar parts between various embodiments can be referred to each other. Each embodiment focuses on the difference from other embodiments. Especially, the system embodiments are described simply because they are basically similar to the method embodiments, and the relevant parts can be referred to the description of the method embodiments.

[0149] The above only describes the embodiments of the present application and is not intended to limit the present application. The present application can have various modifications and changes for those skilled in the art. Any modification, equivalent replacement, improvement, etc. within the spirit and principle of the present application shall be included in the scope of claims of the present application.

Claims

1. A method for calculating the reuse rate of web page components, characterized in that, The method includes: Obtain the reuse rate calculation request information; The corresponding web page is determined based on the reuse rate calculation request information, and a module packaging plugin is created in the corresponding web page; The module packaging plugin is used to statistically analyze the project route array of the web page to obtain page values; the module packaging plugin is used to statistically analyze the number of components of the web page to obtain project component values; and the module packaging plugin is used to statistically analyze the number of component libraries of the web page to obtain component library component values. The component reuse rate is determined based on the page values, the project component values, and the component library component values. The component reuse rate is fed back to the preset network interface; Specifically, the project files of the network page are processed by the module packaging plugin to obtain a path array; the path array is then categorized to obtain the page value. The process of calculating the number of components in the web page based on the module packaging plugin to obtain the project component value includes: The project format files of the web page are classified to obtain project file type information; The first hook function of the module packaging plugin is used to perform statistical processing on the project file type information to obtain the project component values; The step of calculating the number of components in the component library of the web page based on the module packaging plugin to obtain the component library component value includes: The initial component type information is obtained by distinguishing the types of components in the component library of the web page; The initial component type information is deduplicated based on the second hook function of the module packaging plugin to obtain the final component type information; The component library component values ​​are obtained by analyzing and processing the final component type information.

2. The method for calculating the reuse rate of web page components according to claim 1, characterized in that, The step of determining the corresponding network page based on the reuse rate calculation request information includes: The reuse rate calculation request information is analyzed and processed to obtain page statistical marker information; The corresponding web pages are extracted from the preset storage server based on the page statistics and tagging information.

3. The method for calculating the reuse rate of web page components according to claim 1, characterized in that, The step of obtaining page values ​​by statistically analyzing the project route array of the network page based on the module packaging plugin includes: The path array is obtained by performing path statistics processing on the project files of the web page based on the module packaging plugin; The number of deredirected paths is obtained by categorizing the path array. The number of redirected paths is determined as the page value.

4. The method for calculating the reuse rate of web page components according to claim 1, characterized in that, The second hook function based on the module packaging plugin performs deduplication on the initial component type information to obtain the final component type information, including: The second hook function of the module packaging plugin performs parameter tuning on the initial component type information to obtain classification result parameters, wherein the classification result parameters include a context object, and the context object carries publisher attribute information; The number of component library files is obtained by removing duplicate file path information from the initial component type information based on the publisher attribute information; The number of component library files is determined as the final component type information.

5. The method for calculating the reuse rate of web page components according to claim 1, characterized in that, Determining the component reuse rate based on the page values, the project component values, and the component library component values ​​includes: The summation of the project component values ​​and the component library component values ​​is performed to obtain the component summation value; The ratio of the summed component value to the page value is taken as the component reuse rate.

6. A device for calculating the reuse rate of web page components, characterized in that, The device includes: The first processing module is used to obtain reuse rate calculation request information; The second processing module is used to determine the corresponding network page based on the reuse rate calculation request information, and to create a module packaging plugin in the corresponding network page. The third processing module is used to perform statistics on the project route array of the web page based on the module packaging plugin to obtain page values; and to perform statistics on the number of components of the web page based on the module packaging plugin to obtain project component values; and to perform statistics on the number of component libraries of the web page based on the module packaging plugin to obtain component library component values. The fourth processing module is used to determine the component reuse rate based on the page value, the project component value, and the component library component value; The fifth processing module is used to feed back the component reuse rate to a preset network interface; Specifically, the project files of the network page are processed by the module packaging plugin to obtain a path array; the path array is then categorized to obtain the page value. The process of calculating the number of components in the web page based on the module packaging plugin to obtain the project component value includes: The project format files of the web page are classified to obtain project file type information; The first hook function of the module packaging plugin is used to perform statistical processing on the project file type information to obtain the project component values; The step of calculating the number of components in the component library of the web page based on the module packaging plugin to obtain the component library component value includes: The initial component type information is obtained by distinguishing the types of components in the component library of the web page; The initial component type information is deduplicated based on the second hook function of the module packaging plugin to obtain the final component type information; The component library component values ​​are obtained by analyzing and processing the final component type information.

7. An electronic device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, when the processor executes the computer program, it implements the method for calculating the reuse rate of web page components as described in any one of claims 1 to 5.

8. A computer-readable storage medium storing computer-executable instructions, characterized in that, The computer-executable instructions are used to execute the web page component reuse rate calculation method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Component generation method and device, electronic equipment and readable storage medium

    CN113821204A

  • VUE-based page generation method, platform, equipment and medium

    CN114510233A