Data automatic fusion entry system and method for B / S business scenarios
Through the automated data fusion entry system for B/S business scenarios, using multi-threaded parallel processing and exception policy processing, combined with the Selenium framework and WebDriver, the problem of low manual entry efficiency is solved, efficient and accurate data entry is achieved, and the cost is reduced Cost and error rate.
Patent Information
- Application Number
- CN202310675905.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-08
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2043-06-08
AI Technical Summary
In B/S business scenarios, manual data collection and entry are inefficient, resulting in a lot of manpower and time costs, and are prone to errors. The existing Selenium is mainly used for browser compatibility testing and is not used to improve data entry efficiency.
Design an automated data fusion entry system for B/S business scenarios, including a multi-source data fusion proofreading module, a business data intelligent entry module and an exception error handling module. WebDriver is used to drive the browser for multi-threaded parallel processing, and the Selenium framework is combined for Web tagging. Element matching and automatic filling, preset exception strategy to handle errors.
It significantly improves the fusion accuracy and entry efficiency of multi-source data, reduces labor costs and time costs, reduces abnormal input and manual operation errors during the data entry process, and achieves efficient data processing and entry.
Smart Images

Figure CN116701511B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of data processing, and in particular relates to a data automatic fusion entry system for B / S business scenarios, and also relates to a data automatic fusion entry method. Background Art
[0002] B / S architecture refers to the browser and server architecture. It is a variation or improvement of the C / S (client / server) architecture. This model unifies the client through the browser, concentrates the core part of the system function implementation on the server, and simplifies the development, maintenance and use of the system. Thanks to the above advantages, the core business lines or main business scenarios of a large number of enterprises are currently composed of information systems with B / S architecture, which to a certain extent reduces the cost and workload of system maintenance and upgrades. However, in the actual use of the business system, there is a type of business scenario that requires a large amount of data collection and entry. In such scenarios, users or administrators need to regularly (such as every day or every few days) enter the data obtained by the upstream business system through different collection methods (including different collection methods such as system export, interface acquisition, and manual reporting) into the target system, which involves repeated multiple entry of a large amount of data, and the manual method is often inefficient and requires a lot of human resources and time costs. Therefore, an automated intelligent data entry technology is needed to help users or managers collect data from different business systems and enter them into the target system (based on B / S architecture) in a unified manner, thereby reducing labor costs and improving information entry efficiency.
[0003] Selenium is a framework for web application testing, which is currently widely used in automated testing. It uses JavaScript to simulate real users to operate the browser. When the test script is executed, the browser automatically clicks, inputs, opens, verifies, and other operations according to the script code, just like what real users do, testing the application from the perspective of the end user. The browsers supported by Selenium include IE (7, 8, 9, 10, 11), Mozilla Firefox, Safari, Google Chrome, Opera, Edge, etc. The main function is to test whether the application can work normally and stably on different browsers and operating systems. When writing execution scripts, you can write use case scripts by testing Java, Python and other languages.
[0004] Currently, in application scenarios where a large amount of business data is collected and entered, many of them are manually summarized and entered, which will cause the business system to require a lot of labor costs and time costs, and the entry efficiency is low and prone to errors; at the same time, the Selenium application testing framework is currently mainly used in browser compatibility testing and functional testing of other Web systems, and has not been applied in the above scenarios to improve the overall data entry efficiency of the business system. Summary of the invention
[0005] The purpose of the present invention is to provide a data automatic fusion and entry system for B / S business scenarios, which can significantly improve the fusion accuracy and entry efficiency of multi-source data.
[0006] Another object of the present invention is to provide a method for automatic data fusion and entry.
[0007] The technical solution adopted by the present invention is an automatic data fusion entry system for B / S business scenarios, including a multi-source data fusion proofreading module, a business data intelligent entry module and an abnormal error handling module; the multi-source data fusion proofreading module is used to import and fuse data to form fused business data to be entered; the business data intelligent entry module fills the business data to be entered into a Web page by driving the browser through WebDriver, and enters the data in a multi-threaded manner; the abnormal error handling module is used to handle errors during the operation process.
[0008] The present invention is also characterized in that:
[0009] The multi-source data fusion and proofreading module includes a business data template configuration module and a target data cleaning and proofreading module.
[0010] The business data template configuration module imports the data reporting item names and data types of the business entry system in the form of a template; the target data cleaning and proofreading module associates multi-source data with business data templates, removes duplicates and erroneous items, and obtains the integrated business data to be entered.
[0011] The business data intelligent entry module includes a Web tag element entity matching module, a business data reporting and entry module, and a multi-threaded parallel processing module.
[0012] The Web tag element entity matching module searches, manages and matches the Web page tag elements of the business system based on the Selenium framework, and determines the association between the data items to be reported and the input tags in the page; the business data reporting and entry module is responsible for automatically filling the integrated business data to be entered into the Web page by driving the browser through WebDriver; the multi-threaded parallel processing module processes multiple reporting units or pages in parallel through multi-threading.
[0013] The exception error handling module includes an exception policy configuration module, an exception handling module and an exception log management module. The exception policy configuration module is used to pre-set exception policies or exception handling policies for modification; the exception handling module is when an exception is found during system operation, it can match it according to the pre-defined exception policy and perform corresponding processing; the exception log management is when the system has some errors or exceptions that cannot be automatically handled, the system will save the relevant logs or instructions.
[0014] Another technical solution adopted by the present invention is a method for automatic data fusion entry for B / S business scenarios, which is specifically implemented according to the following steps:
[0015] Step 1: Get the data item name and data item type, and record them in different data template files. Use Python's file processing library to read the information in the file and generate corresponding data dictionaries according to different types, thereby forming data models for different businesses.
[0016] Step 2: Match the original data with the data model in step 1 to obtain the fused data to be entered;
[0017] Step 3: After receiving the data to be entered, call Python's multiprocessing library to generate multiple processes. Each process processes a piece of data to be entered, and the data entry can be completed. Specifically:
[0018] Step 3.1, each process will start a browser through a WebDriver process, and interact with the browser through WebDriver, and then use the get() method of WebDriver to start the browser and jump to the web page to be entered according to the URL address of the business system. The system will locate the browser element in the web page according to the data items to be entered;
[0019] Step 3.2, after step 3.1, the system will first automatically fill in the administrator account information and password in the configuration file into the corresponding text box browser component through the click() method and the send_keys() method, and simulate the click operation to log in to the business system; then, after locating the different browser elements in the web page through the positioning method in the previous step, the element can be operated, or the value of the input data can be passed to the corresponding element;
[0020] Step 3.3, after step 3.2, the data to be entered on the current page is passed to the located browser page element item. After the transfer is completed, the quit() method is called to exit WebDriver and complete the data entry.
[0021] The beneficial effect of the present invention is: based on the fusion entry system realized by the present invention, the user can meet the project entry requirements of multiple systems after proofreading the data items only once during the data entry process of different projects, significantly improve the fusion accuracy and entry efficiency of multi-source data, greatly reduce labor costs and time costs, and effectively reduce abnormal input and manual operation errors that occur during the processing and entry of data information. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 It is a module architecture diagram of the data automatic fusion entry system for B / S business scenarios of the present invention;
[0023] Figure 2 It is a schematic diagram of the operation principle of the WebDriver protocol of the present invention;
[0024] Figure 3 It is a data processing flow diagram of the data automatic fusion entry system for B / S business scenarios of the present invention. DETAILED DESCRIPTION
[0025] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.
[0026] Example 1
[0027] The present invention is a data automatic fusion input system for B / S business scenarios, such as Figure 1 As shown, it includes a multi-source data fusion and proofreading module, a business data intelligent entry module, and an abnormal error handling module.
[0028] The multi-source data fusion and proofreading module includes a business data template configuration module and a target data cleaning and proofreading module. The business data template configuration module can import the name of the data reporting item and data type and other information of the business entry system in the form of a template; the target data cleaning and proofreading module associates the multi-source data with the business data template, removes the duplicate items and erroneous items, and obtains the fused business data to be entered;
[0029] The business data intelligent entry module is the core of the data automatic fusion entry system, including the Web tag element entity matching module, the business data reporting and entry module, and the multi-threaded parallel processing module. The Web tag element entity matching module searches, manages and matches the Web page tag elements of the business system based on the Selenium framework, and determines the association between the data items to be reported and the input tags in the page; the business data reporting and entry module is responsible for automatically filling the fused business data to be entered into the Web page by driving the browser through WebDriver; the multi-threaded parallel processing module processes multiple reporting units or pages in parallel through multi-threading, which speeds up the entire entry efficiency and shortens the time required for the business process.
[0030] The exception error handling module includes an exception policy configuration module, an exception handling module and an exception log management module. The exception policy configuration module can pre-set some exception policies or exception handling policies for modification; the exception handling module is when an exception is found during the operation of the system, it can match it according to the pre-defined exception policy and perform corresponding processing; the exception log management is when the system has some errors or exceptions that cannot be handled automatically, the system will save the relevant logs or instructions for management personnel to view for manual processing.
[0031] Example 2
[0032] The data automatic fusion input method of the present invention is oriented to B / S business scenarios, such as Figure 3 As shown, the specific implementation steps are as follows:
[0033] Step 1: According to the different input requirements of the business system, obtain the data item name and data item type, record the above information in different data template files, read the information in the file through the Python file processing library, and generate corresponding data dictionaries according to different types, thereby forming data models for different businesses;
[0034] The data template is a data set consisting of all data items and data item types to be entered on each page, tab page or iframe page in the business system; the data item is the label name or ID of the browser element that needs to be entered in the business system reporting interface, such as project name, project code, construction nature, affiliation, investment amount, etc.; the data type can mainly include integer, floating point, Boolean, string, date, etc.
[0035] Step 2: Match the original data with the data models of different businesses obtained in step 1, that is, query the data dictionary generated in step 1 according to the key by the data item name, replace the value of the data item with the value in the original data, remove duplicate items and erroneous items, and obtain the integrated data to be entered according to different business data models;
[0036] Step 3: Input the data to be entered into the business data intelligent entry module. When receiving the data to be entered, Python's multiprocessing library will be called to generate multiple processes. Each process processes a piece of data to be entered, thereby achieving the effect of parallel acceleration. Specifically:
[0037] In step 3.1, each process will start a browser through a WebDriver process and interact with the browser through WebDriver. The selected WebDriver type can be Chrome or Mozilla Firefox, such as Figure 2 As shown, the get() method of WebDriver is then used, and the browser is started according to the URL address of the business system and then jumped to the web page that needs to be entered. The system will locate the browser element in the web page according to the data items to be entered;
[0038] The specific positioning method is as follows: Each browser element on a web page has attributes, and most of these attributes are unique to different elements. Usually, the interface elements on the browser will have a "name" attribute and an "id" attribute, and these attribute values must be unique for each element. For example, the user account input text box can be located by the XPath search method with the id username, and the project type drop-down selection box can be located by the XPath search method with the id projectCategory. After locating the project type drop-down selection box element by the XPath search method with the id projectCategory, you can search for the data item with the id projectCategory in the data set passed in step 2, and select the value corresponding to the data item in the drop-down box options of the projectCategory page element by click(). If the page element is an input box, the value can be passed to the corresponding page element item by send_keys().
[0039] Step 3.2, after step 3.1, the system will first automatically fill in the administrator account information and password in the configuration file into the corresponding text box browser component through the click() method and the send_keys() method, and simulate the click operation to log in to the business system; then, after locating the different browser elements in the web page through the positioning method in the previous step, the element can be operated, or the value of the input data can be passed to the corresponding element;
[0040] In the process of locating browser elements and transmitting input data, due to the association and switching between different pages, other element positioning and browser operations are also required. The specific operations should be handled according to the actual business reporting process. For example, when switching between different tab bars on the same page, the switch_to_frame() method needs to be used to switch the iframe page.
[0041] Step 3.3, after step 3.2, the data to be entered on the current page will be transferred to the located browser page element item. After the transfer is completed, the quit() method is called to exit WebDriver and complete the data entry;
[0042] During the entire data entry process, the exception handling module will handle common errors that occur during system operation. For example, for web page fluctuations, the waiting time will be increased during the processing, and retries will be performed. Only when a certain number of attempts fail will the error log be recorded, waiting for manual intervention. If the administrator account password is entered incorrectly, the backup system administrator account in the configuration file will be temporarily used for entry, and the record will be made in the log. After manual confirmation, the normal entry user will be switched back. For unpredictable exceptions, the error information and the data to be entered will be persistently stored to provide support for manual intervention.
[0043] For B / S architecture business systems that cannot provide APIs or are unmaintained, when a large amount of data entry work is required, the present invention designs an automatic data entry method for B / S business scenarios, which can effectively improve work efficiency and reduce labor costs.
[0044] The present invention effectively combines the fusion processing of multi-source data with automatic data entry, which significantly improves the data processing speed and automation level of the entire prototype system.
[0045] The present invention performs automatic data entry in a parallel multi-threaded manner, further improving work efficiency. At the same time, through abnormal strategy configuration and processing logic, it effectively reduces the error rate in the data processing and entry process, improves the stability of the system, and enables it to achieve long-term uninterrupted operation.
[0046] Example 3
[0047] Taking the entry of project information in the intranet of a certain government platform as an example, according to the statistical information in the actual operation process, the amount of web page data that needs to be filled in for a project is about 300 browser elements (mainly input text boxes, radio buttons, and drop-down boxes). Before using the method of the present invention, the number of projects entered by a single person per day was generally around 40. After introducing the method of the present invention into a specific business work scenario, the number of projects entered per day can reach about 280, and the entry efficiency directly reaches about 7 times the previous level, and the error rate is also lower than that of manual filling.
Claims
1. The data automatic fusion entry system for B / S business scenarios is characterized by: It includes a multi-source data fusion proofreading module, a business data intelligent entry module and an abnormal error handling module; the multi-source data fusion proofreading module is used to import and fuse data to form fused business data to be entered; the business data intelligent entry module fills the business data to be entered into the Web page by driving the browser through WebDriver, and enters it in a multi-threaded manner; the abnormal error handling module is used to handle errors during operation; The multi-source data fusion and proofreading module includes a business data template configuration module and a target data cleaning and proofreading module; The business data template configuration module imports the data reporting item names and data types of the business entry system in the form of a template; the target data cleaning and proofreading module associates multi-source data with the business data template, removes duplicate items and erroneous items therein, and obtains the integrated business data to be entered; The business data intelligent entry module includes a Web tag element entity matching module, a business data reporting and entry module and a multi-threaded parallel processing module; the Web tag element entity matching module searches, manages and matches the Web page tag elements of the business system based on the Selenium framework, and determines the association between the data items to be reported and the input tags in the page; the business data reporting and entry module is responsible for automatically filling the integrated business data to be entered into the Web page by driving the browser through WebDriver; the multi-threaded parallel processing module processes multiple reporting units or pages in parallel in a multi-threaded manner.
2. The data automatic fusion input system for B / S business scenarios according to claim 1 is characterized in that: The exception error handling module includes an exception policy configuration module, an exception handling module and an exception log management module. The exception policy configuration module is used to pre-set exception policies or exception handling policies for modification; the exception handling module is used to match and handle accordingly when an exception is found during system operation according to the pre-defined exception policy; the exception log management is used to save relevant logs or descriptions when some errors or exceptions that cannot be automatically handled occur in the system.
3. The data automatic fusion input method for B / S business scenarios is characterized by: Follow the steps below to implement it: Step 1: Get the data item name and data item type, and record them in different data template files. Use Python's file processing library to read the information in the file and generate corresponding data dictionaries according to different types, thereby forming data models for different businesses. Step 2: Match the original data with the data model of step 1 to obtain the merged data to be entered; Specifically: match the original data with the data model of step 1, that is, query the data dictionary generated in step 1 according to the key by the data item name, replace the value of the data item with the value in the original data, remove duplicate items and erroneous items, and obtain the processed data to be entered according to different business data models; Step 3: After receiving the data to be entered, call Python's multiprocessing library to generate multiple processes. Each process processes one piece of data to be entered, and the data entry can be completed. Specifically: Step 3.1, each process will start a browser through a WebDriver process, and interact with the browser through WebDriver, and then use the get() method of WebDriver to start the browser and jump to the web page to be entered according to the URL address of the business system. The system will locate the browser element in the web page according to the data items to be entered; Step 3.2, after step 3.1, the system will first automatically fill in the administrator account information and password in the configuration file into the corresponding text box browser component through the click() method and the send_keys() method, and simulate the click operation to log in to the business system; then, after locating the different browser elements in the web page through the positioning method in the previous step, the element can be operated, or the value of the input data can be passed to the corresponding element; Step 3.3, after step 3.2, the data to be entered in the current page is passed to the located browser page element item. After the transfer is completed, call the quit() method to exit WebDriver and complete the data entry.
