Maintenance data acquisition method and device, equipment and medium

Through the full-duplex communication protocol and automated rule engine or attribute mode adaptation technology, the difficulty of obtaining maintenance data in equipment management is solved, fast and accurate data acquisition is achieved, operation and maintenance efficiency and accuracy are improved, and the traditional Tool safety and adaptability limitations.

CN118568329APending Publication Date: 2024-08-30INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410703538.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-31
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

In the field of equipment management and operation, existing technologies are difficult to quickly and accurately obtain maintenance data from equipment manufacturers' official websites. Especially when faced with official websites with strong security measures, traditional automation tools cannot bypass security and adaptability restrictions, resulting in data Difficulty crawling.

Method used

Use a full-duplex communication protocol to connect to the browser endpoint of the equipment manufacturer's official website, use an automated rule engine or analyze attribute patterns and keywords to adapt the web page maintenance search box, directly interact with the bottom layer of the browser, obtain maintenance data, and provide cross-platform and Cross-browser compatibility, bypassing the limitations of traditional automation tools.

Benefits of technology

It enables quick and accurate acquisition of maintenance data from the equipment manufacturer's official website, improves adaptation speed and accuracy, improves operation and maintenance efficiency, reduces labor costs and error correction time, and supports better maintenance decisions and cost management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118568329A
    Figure CN118568329A
Patent Text Reader

Abstract

The invention relates to the field of equipment management, operation and maintenance, and discloses a maintenance data acquisition method and device, equipment and a medium, and the method comprises the steps: connecting a browser endpoint of an official website of a currently accessed equipment manufacturer through a full duplex communication protocol; after the connection is successful, directly interacting with the bottom layer of the browser by using a full duplex communication protocol; judging whether the equipment manufacturer official website is a historical equipment manufacturer official website or not according to the loaded historical equipment manufacturer configuration information; if yes, automatically controlling the browser by adopting a corresponding automatic rule engine, and obtaining maintenance data; and if not, analyzing the attribute mode and the keyword of the equipment manufacturer official website, adapting to the position of the webpage maintenance search box, and obtaining the maintenance data according to the position of the webpage maintenance search box. In this way, the browser behavior of the official website of the equipment manufacturer can be accurately controlled, good cross-platform and cross-browser compatibility is provided, and the maintenance data of the official website of the equipment manufacturer can be rapidly and accurately obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of equipment management and operation, and in particular to a method, device, equipment and medium for acquiring maintenance data. Background Art

[0002] In the field of equipment management and operation, equipment maintenance and configuration management is a crucial task. With the increasing complexity of enterprise Internet infrastructure and the diversification of equipment manufacturers, obtaining and managing equipment maintenance data has become a challenge.

[0003] In related technical solutions, equipment maintenance data is usually obtained in two ways: the first way is for the system administrator to manually query the serial number on the official website of each equipment manufacturer, which is not only time-consuming but also prone to errors; the second way is to call the application programming interface (Application Programming Interface, API) of the official website through the Hypertext Transfer Protocol (HTTP). Although HTTP interface calls provide a possibility of automation, they cannot bypass those official websites with strict security reinforcement measures, Internet Protocol (IP) address restrictions and complex programming language challenges, making data crawling difficult. Summary of the invention

[0004] The purpose of the present invention is to provide a maintenance data acquisition method, device, equipment and medium, which can accurately control the browser behavior of the equipment manufacturer's official website, provide good cross-platform and cross-browser compatibility, and can quickly and accurately acquire the maintenance data of the equipment manufacturer's official website.

[0005] In order to solve the above technical problems, the present invention provides a maintenance data acquisition method, the method comprising:

[0006] Use the full-duplex communication protocol to connect to the browser endpoint of the device manufacturer's official website currently being visited;

[0007] After the connection is successful, the full-duplex communication protocol is used to directly interact with the browser bottom layer of the device manufacturer's official website;

[0008] According to the loaded historical equipment manufacturer configuration information, determining whether the equipment manufacturer official website is a historical equipment manufacturer official website;

[0009] If so, a corresponding automated rule engine is used to automatically control the browser of the equipment manufacturer's official website to obtain the maintenance data of the equipment manufacturer's official website;

[0010] If not, the attribute pattern and keywords of the equipment manufacturer's official website are analyzed, adapted to the location of the web page maintenance search box, and the maintenance data of the equipment manufacturer's official website is obtained according to the location of the web page maintenance search box.

[0011] In a first aspect, in the above maintenance data acquisition method provided by the present invention, a browser endpoint of the currently visited equipment manufacturer's official website is connected using a full-duplex communication protocol, including:

[0012] Query the browser startup program path of the currently visited device manufacturer's official website;

[0013] According to the browser startup program path, start the corresponding browser;

[0014] The browser's built-in developer tool library endpoint is launched using a full-duplex communication protocol connection.

[0015] On the other hand, in the above maintenance data acquisition method provided by the present invention, a corresponding automated rule engine is used to automatically control the browser of the equipment manufacturer's official website, including:

[0016] Selecting an automated adaptation rule engine corresponding to the type of the device manufacturer's official website from the loaded historical device manufacturer configuration information;

[0017] The selected automatic adaptation rule engine is used to automatically control the browser of the device manufacturer's official website.

[0018] On the other hand, in the above-mentioned maintenance data acquisition method provided by the present invention, the attribute mode and keywords of the official website of the equipment manufacturer are analyzed, adapted to the location of the web page maintenance search box, and the maintenance data of the official website of the equipment manufacturer is acquired according to the location of the web page maintenance search box, including:

[0019] Using the input box of the device manufacturer's official website as a query element;

[0020] Analyze the attribute patterns and keywords of the official website of the equipment manufacturer, and automatically adapt the query element according to the analysis result to adapt it to the location of the web page maintenance search box;

[0021] Obtaining an identifier of the web page maintenance search box from the location of the web page maintenance search box;

[0022] After typing the serial number in the maintenance search box on the web page and submitting the query, the maintenance data of the equipment manufacturer's official website is obtained.

[0023] On the other hand, in the above maintenance data acquisition method provided by the present invention, the following formula is used to automatically adapt the query element:

[0024] ;

[0025] in, Represents a query element Total score of the match; represents the number of matching features, where the matching features are determined by the analysis result; Indicates The weight of the matching features; is the matching function.

[0026] On the other hand, in the above-mentioned maintenance data acquisition method provided by the present invention, the attribute pattern and keywords of the official website of the equipment manufacturer are analyzed, and the query element is automatically adapted according to the analysis result to adapt to the location of the web page maintenance search box, including:

[0027] Verify whether the type attribute of the query element is a set attribute, and use the verification result of the type attribute of the query element as the first matching feature;

[0028] Determine whether the query element contains a prompt text displayed in a meaningful form element, and use the determination result in the query element as a second matching feature;

[0029] Convert the text of the query element to lowercase, and split it according to spaces to obtain a word array, count the words containing the keyword in the word array, obtain the number of matched words, and divide the number of matched words by the total number of words in the word array to obtain the keyword matching degree as the third matching feature;

[0030] Calculating the similarity between the path of the query element in the object model of the webpage content structure and the preset ideal search box path, and using the calculated similarity as the fourth matching feature;

[0031] using the matching result of the attribute pattern of the query element and the custom search box pattern as the fifth matching feature;

[0032] According to the first matching feature, the weight of the first matching feature, the second matching feature, the weight of the second matching feature, the third matching feature, the weight of the third matching feature, the fourth matching feature, the weight of the fourth matching feature, the fifth matching feature, and the weight of the fifth matching feature, the query element is automatically adapted to obtain a total score of the query element matching;

[0033] The position of the search box corresponding to the highest score in the total score is obtained, and the obtained position is the position of the web page maintenance search box.

[0034] On the other hand, in the above maintenance data acquisition method provided by the present invention, it also includes:

[0035] Cleaning the acquired maintenance data; the cleaning process includes removing useless formats, converting data types, and standardizing date formats;

[0036] The cleaned data is stored in the database.

[0037] In order to solve the above technical problems, the present invention further provides a maintenance data acquisition device, the device comprising:

[0038] A protocol connection module, used to connect to the browser endpoint of the currently visited device manufacturer's official website using a full-duplex communication protocol; after the connection is successful, the full-duplex communication protocol is used to directly interact with the bottom layer of the browser of the device manufacturer's official website;

[0039] An official website judgment module, used to judge whether the equipment manufacturer's official website is a historical equipment manufacturer's official website based on the loaded historical equipment manufacturer configuration information;

[0040] An automated rule engine module, for automatically controlling the browser of the equipment manufacturer's official website by using a corresponding automated rule engine to obtain maintenance data of the equipment manufacturer's official website when the equipment manufacturer's official website is a historical equipment manufacturer's official website;

[0041] The adaptation algorithm module is used to analyze the attribute pattern and keywords of the equipment manufacturer's official website when the equipment manufacturer's official website is not the historical equipment manufacturer's official website, adapt to the location of the web page maintenance search box, and obtain the maintenance data of the equipment manufacturer's official website according to the location of the web page maintenance search box.

[0042] In order to solve the above technical problems, the present invention further provides a maintenance data acquisition device, the device comprising:

[0043] Memory for storing computer programs;

[0044] A processor is used to implement the steps of the above-mentioned maintenance data acquisition method when executing the computer program.

[0045] In order to solve the above technical problem, the present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above maintenance data acquisition method are implemented.

[0046] It can be seen from the above technical scheme that the present invention provides a maintenance data acquisition method, which includes: using a full-duplex communication protocol to connect to the browser endpoint of the currently visited equipment manufacturer's official website; after the connection is successful, using the full-duplex communication protocol to directly interact with the browser bottom layer of the equipment manufacturer's official website; based on the loaded historical equipment manufacturer configuration information, determine whether the equipment manufacturer's official website is a historical equipment manufacturer's official website; if so, use the corresponding automation rule engine to automatically control the browser of the equipment manufacturer's official website to obtain the maintenance data of the equipment manufacturer's official website; if not, analyze the attribute pattern and keywords of the equipment manufacturer's official website, adapt to the location of the web page maintenance search box, and obtain the maintenance data of the equipment manufacturer's official website according to the location of the web page maintenance search box.

[0047] The beneficial effect of the present invention lies in that the above-mentioned maintenance data acquisition method provided by the present invention can accurately control the browser behavior of the equipment manufacturer's official website by utilizing the full-duplex communication protocol, provides good cross-platform and cross-browser compatibility, and allows interaction with the underlying functions of the browser without relying on external browser drivers. In addition, the present invention adopts an automation rule engine to automatically control the browser, or analyze the attribute pattern and keywords of the equipment manufacturer's official website, and adapt to the location of the web page maintenance search box, so as to quickly and accurately obtain the maintenance data of the equipment manufacturer's official website, which can improve the adaptation speed and accuracy of the equipment manufacturer's official website, thereby effectively bypassing the limitations of traditional automation tools in terms of security and adaptability, and greatly improving operation and maintenance efficiency.

[0048] In addition, the present invention also provides a corresponding maintenance data acquisition device, maintenance data acquisition equipment and computer-readable storage medium for the maintenance data acquisition method, which have the same or corresponding technical features as the above-mentioned maintenance data acquisition method and have the same effects as above. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0050] Figure 1 A flowchart of a maintenance data acquisition method provided in an embodiment of the present invention;

[0051] Figure 2 A schematic diagram of the structure of a maintenance data acquisition device provided in an embodiment of the present invention;

[0052] Figure 3 A schematic diagram of the structure of a maintenance data acquisition device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0053] Traditionally, the task of obtaining equipment maintenance data often requires system administrators to manually visit the official websites of various equipment manufacturers to manually retrieve and update maintenance information. This process is not only time-consuming but also prone to errors. With the development of automation technology, especially in the fields of automated testing and network data crawling technology, some solutions have been proposed to simplify this task. However, when faced with the official websites of equipment manufacturers with strong security measures, these automated methods often encounter difficulties. For example, traditional data crawling technology mainly relies on HTTP request simulation, which cannot bypass those official websites with strong security measures, IP address restrictions and complex programming language challenges, making data crawling difficult.

[0054] Based on this, in order to solve the above technical problems, the present invention provides a maintenance data acquisition method, device, equipment and medium.

[0055] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0056] In order to enable those skilled in the art to better understand the solution of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Figure 1 A flowchart of a maintenance data acquisition method provided in an embodiment of the present invention, such as Figure 1 As shown, the method includes:

[0057] S101. Use a full-duplex communication protocol to connect to a browser endpoint of a currently visited device manufacturer's official website.

[0058] It should be noted that the full-duplex communication protocol can use WebSocket (a protocol for implementing two-way communication in Web applications). Traditional automation tools such as WebDriver (a remote control interface that supports control of user agents) rely on specific browser drivers and versions, while the method of the present invention using a full-duplex communication protocol (such as the WebSocket protocol) provides good cross-platform and cross-browser compatibility, supports multiple browsers and operating systems, and can run on different operating systems and browsers, which ensures seamless operation in different technical environments without the need for redevelopment or configuration for specific platforms.

[0059] The above-mentioned device refers to a device that can generate maintenance data. The above-mentioned browser endpoint refers to the interface or address for data interaction between the browser and the device. It can be a website Uniform Resource Locator (URL) address used to access the service or API resource of the feature.

[0060] Before executing step S101, the process may also include: loading preset configuration information, which may include URL addresses of various equipment manufacturers, specific data extraction rules, etc. These configuration information are stored in a configuration file or database, allowing the system to know which websites to extract data from and how to do it, and also checking whether all necessary environmental dependencies are ready, such as network connection, database connection status, browser protocol interaction status, etc., to ensure the normal operation of the system.

[0061] S102. After the connection is successful, use the full-duplex communication protocol to directly interact with the browser bottom layer of the device manufacturer's official website.

[0062] In actual applications, many equipment manufacturers' official websites have adopted complex security measures to prevent data crawling by automated scripts. The present invention can directly interact with the bottom layer of the browser by using the WebSocket protocol, bypassing these security measures, so that data acquisition is no longer restricted by conventional automated tools.

[0063] The above-mentioned browser bottom layer refers to the internal structure and mechanism of the browser. These structures and mechanisms are responsible for implementing the main functions of the browser, including page rendering, network communication, resource management, user interaction, etc.

[0064] S103. Determine whether the official website of the equipment manufacturer is an official website of the historical equipment manufacturer according to the loaded historical equipment manufacturer configuration information.

[0065] If yes, then execute step S104. If no, then execute step S105. After executing step S104 or step S105, step S106 may be executed.

[0066] S104, using a corresponding automation rule engine to automatically control the browser of the equipment manufacturer's official website.

[0067] In practice, the present invention may have an automated rule engine built in, defining specific automated rules for each supported device manufacturer or website type, and these rules can guide how to identify and extract maintenance configuration information on a web page.

[0068] S105. Analyze the attribute mode and keywords of the equipment manufacturer's official website, and adapt them to the location of the web page maintenance search box.

[0069] In practice, step S105 can be understood as a precise adaptation algorithm, which uses the adaptation algorithm to intelligently identify and adapt the location of the web maintenance search box of various equipment manufacturers' official websites by analyzing the attribute patterns and keywords of the web pages, so as to identify and adapt the web page structure, facilitate the subsequent search by typing the serial number keyword, ensure that the required data can be accurately located and extracted, and thus quickly and accurately obtain the required maintenance configuration information. In addition, the adaptation algorithm can quickly adapt to the newly emerged equipment manufacturer's official website without the need for frequent manual updates and maintenance of the rule base.

[0070] It should be noted that the present invention can ensure that the data extracted from the website is accurate by using precise automated rules or precise adaptation algorithms, which reduces the possibility of human error and improves the reliability of the data.

[0071] S106. Obtain maintenance data from the equipment manufacturer's official website.

[0072] In practical applications, maintenance data may include data and information configured, as well as data and information generated during the maintenance process of the system or equipment. These data and information record various states and maintenance conditions of the system or equipment, such as hardware and software configuration data, installation date, maintenance history, failure frequency and maintenance cost, etc. Modern websites make extensive use of JavaScript (a lightweight, interpreted or just-in-time compiled programming language with function priority) and dynamic content loading technology. The present invention can effectively process these dynamic contents and ensure accurate acquisition of maintenance data. In addition, the automated maintenance data extraction process reduces the need for manual operation, making it fast and continuous to extract maintenance configuration information from the websites of multiple equipment manufacturers. This greatly shortens the time for data collection, improves overall work efficiency, reduces the need for specialized personnel to perform manual data collection, thereby reducing labor costs, and reduces the time for error correction and data verification, further reducing maintenance costs.

[0073] In the above-mentioned maintenance data acquisition method provided by the embodiment of the present invention, the full-duplex communication protocol can be used to accurately control the browser behavior of the equipment manufacturer's official website, providing good cross-platform and cross-browser compatibility, allowing interaction with the underlying functions of the browser without relying on external browser drivers. In addition, the present invention uses an automated rule engine to automatically control the browser, or analyze the attribute mode and keywords of the equipment manufacturer's official website, and adapt to the location of the web page maintenance search box. The maintenance data of the equipment manufacturer's official website can be quickly and accurately obtained, which can improve the adaptation speed and accuracy of the equipment manufacturer's official website, thereby effectively bypassing the limitations of traditional automation tools in terms of security and adaptability, and greatly improving operation and maintenance efficiency. Accurate and timely maintenance configuration data supports enterprises to make better maintenance decisions and cost management. Enterprises can perform budget planning and resource allocation based on accurate data to optimize maintenance operations.

[0074] Furthermore, in the specific implementation, in the above-mentioned maintenance data acquisition method provided in the embodiment of the present invention, step S101 uses the full-duplex communication protocol to connect to the browser endpoint of the currently visited device manufacturer's official website, which can specifically include: querying the browser startup program path of the currently visited device manufacturer's official website; starting the corresponding browser according to the browser startup program path; using the full-duplex communication protocol to connect to the built-in developer tool library endpoint of the started browser.

[0075] In implementation, the developer tool library can use DevTools (which is the browser's built-in developer tool). First, by reading the preset configuration information, you can query the built-in browser launcher path and start the browser. Then, try to connect to the browser's DevTools endpoint through the WebSocket protocol, debug port, and Websocket URL. After the connection attempt, check whether it is successfully connected to the browser's DevTools. If the connection fails, you can try to reconnect and record the error information.

[0076] The present invention can connect to the DevTools endpoint of the browser through the WebSocket protocol, and directly interact with the underlying functions of the browser through the WebSocket protocol. In this way, the browser control technology based on the DevTools development tool and the WebSocket protocol is adopted, allowing the system to directly interact with the underlying functions of the browser to obtain the maintenance configuration information of different equipment manufacturers without relying on external browser drivers. By using DevTools and the WebSocket protocol to interact with the browser, the browser behavior can be more accurately controlled, including but not limited to network requests, object model (Document Object Model, DOM) operations of the web page content structure, and operations performed by JavaScript, from automatically opening the browser to obtaining the corresponding maintenance data, effectively bypassing the limitations of traditional automation tools in terms of security and adaptability. This method can effectively bypass complex security policies and improve the success rate and efficiency of data capture.

[0077] Furthermore, in a specific implementation, in the above-mentioned maintenance data acquisition method provided in an embodiment of the present invention, step S104 uses a corresponding automation rule engine to automatically control the browser of the equipment manufacturer's official website, which may specifically include: selecting an automation adaptation rule engine corresponding to the type of the equipment manufacturer's official website from the loaded historical equipment manufacturer configuration information; and using the selected automation adaptation rule engine to automatically control the browser of the equipment manufacturer's official website.

[0078] In implementation, when it is determined that the official website of a device manufacturer is a historical device manufacturer official website, appropriate automation rules can be selected from the preloaded configuration based on the currently visited device manufacturer official website. These rules define how to navigate the website, where to click, when to enter data, etc. Then, the browser is automatically operated according to the selected rules, including navigating to a specific page, filling in forms, clicking buttons, etc. This process is fully automated and does not require human intervention. It can automatically identify and extract maintenance configuration information on the official website of the device manufacturer.

[0079] It should be noted that in the present invention, after the corresponding automation rule engine is used to automatically control the browser of the equipment manufacturer's official website, it can also include: dynamically adding, modifying or deleting the automation rules in the automation rule engine according to the update or structural change of the equipment manufacturer's official website, so that the automation rule engine can quickly adapt to the update or structural change of the equipment manufacturer's official website. This flexibility ensures that the maintenance data acquisition method of the present invention can be effective for a long time and can continue to adapt to changes in business needs without the need for cumbersome code modifications. The dynamic addition, modification or deletion of the automation rules in the automation rule engine can be performed on a user-friendly interface, that is, the behavior of maintenance data acquisition can be adjusted through simple interface operations, which greatly reduces maintenance complexity and maintenance costs.

[0080] Furthermore, in a specific implementation, in the above-mentioned maintenance data acquisition method provided in an embodiment of the present invention, step S105 analyzes the attribute pattern and keywords of the equipment manufacturer's official website, adapts them to the location of the web page maintenance search box, and obtains the maintenance data of the equipment manufacturer's official website according to the location of the web page maintenance search box. Specifically, it may include: using the input box of the equipment manufacturer's official website as a query element; analyzing the attribute pattern and keywords of the equipment manufacturer's official website, and automatically adapting the query element according to the analysis results to adapt to the location of the web page maintenance search box; obtaining the identifier of the web page maintenance search box from the location of the web page maintenance search box; and obtaining the maintenance data of the equipment manufacturer's official website after typing the serial number in the web page maintenance search box and submitting the query.

[0081] In implementation, when it is determined that the official website of a device manufacturer is not a historical device manufacturer official website, that is, for a new manufacturer that is not included in the rules, firstly, based on the query element being a search box (e.g., an input box), <input> or text box <textarea> etc.), and then use the precise adaptation algorithm for automatic adaptation. Specifically, the following formula can be used to automatically adapt the query elements:< / textarea>

[0082] ; (1)

[0083] in, Represents a query element Total score of the match; Indicates the number of matching features, which are determined by the analysis results; Indicates The weight of the matching features; is the matching function.

[0084] Furthermore, in a specific implementation, in the above-mentioned maintenance data acquisition method provided in an embodiment of the present invention, the attribute pattern and keywords of the equipment manufacturer's official website are analyzed in the above-mentioned steps, and the query element is automatically adapted according to the analysis result to adapt to the location of the web page maintenance search box. Specifically, it may include: checking whether the type attribute of the query element is a set attribute, and using the type attribute verification result of the query element as the first matching feature; judging whether the query element contains a prompt text displayed in a meaningful form element, and using the judgment result in the query element as the second matching feature; converting the text of the query element to lowercase, and splitting it according to spaces to obtain a word array, counting the words containing the keywords in the word array, obtaining the number of matched words, and dividing the number of matched words by the total number of words in the word array, The keyword matching degree is obtained and used as the third matching feature; the similarity between the path of the query element in the object model of the web page content structure and the preset ideal search box path is calculated, and the calculated similarity is used as the fourth matching feature; the matching result of the attribute mode of the query element and the custom search box mode is used as the fifth matching feature; according to the first matching feature, the weight of the first matching feature, the second matching feature, the weight of the second matching feature, the third matching feature, the weight of the third matching feature, the fourth matching feature, the weight of the fourth matching feature, the fifth matching feature, and the weight of the fifth matching feature, the query element is automatically adapted to obtain the total score of the query element matching; the position of the search box corresponding to the highest score in the total score is obtained, and the obtained position is the position of the web page maintenance search box.

[0085] In implementation, after the first matching feature, the second matching feature, the third matching feature, the fourth matching feature, and the fifth matching feature are determined, the following formula may be used to automatically adapt the query element to obtain a total score of the query element matching:

[0086] (2)

[0087] in, is the first matching feature, is the weight of the first matching feature, is the second matching feature, is the weight of the second matching feature, is the third matching feature, is the weight of the third matching feature, is the fourth matching feature, is the weight of the fourth matching feature, is the fifth matching feature, is the weight of the fifth matching feature.

[0088] The first matching feature It verifies the type attribute of the input box, such as "text" or "search". If it is, it returns 1, otherwise it returns 0.

[0089] The second matching feature The input box contains meaningful prompt text (placeholder) displayed in form elements such as input boxes and text boxes, such as "warranty period", "serial number", "serial", "maintenance", etc. If it contains meaningful text, it returns 1, otherwise it returns 0.

[0090] The third matching feature It is done by analyzing the keywords in the element's tags and attribute values, as well as the frequency and position of these keywords in the text around the element. First, in this function, the element text is converted to lowercase and split into word arrays by spaces. Then, the keyword array is traversed, and each word is checked to see if it contains the keyword, and the number of matching words is calculated. Finally, the number of matching words is divided by the total number of words to get the keyword matching degree.

[0091] The fourth matching feature It is the DOM structure similarity, which compares the similarity between the path of the element in the DOM tree and the predefined ideal search box path. In this example, the function uses the character edit distance algorithm to calculate the edit distance between two strings. The edit distance represents the minimum number of editing operations required to convert one string into another, such as inserting, deleting, or replacing characters. The DOM structure similarity is obtained by calculating the edit distance and normalizing it to a range between 0 and 1.

[0092] The fifth matching feature It is achieved by customizing the class name, role attributes, etc. of the elements of common search boxes to match whether the webpage search box conforms to the common search box mode. If it conforms, 1 is returned, otherwise 0 is returned.

[0093] The weight of the first matching feature can be set to 0.5, the weight of the second matching feature can be set to 0.25, the weight of the third matching feature can be set to 0.2, the weight of the fourth matching feature can be set to 0.15, and the weight of the fifth matching feature can be set to 0.1. The listed weights can be adjusted according to actual conditions and are not limited here.

[0094] It should be noted that the adaptation algorithm used in the present invention is a data recognition technology based on the web page structure, which can recognize and adapt to the dynamic changes of the web page content. Different from the traditional data extraction method based on fixed page selectors, the algorithm can locate data by analyzing the DOM structure of the entire page and the relationship between elements, which enhances the adaptability to web page updates and the accuracy of data extraction.

[0095] Furthermore, in specific implementation, the above-mentioned maintenance data acquisition method provided in the embodiment of the present invention may also include: cleaning the acquired maintenance data; the cleaning process includes removing useless formats, converting data types, and standardizing date formats; and storing the cleaned data in a database.

[0096] In implementation, the acquired maintenance data can be cleaned and standardized, including removing useless formats, converting data types, standardizing date formats, etc., to ensure data quality and consistency. The cleaned data is then stored in the system's database for further analysis, report generation, or use in other business processes.

[0097] It should be added that the present invention can obtain data by simulating user operations instead of using traditional interface calls, which helps to bypass the website's anti-crawler technology and reduce the risk of being detected. In addition, all data transmission and storage adopt necessary encryption measures to ensure data security. In addition, directly using the WebSocket protocol may respond more quickly because it reduces the processing of the middle layer and potential performance overhead.

[0098] In the above embodiments, the maintenance data acquisition method is described in detail, and the present invention also provides embodiments corresponding to the maintenance data acquisition device and the maintenance data acquisition equipment. It should be noted that the present invention describes the embodiments of the device part from two perspectives, one is based on the functional module perspective, and the other is based on the hardware perspective.

[0099] Figure 2 This is a schematic diagram of the structure of the maintenance data acquisition device provided by an embodiment of the present invention. This embodiment is based on the perspective of functional modules, such as Figure 2 As shown, the device comprises:

[0100] The protocol connection module 10 is used to connect to the browser endpoint of the currently visited device manufacturer's official website using the full-duplex communication protocol; after the connection is successful, the full-duplex communication protocol is used to directly interact with the browser bottom layer of the device manufacturer's official website;

[0101] The official website judgment module 11 is used to judge whether the official website of the equipment manufacturer is the official website of the historical equipment manufacturer according to the loaded historical equipment manufacturer configuration information;

[0102] The automation rule engine module 12 is used to automatically control the browser of the equipment manufacturer's official website by using the corresponding automation rule engine to obtain the maintenance data of the equipment manufacturer's official website when the equipment manufacturer's official website is a historical equipment manufacturer's official website;

[0103] The adaptation algorithm module 13 is used to analyze the attribute pattern and keywords of the equipment manufacturer's official website when the equipment manufacturer's official website is not the historical equipment manufacturer's official website, adapt it to the location of the web page maintenance search box, and obtain the maintenance data of the equipment manufacturer's official website according to the location of the web page maintenance search box.

[0104] In the above-mentioned maintenance data acquisition device provided in the embodiment of the present invention, the browser behavior of the equipment manufacturer's official website can be accurately controlled through the interaction of the above-mentioned four modules, and it has good cross-platform and cross-browser compatibility, allowing interaction with the underlying functions of the browser without relying on external browser drivers. It can also quickly and accurately acquire the maintenance data of the equipment manufacturer's official website, which can improve the adaptation speed and accuracy of the equipment manufacturer's official website, effectively bypass the limitations of traditional automation tools in terms of security and adaptability, and greatly improve operation and maintenance efficiency.

[0105] Since the embodiments of the device part correspond to the embodiments of the method part, the embodiments of the device part refer to the description of the embodiments of the method part, which will not be described here. And it has the same beneficial effects as the above-mentioned maintenance data acquisition method.

[0106] Furthermore, in specific implementation, in the above-mentioned maintenance data acquisition device provided in the embodiment of the present invention, the protocol connection module 10 can be specifically used to query the browser startup program path of the currently visited equipment manufacturer's official website; start the corresponding browser according to the browser startup program path; and use the full-duplex communication protocol to connect to the built-in developer tool library endpoint of the started browser.

[0107] The automation rule engine module 12 can be specifically used to select an automation adaptation rule engine corresponding to the type of the device manufacturer's official website from the loaded historical device manufacturer configuration information; and use the selected automation adaptation rule engine to automatically control the browser of the device manufacturer's official website.

[0108] The adaptation algorithm module 13 can be specifically used to use the input box of the equipment manufacturer's official website as a query element; analyze the attribute pattern and keywords of the equipment manufacturer's official website, and automatically adapt the query element according to the analysis results to adapt it to the location of the web page maintenance search box; obtain the identifier of the web page maintenance search box from the location of the web page maintenance search box; after typing the serial number in the web page maintenance search box and submitting the query, obtain the maintenance data of the equipment manufacturer's official website.

[0109] Furthermore, in a specific implementation, the maintenance data acquisition device provided in the embodiment of the present invention may further include:

[0110] The data processing module is used to clean the acquired maintenance data; the cleaning process includes removing useless formats, converting data types, and standardizing date formats; and storing the cleaned data in the database.

[0111] Figure 3 This is a structural diagram of the maintenance data acquisition device provided in an embodiment of the present invention. This embodiment is based on the hardware perspective, such as Figure 3 As shown, the maintenance data acquisition equipment includes:

[0112] A memory 20, used for storing computer programs;

[0113] The processor 21 is used to implement the steps of the maintenance data acquisition method mentioned in the above embodiment when executing the computer program.

[0114] Among them, the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 can be implemented in at least one hardware form of a digital signal processor (DSP), a field-programmable gate array (FPGA), and a programmable logic array (PLA). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU; the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 21 may be integrated with a graphics processing unit (GPU), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.

[0115] The memory 20 may include one or more computer-readable storage media, which may be non-transitory. The memory 20 may also include high-speed random access memory, and non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 20 is at least used to store the following computer program 201, wherein, after the computer program is loaded and executed by the processor 21, it can implement the relevant steps of the maintenance data acquisition method disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 20 may also include an operating system 202 and data 203, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 202 may include Windows, Unix, Linux, etc. Data 203 may include, but is not limited to, the data involved in the above-mentioned maintenance data acquisition method, etc.

[0116] In some embodiments, the maintenance data acquisition device may further include a display screen 22, an input / output interface 23, a communication interface 24, a power supply 25, and a communication bus 26. Those skilled in the art will appreciate that Figure 3 The structure shown in does not constitute a limitation on the maintenance data acquisition device, and may include more or fewer components than shown in the figure. The maintenance data acquisition device provided by the embodiment of the present invention includes a memory and a processor. When the processor executes the program stored in the memory, it can implement the following method: the maintenance data acquisition method, the effect is the same as above.

[0117] Finally, the present invention also provides an embodiment corresponding to a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps recorded in the above method embodiment are implemented.

[0118] It is understandable that if the method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or part of the contribution to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and executes all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code. The computer-readable storage medium provided by the present invention can implement the above-mentioned maintenance data acquisition method, and the effect is the same as above.

[0119] Finally, the present invention also provides an embodiment corresponding to a computer program product. The computer program product includes a computer program / instruction, and when the computer program / instruction is executed by a processor, the steps described in the above maintenance data acquisition method embodiment are implemented. The computer program product provided by the present invention can implement the above-mentioned maintenance data acquisition method, and the effect is the same as above.

[0120] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.

[0121] The maintenance data acquisition method, device, equipment and medium provided by the present invention are introduced in detail above. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the embodiments can refer to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can refer to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principle of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the scope of protection of the present invention.

Claims

1. A method for acquiring maintenance data, It is characterized in that The method comprises: Use the full-duplex communication protocol to connect to the browser endpoint of the device manufacturer's official website currently being visited; After the connection is successful, the full-duplex communication protocol is used to directly interact with the browser bottom layer of the device manufacturer's official website; According to the loaded historical equipment manufacturer configuration information, determining whether the equipment manufacturer official website is a historical equipment manufacturer official website; If so, a corresponding automated rule engine is used to automatically control the browser of the equipment manufacturer's official website to obtain the maintenance data of the equipment manufacturer's official website; If not, the attribute pattern and keywords of the equipment manufacturer's official website are analyzed, adapted to the location of the web page maintenance search box, and the maintenance data of the equipment manufacturer's official website is obtained according to the location of the web page maintenance search box.

2. The maintenance data acquisition method according to claim 1, It is characterized in that Use the full-duplex communication protocol to connect to the browser endpoint of the device manufacturer's official website currently being visited, including: Query the browser startup program path of the currently visited device manufacturer's official website; According to the browser startup program path, start the corresponding browser; The browser's built-in developer tool library endpoint is launched using a full-duplex communication protocol connection.

3. The maintenance data acquisition method according to claim 1, It is characterized in that The corresponding automated rule engine is used to automatically control the browser of the official website of the equipment manufacturer, including: Selecting an automated adaptation rule engine corresponding to the type of the device manufacturer's official website from the loaded historical device manufacturer configuration information; The selected automatic adaptation rule engine is used to automatically control the browser of the device manufacturer's official website.

4. The maintenance data acquisition method according to claim 1, It is characterized in that Analyze the attribute mode and keywords of the official website of the equipment manufacturer, adapt to the location of the web page maintenance search box, and obtain the maintenance data of the official website of the equipment manufacturer according to the location of the web page maintenance search box, including: Using the input box of the device manufacturer's official website as a query element; Analyze the attribute patterns and keywords of the official website of the equipment manufacturer, and automatically adapt the query element according to the analysis result to adapt it to the location of the web page maintenance search box; Obtaining an identifier of the web page maintenance search box from the location of the web page maintenance search box; After typing the serial number in the maintenance search box on the web page and submitting the query, the maintenance data of the equipment manufacturer's official website is obtained.

5. The maintenance data acquisition method according to claim 4, It is characterized in that The query element is automatically adapted using the following formula: ; in, Represents a query element Total score of the match; represents the number of matching features, where the matching features are determined by the analysis result; Indicates The weight of the matching features; is the matching function.

6. The maintenance data acquisition method according to claim 5, It is characterized in that Analyze the attribute patterns and keywords of the official website of the equipment manufacturer, and automatically adapt the query element according to the analysis result to adapt it to the location of the web page maintenance search box, including: Verify whether the type attribute of the query element is a set attribute, and use the verification result of the type attribute of the query element as the first matching feature; Determine whether the query element contains a prompt text displayed in a meaningful form element, and use the determination result in the query element as a second matching feature; Convert the text of the query element to lowercase, and split it according to spaces to obtain a word array, count the words containing the keyword in the word array, obtain the number of matched words, and divide the number of matched words by the total number of words in the word array to obtain the keyword matching degree as the third matching feature; Calculating the similarity between the path of the query element in the object model of the webpage content structure and the preset ideal search box path, and using the calculated similarity as the fourth matching feature; using the matching result of the attribute pattern of the query element and the custom search box pattern as the fifth matching feature; According to the first matching feature, the weight of the first matching feature, the second matching feature, the weight of the second matching feature, the third matching feature, the weight of the third matching feature, the fourth matching feature, the weight of the fourth matching feature, the fifth matching feature, and the weight of the fifth matching feature, the query element is automatically adapted to obtain a total score of the query element matching; The position of the search box corresponding to the highest score in the total score is obtained, and the obtained position is the position of the web page maintenance search box.

7. The maintenance data acquisition method according to claim 1, It is characterized in that Also includes: Clean the acquired maintenance data; The cleaning process includes removing useless formats, converting data types, and standardizing date formats; The cleaned data is stored in the database.

8. A maintenance data acquisition device, It is characterized in that The device comprises: A protocol connection module, used to connect to the browser endpoint of the currently visited device manufacturer's official website using a full-duplex communication protocol; after the connection is successful, the full-duplex communication protocol is used to directly interact with the bottom layer of the browser of the device manufacturer's official website; An official website judgment module, used to judge whether the equipment manufacturer's official website is a historical equipment manufacturer's official website based on the loaded historical equipment manufacturer configuration information; An automated rule engine module, for automatically controlling the browser of the equipment manufacturer's official website by using a corresponding automated rule engine to obtain maintenance data of the equipment manufacturer's official website when the equipment manufacturer's official website is a historical equipment manufacturer's official website; The adaptation algorithm module is used to analyze the attribute pattern and keywords of the equipment manufacturer's official website when the equipment manufacturer's official website is not the historical equipment manufacturer's official website, adapt to the location of the web page maintenance search box, and obtain the maintenance data of the equipment manufacturer's official website according to the location of the web page maintenance search box.

9. A maintenance data acquisition device, It is characterized in that The device comprises: Memory for storing computer programs; A processor, used to implement the steps of the maintenance data acquisition method as described in any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the maintenance data acquisition method according to any one of claims 1 to 7 are implemented.