Method and system for connecting intelligent micro terminal based on Chrome kernel
Through the intelligent micro-terminal uses the Chrome kernel API interface to monitor web page content and obtain data in real time, and combines WebSocket to realize real-time communication with the server, solving the efficiency and computing power limitations of intelligent micro-terminal technology when combined with the Chrome kernel, and achieving efficient and intelligent data acquisition and communication.
Patent Information
- Application Number
- CN202411939510.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-05-27
AI Technical Summary
When combined with the Chrome kernel, smart micro-terminal technology has insufficient intelligence in web page detection and data acquisition, as well as limitations on communication efficiency and computing capabilities between the micro-terminal and the backend server.
Through the intelligent micro-terminal, the Chrome DevTools API interface is determined based on the Chrome kernel, the web page content is monitored in real time, the web page data is obtained, and the server is established through the WebSocket, useful information is sent to the server, multiple computing tasks are performed, and the results are sent back to the intelligent micro-terminal.
It realizes efficient and intelligent web page detection and data acquisition, improves communication efficiency and computing power between the micro-terminal and the backend server, and improves the overall performance and response speed of the system.
Smart Images

Figure CN120045248A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of transmission synchronization, and more particularly, to a method and system for connecting an intelligent micro-terminal based on the Chrome kernel. Background Art
[0002] As a widely used browser kernel, the Chrome kernel provides rich API interfaces and functions, offering powerful tools for developers. However, in the prior art, there are still many limitations and challenges when the intelligent micro-terminal technology is combined with the Chrome kernel, such as insufficient intelligence in web page detection and data acquisition, as well as limitations in the communication efficiency and computing power between the micro-terminal and the background server. Summary of the Invention
[0003] According to the present invention, there is provided a method and system for connecting an intelligent micro-terminal based on the Chrome kernel to solve the technical problems that in the prior art, there are still many limitations and challenges when the intelligent micro-terminal technology is combined with the Chrome kernel, such as insufficient intelligence in web page detection and data acquisition, as well as limitations in the communication efficiency and computing power between the micro-terminal and the background server.
[0004] According to a first aspect of the present invention, there is provided a method for connecting an intelligent micro-terminal based on the Chrome kernel, including:
[0005] The intelligent micro-terminal calls websocket and initializes the interface;
[0006] The intelligent micro-terminal determines the Chrome DevTools API interface based on the Chrome kernel, monitors the web page content in real time, obtains web page data, processes and analyzes the web page data, and extracts useful information;
[0007] The intelligent micro-terminal establishes a connection with the server through websocket, sends the useful information to the server, and the server creates an object and initializes the useful information;
[0008] The server performs a plurality of computing tasks based on the useful information and sends the execution results to the intelligent micro-terminal.
[0009] Optionally, the intelligent micro-terminal determines the Chrome DevTools API interface based on the Chrome kernel, monitors the web page content in real time, and obtains web page data, including:
[0010] The intelligent micro-terminal determines the Chrome DevTools API interface based on the Chrome kernel and monitors changes in the Document Object Model (DOM) structure and interception of network requests in real time.
[0011] Optionally, the intelligent micro-terminal processes and analyzes the web page data to extract useful information, including:
[0012] The intelligent micro-terminal processes and analyzes the web page data to extract useful information and binds multiple trigger events, including the event triggered after the onopen connection is established, the event triggered after the onmessage message is received, the event triggered when an error occurs, and the event triggered when the onclose connection is closed.
[0013] Optionally, the intelligent micro-terminal establishes a connection with the server through websocket and sends the useful information to the server, including:
[0014] After the intelligent micro-terminal establishes a connection with the server through websocket, the onopen event triggered after the connection is established is triggered, the useful message is sent to the websocket, and the websocket sends the useful information to the server.
[0015] Optionally, based on the useful information, the server executes multiple computing tasks and sends the execution results to the intelligent micro-terminal, including:
[0016] After the server receives the useful information sent by the intelligent micro-terminal, based on the useful information, the ontextmessage event is triggered and multiple computing tasks are executed;
[0017] The execution results are sent to the intelligent micro-terminal, and the onmessage event triggered after the message is received is triggered after the intelligent micro-terminal receives the execution results.
[0018] According to another aspect of the present invention, a system for connecting an intelligent micro-terminal based on a Chrome kernel is further provided, including:
[0019] An initialization interface module for calling websocket and initializing the interface;
[0020] A web page content monitoring module for determining the Chrome DevTools API interface based on the Chrome kernel, real-time monitoring of the web page content, obtaining web page data, processing and analyzing the web page data, and extracting useful information;
[0021] A server connection module for establishing a connection with the server through websocket, sending the useful information to the server, and the server creating an object and initializing the useful information;
[0022] An execution computing task module for executing multiple computing tasks based on the useful information and sending the execution results to the intelligent micro-terminal.
[0023] Optionally, the web page content monitoring module includes:
[0024] The web content monitoring sub-module is used to determine the Chrome DevTools API interface based on the Chrome kernel and monitor the changes in the Document Object Model (DOM) structure and the interception of network requests in real time.
[0025] Optionally, the web content monitoring module includes:
[0026] The bound trigger event sub-module is used to process and analyze the web data, extract useful information, and bind multiple events, including the event triggered after the connection is established by onopen, the event triggered after a message is received by onmessage, the event triggered when an error occurs by onerror, and the event triggered when the connection is closed by onclose.
[0027] Optionally, the server connection module includes:
[0028] The server connection sub-module is used to trigger the event triggered after the connection is established by onopen after establishing a connection with the server through websocket, send the useful message to the websocket, and the websocket sends the useful information to the server.
[0029] Optionally, the computing task execution module includes:
[0030] The computing task execution sub-module triggers the ontextmessage event based on the useful information and executes multiple computing tasks;
[0031] The execution result sending sub-module is used to send the execution result to the intelligent micro-terminal, and the intelligent micro-terminal triggers the event triggered after a message is received by onmessage after receiving the execution result.
[0032] Thus, by utilizing the open functions of the Chrome kernel, a set of efficient and intelligent API interfaces are designed and implemented for real-time monitoring of web content changes and obtaining the required data. By building a WebSocket long connection channel between the intelligent micro-terminal and the background server, real-time data transmission and synchronization are achieved. At the same time, using distributed computing technology, complex computing tasks are assigned to multiple background servers for processing to improve the overall performance and response speed of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] By referring to the following drawings, the exemplary embodiments of the present invention can be more fully understood:
[0034] Figure 1 It is a schematic flowchart of a method for connecting an intelligent micro-terminal based on the Chrome kernel according to this embodiment;
[0035] Figure 2 It is a communication flow chart of the client and the server using websocket in this embodiment;
[0036] Figure 3 It is a schematic diagram of a system for connecting an intelligent micro-client based on the Chrome kernel in this embodiment. Specific embodiments
[0037] Now, exemplary embodiments of the present invention will be described with reference to the accompanying drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. These embodiments are provided to disclose the present invention in detail and completely, and to fully convey the scope of the present invention to those skilled in the art. The terms in the exemplary embodiments shown in the drawings are not limitations on the present invention. In the drawings, the same units / components are denoted by the same reference numerals.
[0038] Unless otherwise specified, the terms (including scientific and technical terms) used herein have the ordinary meaning understood by those skilled in the art. Additionally, it can be understood that terms defined in a commonly used dictionary should be construed as having a meaning consistent with the context of their relevant fields, and should not be construed as having an idealized or overly formal meaning.
[0039] According to the first aspect of the present invention, a method 100 for connecting an intelligent micro-client based on the Chrome kernel is provided. Referring to Figure 1 as shown, the method 100 includes:
[0040] S101: The intelligent micro-client calls websocket and initializes the interface;
[0041] S102: The intelligent micro-client determines the Chrome DevTools API interface based on the Chrome kernel, monitors the web page content in real time, obtains the web page data, processes and analyzes the web page data, and extracts useful information;
[0042] S103: The intelligent micro-client establishes a connection with the server through websocket, sends the useful information to the server, and the server creates an object and initializes the useful information;
[0043] S104: The server performs multiple computing tasks based on the useful information and sends the execution results to the intelligent micro-client.
[0044] Specifically, in this embodiment, by leveraging the open functions of the Chrome kernel, a set of efficient and intelligent API interfaces are designed and implemented to monitor the changes in web page content in real time and obtain the required data. The Chrome DevTools API is used to achieve real-time monitoring of web page content, including changes in the Document Object Model (DOM) structure, interception of network requests, etc. The Chrome extension API is used to interact with the web page, such as executing custom JavaScript code, obtaining specific data in the web page, etc. The obtained web page data is processed and analyzed to extract useful information. The processed data is saved to a remote server. At the same time, effective security measures are taken to prevent malicious code injection and data leakage. An error handling and exception capture mechanism is introduced to ensure the stability and reliability of the program.
[0045] In this embodiment, a WebSocket long connection channel is constructed between the intelligent micro-client and the background server. As shown in Figure 2 , real-time data transmission and synchronization are achieved. At the same time, distributed computing technology is used to allocate complex computing tasks to multiple background servers for processing to improve the overall performance and response speed of the system. Using the WebSocket protocol, a long connection channel is established between the intelligent micro-client and the background server to achieve real-time data transmission and synchronization, ensuring the integrity and security of the data. A heartbeat detection mechanism is introduced to monitor the status of the long connection channel in real time to ensure the stability and reliability of the connection. The complex computing tasks are split into multiple subtasks and allocated to multiple background servers for processing. According to factors such as the computing power and load of the background servers, the task allocation strategy is dynamically adjusted to improve the overall performance and response speed of the system. A fault tolerance mechanism is introduced to ensure that when a single background server fails, the task can be automatically reassigned to other available servers for processing. A data synchronization mechanism between the intelligent micro-client and the background server is adopted to ensure data consistency and integrity. An efficient redis data caching and updating strategy is adopted to reduce the network transmission overhead and improve data real-time performance.
[0046] This embodiment utilizes the rich API interfaces provided by the Chrome kernel, such as the Chrome DevTools API, the Chrome extension API, etc., to achieve real-time detection and data acquisition of web pages. It listens for user operations on the built-in browser, including keyboard input, mouse clicks, page scrolling, etc., to achieve dynamic monitoring of web pages. It introduces automated data scraping and recognition technologies, such as OCR (Optical Character Recognition), NLP (Natural Language Processing), etc., to improve the intelligent level of data acquisition. Based on the WebSocket protocol, the intelligent micro-terminal establishes a long connection channel to implement distributed computing and communication technologies between the micro-terminal and the background server, ensuring real-time communication and data transmission between the micro-terminal and the background server. Using distributed computing technology, complex computing tasks are assigned to multiple background servers for processing, improving computing efficiency and response speed. It introduces load balancing and fault tolerance mechanisms to ensure the stable operation of the system under high concurrency and large data volume.
[0047] Thus, it improves the efficiency and accuracy of web page detection and data acquisition, and provides
[0048] more convenient and efficient API interfaces for developers. It reduces the learning cost and usage difficulty of developers for the open functions of the Chrome kernel and improves development efficiency. The provided API interfaces have broad application prospects and can be used in fields such as web crawlers, data monitoring, automated testing, etc. It realizes real-time and efficient communication between the intelligent micro-terminal and the background server, improving the overall performance and response speed of the system. Using distributed computing technology, complex computing tasks are assigned to multiple background servers for processing, improving the computing power and resource utilization rate of the system. It introduces fault tolerance mechanisms and data synchronization and consistency technologies to ensure the stability and reliability of the system.
[0049] Optionally, the intelligent micro-terminal determines the Chrome DevTools API interface based on the Chrome kernel, and real-time monitors the web page content and obtains web page data, including:
[0050] The intelligent micro-terminal determines the Chrome DevTools API interface based on the Chrome kernel, and real-time monitors the changes in the Document Object Model (DOM) structure and intercepts network requests.
[0051] Optionally, the intelligent micro-terminal processes and analyzes the web page data to extract useful information, including:
[0052] The intelligent micro-terminal processes and analyzes the web page data to extract useful information, and binds multiple trigger events, including the onopen trigger event after establishing a connection, the onmessage trigger event after receiving a message, the onerror trigger event when an error occurs, and the onclose trigger event when the connection is closed.
[0053] Optionally, the intelligent micro - terminal establishes a connection with the server through websocket and sends the useful information to the server, including:
[0054] After the intelligent micro - terminal establishes a connection with the server through websocket, it triggers the onopen event after establishing the connection and sends the useful message to websocket, and websocket sends the useful information to the server.
[0055] Optionally, based on the useful information, the server executes multiple computing tasks and sends the execution results to the intelligent micro - terminal, including:
[0056] After the server receives the useful information sent by the intelligent micro - terminal, based on the useful information, it triggers the ontextmessage event and executes multiple computing tasks;
[0057] It sends the execution results to the intelligent micro - terminal, and the intelligent micro - terminal triggers the onmessage event after receiving the execution results.
[0058] Thus, by utilizing the open functions of the Chrome kernel, a set of efficient and intelligent API interfaces are designed and implemented for real - time monitoring of web page content changes and obtaining the required data. By constructing a WebSocket long - link channel between the intelligent micro - terminal and the background server, real - time data transmission and synchronization are achieved. At the same time, using distributed computing technology, complex computing tasks are assigned to multiple background servers for processing to improve the overall performance and response speed of the system.
[0059] According to another aspect of the present invention, a system 300 for connecting an intelligent micro - terminal based on the Chrome kernel is also provided. Referring to Figure 3 as shown, the system 300 includes:
[0060] An initialization interface module 310 for calling websocket and initializing the interface;
[0061] A web page content monitoring module 320 for determining the Chrome DevTools API interface based on the Chrome kernel, real - time monitoring of web page content, obtaining web page data, processing and analyzing the web page data, and extracting useful information;
[0062] A server connection module 330 for establishing a connection with the server through websocket, sending the useful information to the server, and the server creates an object and initializes the useful information;
[0063] An execution computing task module 340 for executing multiple computing tasks based on the useful information and sending the execution results to the intelligent micro - terminal.
[0064] Optionally, the web content monitoring module 320 includes:
[0065] A web content monitoring sub-module for determining the Chrome DevTools API interface based on the Chrome kernel, and real-time monitoring of changes in the Document Object Model (DOM) structure and interception of network requests.
[0066] Optionally, the web content monitoring module 320 includes:
[0067] A bound trigger event sub-module for processing and analyzing the web data, extracting useful information, and binding multiple events, including the onopen event triggered after establishing a connection, the onmessage event triggered after receiving a message, the onerror event triggered when an error occurs, and the onclose event triggered when the connection is closed.
[0068] Optionally, the server connection module 330 includes:
[0069] A server connection sub-module for triggering the onopen event after establishing a connection with the server through websocket, sending the useful message to the websocket, and the websocket sending the useful information to the server.
[0070] Optionally, the computing task execution module 340 includes:
[0071] A computing task execution sub-module for triggering the ontextmessage event based on the useful information and executing multiple computing tasks;
[0072] A result sending sub-module for sending the execution result to the intelligent micro-terminal, and the intelligent micro-terminal triggering the onmessage event after receiving the execution result.
[0073] An embodiment of the system 300 for connecting an intelligent micro-terminal based on the Chrome kernel in the present invention corresponds to a method 100 for connecting an intelligent micro-terminal based on the Chrome kernel in another embodiment of the present invention, which will not be elaborated here.
[0074] Those skilled in the art should understand that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, 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 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 disk memory, CD-ROM, optical memory, etc.) that contain computer-usable program code. The solutions in the embodiments of the present application can be implemented using various computer languages. For example, object-oriented programming languages such as Java and interpreted scripting languages such as JavaScript, etc.
[0075] The present application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, as well as the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0076] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including instruction means, and the instruction means implement the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0077] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0078] Although the preferred embodiments of the present application have been described, those skilled in the art can make additional changes and modifications once they learn the basic creative concepts. Therefore, the appended claims are intended to be construed to include the preferred embodiments as well as all changes and modifications that fall within the scope of the present application.
[0079] Obviously, those skilled in the art can make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalent technologies, this application is also intended to include these changes and modifications.
Claims
1. A method for connecting an intelligent micro-terminal based on a Chrome kernel, characterized in that: include: The smart micro client calls the websocket and initializes the interface; The intelligent micro-client determines the Chrome DevTools API interface based on the Chrome kernel, monitors web page content in real time, obtains web page data, processes and analyzes the web page data, and extracts useful information; The intelligent micro-end establishes a connection with the server through websocket, sends the useful information to the server, and the server creates an object and initializes the useful information; The server performs multiple computing tasks based on the useful information and sends the execution results to the intelligent micro-terminal.
2. The method according to claim 1, characterized in that The smart micro-client determines the ChromeDevTools API interface based on the Chrome kernel, monitors web page content in real time, and obtains web page data, including: The intelligent micro-client determines the Chrome DevTools API interface based on the Chrome kernel, and monitors the changes in the document object model DOM structure and intercepts network requests in real time.
3. The method according to claim 2, characterized in that The intelligent micro-terminal processes and analyzes the web page data to extract useful information, including: The intelligent micro-terminal processes and analyzes the web page data, extracts useful information, and binds multiple trigger events, including onopen, which is triggered after a connection is established, onmessage, which is triggered after a message is received, onerror, which is triggered when an error occurs, and onclose, which is triggered when a connection is closed.
4. The method according to claim 1, characterized in that: The smart micro-client establishes a connection with the server through websocket and sends the useful information to the server, including: After the smart micro-terminal establishes a connection with the server through websocket, the onopen event is triggered, and the useful message is sent to the websocket, and the websocket sends the useful information to the server.
5. The method according to claim 3, characterized in that: The server performs multiple computing tasks based on the useful information and sends the execution results to the smart micro-terminal, including: After receiving the useful information sent by the smart micro-client, the server triggers the ontextmessage event based on the useful information and executes multiple computing tasks; The execution result is sent to the smart micro terminal. After receiving the execution result, the smart micro terminal triggers the onmessage event after receiving the message.
6. A system based on Chrome kernel connected to intelligent micro-terminal, characterized in that: include: Initialization interface module, used to call websocket and initialize the interface; A web page content monitoring module is used to determine the Chrome DevTools API interface based on the Chrome kernel, monitor web page content in real time, obtain web page data, process and analyze the web page data, and extract useful information; The server connection module is used to establish a connection with the server through websocket, send the useful information to the server, and the server creates an object to initialize the useful information; The computing task execution module is used to execute multiple computing tasks based on the useful information and send the execution results to the intelligent micro-terminal.
7. The system according to claim 6, characterized in that Monitoring web content modules, including: The webpage content monitoring submodule is used to intelligently determine the Chrome DevTools API interface based on the Chrome kernel, and monitor the changes in the document object model DOM structure and the interception of network requests in real time.
8. The system according to claim 7, characterized in that Monitoring web content modules, including: The binding trigger event submodule is used to process and analyze the web page data, extract useful information, and bind multiple events, including onopen triggering an event after establishing a connection, onmessage triggering an event after receiving a message, onerror triggering an event when an error occurs, and onclose triggering an event when closing a connection.
9. The system according to claim 6, characterized in that Connect to the server module, including: The connection service terminal module is used to trigger the onopen trigger event after establishing a connection with the server through websocket, send the useful message to the websocket, and the websocket sends the useful information to the server.
10. The system according to claim 6, characterized in that Modules for executing computing tasks include: The computing task submodule executes the computing task, triggers the ontextmessage event based on the useful information, and executes multiple computing tasks; The execution result sending submodule is used to send the execution result to the smart micro terminal. After the smart micro terminal receives the execution result, the onmessage event is triggered after receiving the message.