Memory instruction set data acquisition method and system based on clipboard

By adopting a clipboard-based memory instruction set data acquisition method, the problems of lengthy clipboard operations and low efficiency in copying multiple message types are solved, realizing efficient and convenient copying and parsing of multiple message types, which is suitable for a variety of application scenarios.

CN121743077APending Publication Date: 2026-03-27珠海金智维人工智能股份有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511951149.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-23
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

In existing technologies, the use of clipboard and data parsing methods have problems such as lengthy operation processes, support for only a single type of message per copy, and inability to recognize structured messages such as linked cards and mini-programs, resulting in low efficiency and content distortion when copying and transmitting multiple types of messages.

Method used

The copy command is triggered by scrolling the mouse wheel. It monitors and captures multiple types of target messages in real time, adds format identifiers, stores them in the clipboard as a binary stream, and generates a memory instruction set to directly parse the physical storage address of the clipboard. It combines the Type field and Offset and Len to locate the target message, calls the parsing algorithm corresponding to the type, and supports pasting or local saving of the output.

Benefits of technology

It enables one-stop copying of multiple message types, improves operational convenience by more than 60%, reduces parsing latency by 50%, and achieves parsing integrity of 99.9%. It supports cross-platform and cross-application compatibility and is suitable for instant messaging, office, browser and other applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121743077A_ABST
    Figure CN121743077A_ABST
Patent Text Reader

Abstract

The invention discloses a memory instruction set data acquisition method and system based on a clipboard, and the method comprises the steps: a user captures multiple types of target messages after rolling a mouse roller to trigger a copying instruction, adds format identifiers to the multiple types of target messages, and stores the format identifiers to the clipboard in a binary stream form; generating a memory instruction set through the physical storage address of the clipboard and the format identifier and the message length of the target message, and storing the memory instruction set to a memory address; after a memory instruction set is positioned and read through a memory address, binary stream data is extracted from the clipboard, a target message type is identified through a Type field in the binary stream data, and a target message binary data segment is positioned according to Offset and Len in the memory instruction set; and calling an analysis algorithm corresponding to the target message type to analyze the binary data segment to obtain a target message, and outputting the target message. According to the method, multiple types of messages are directly extracted through the memory, so that the operation efficiency and the analysis integrity are greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of multi-type message copying and transmission, and in particular to a method and system for acquiring memory instruction set data based on clipboard. Background Technology

[0002] With the rapid development of instant messaging, collaborative office work, and mobile internet technologies, users frequently need to copy and transmit various types of messages (text, images, videos, files, linked cards, mini-programs, etc.) in their daily operations. For example, copying work messages containing text descriptions, product images, and mini-program links in WeChat Work; copying video clips and associated files from web pages in a browser; and integrating cross-platform, multi-format data in office software. In these scenarios, users need to efficiently and conveniently obtain the original content of various message types, while ensuring that the format is not lost and the integrity is guaranteed during data transmission.

[0003] Currently, data acquisition relies heavily on the system clipboard as a data transfer medium. The clipboard, as an operating system-level temporary storage area, supports data sharing between different applications. However, existing technologies have significant limitations in clipboard usage and data parsing methods: the operation process is lengthy, resulting in a poor user experience, especially in one-handed operation or rapid data acquisition scenarios; a single copy can only support a single type of message, and copying combined messages such as text, images, and files requires multiple operations, leading to extremely low efficiency; for structured messages such as link cards and mini-programs, existing APIs cannot recognize their data format, resulting in the inability to copy or distorted content after parsing (e.g., only the link text can be obtained, but the complete information such as the card's icon and description cannot be retrieved). Summary of the Invention

[0004] The purpose of this invention is to overcome the shortcomings and deficiencies of the prior art and provide a method for acquiring memory instruction set data based on clipboard.

[0005] Another objective of this invention is to provide a clipboard-based memory instruction set data acquisition system.

[0006] Another object of the present invention is to provide a server.

[0007] Another object of the present invention is to provide a computer-readable storage medium.

[0008] The objective of this invention is achieved through the following technical solution:

[0009] A method for acquiring memory instruction set data based on clipboard includes the following steps:

[0010] S1. The user triggers the copy command by scrolling the mouse wheel. After the copy command is triggered, multiple types of target messages are captured, and format identifiers are added to the multiple types of target messages to obtain the target messages with format identifiers.

[0011] S2. Store the target message with format identifier in binary stream form to the clipboard. Generate a memory instruction set using the physical storage address of the clipboard, the format identifier of the target message, and the message length. Store the memory instruction set in the specified memory address.

[0012] S3. Locate and read the memory instruction set through the memory address. Extract binary stream data from the clipboard according to the physical storage address of the clipboard in the memory instruction set. Identify the target message type through the Type field in the binary stream data. Locate the binary data segment of the target message according to the Offset and Len in the memory instruction set. Call the parsing algorithm corresponding to the target message type to parse the binary data segment and obtain the target message.

[0013] S4. Output the target message. When outputting the target message, the user can choose to paste the output or save the output locally.

[0014] Step S1 involves real-time monitoring of mouse operation signals. When a user selects a target message area and scrolls the mouse wheel in a preset direction more than a preset number of times, a copy command is triggered. If the user does not select a specific area, the copy command is triggered by scrolling the mouse wheel while pressing an auxiliary button. After the copy command is triggered, multiple types of target messages are monitored and captured in real time. These target messages include text, images, videos, files, link cards, and mini-programs. A unique format identifier is added to each type of target message captured to obtain target messages with format identifiers.

[0015] Step S2 involves storing all target messages with format identifiers as a binary stream to the clipboard, resulting in binary stream data. This binary stream data is composed of the format identifiers and binary data segments of the target messages, specifically in the following format:

[0016] Binary stream data = [Type_1, Value_1, Type_2, Value_2, ..., Type_n, Value_n];

[0017] Where Type is the format identifier of the target message, and Value is the binary data segment of the target message;

[0018] Based on the clipboard's physical storage address, the format identifier of each target message, and the message length of the target message, a corresponding memory instruction set is generated and stored in the specified memory address. The format of the memory instruction set is as follows:

[0019] Memory instruction set = [Addr_S, Addr_E, Type_1, Len_1, Offset_1, Type_2, Len_2, Offset_2, ..., Type_n, Len_n, Offset_n];

[0020] Where Offset is the offset of a single target message in the clipboard binary stream data, Addr_S is the starting address of the clipboard, Addr_E is the ending address of the clipboard, Type is the format identifier of the target message, and Len is the message length of the target message;

[0021] Step S3 involves locating and reading the stored memory instruction set via memory address; extracting binary stream data from the clipboard based on Addr_S and Addr_E in the memory instruction set; identifying each target message type through the Type field in the binary stream data; locating the binary data segment of a single target message based on Offset and Len: reading the Offset and Len parameters from the memory instruction set, moving the read pointer of the binary stream data to the Offset position, skipping the Type field, locating the starting position of the binary data segment of a single target message, reading Len bytes of binary data from the starting position of the single target message to obtain the binary data segment of the single target message; and calling the parsing algorithm corresponding to the target message type to parse the binary data segment to obtain the target message.

[0022] Step S4 involves the user choosing to paste the target message or save it locally. Pasting allows the user to paste the target message content directly in any application using the right mouse button or a keyboard shortcut. Saving the target message locally provides the user with a save option to store large target message content such as files and videos in a specified local folder and generates a file path index.

[0023] Another objective of this invention is achieved through the following technical solution:

[0024] A clipboard-based memory instruction set data acquisition system includes a trigger module, a message capture module, a storage and instruction generation module, a parsing module, and an output module.

[0025] The trigger module allows the user to initiate the copy command by scrolling the mouse wheel.

[0026] Message capture module: After receiving the copy command, it monitors and captures multiple types of target messages in real time through the system kernel layer interface, adds format identifiers to the multiple types of target messages, and obtains target messages with format identifiers;

[0027] Storage and instruction generation module: Stores the target message with format identifier in binary stream form to the clipboard, generates a memory instruction set based on the physical storage address of the clipboard and the format identifier and message length of the target message with format identifier, and stores the memory instruction set in the specified memory address;

[0028] The parsing module locates the target message by memory address, reads the stored memory instruction set, extracts binary stream data from the clipboard based on the physical storage address of the clipboard in the memory instruction set, identifies the target message type by combining the Type field in the binary stream data, locates the binary data segment of the target message based on the Offset and Len in the memory instruction set, and calls the parsing algorithm corresponding to the target message type to parse the binary data segment to obtain the target message.

[0029] Output module: Outputs the target message. Users can choose to paste the output or save the output locally.

[0030] Another objective of this invention is achieved through the following technical solution:

[0031] A server includes a processor and a memory, the memory storing at least one program that is loaded and executed by the processor to implement the above-described clipboard-based memory instruction set data acquisition method.

[0032] Another objective of this invention is achieved through the following technical solution:

[0033] A computer-readable storage medium storing at least one program, which is loaded and executed by a processor to implement the above-described clipboard-based memory instruction set data acquisition method.

[0034] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0035] 1. This invention creatively designs a clipboard memory instruction set, which skips application layer API calls by directly parsing the memory instruction set; existing technologies do not set a clipboard memory instruction set, but instead call application layer APIs to achieve copying; the technical solution of this invention reduces data parsing latency by more than 50%; the memory instruction set is directly associated with the clipboard physical address, the data positioning is accurate, and the parsing integrity reaches 99.9%.

[0036] 2. This invention significantly improves ease of operation. It can be triggered by mouse scrolling without the need to memorize shortcut keys or perform multiple steps, simplifying the operation process and improving operation efficiency by more than 60%.

[0037] 3. This invention supports one-stop copying of multiple message types, including text, images, videos, files, linked cards, and mini-programs, which can be copied simultaneously without multiple operations. It is especially suitable for scenarios involving the integration of multi-format data.

[0038] 4. This invention achieves complete copying of structured messages such as link cards and mini-programs by combining low-level interface capture, format identification, and targeted parsing algorithms, thus solving the pain point of incompatibility with existing technologies.

[0039] 5. This invention has strong cross-platform and cross-application versatility. It is developed based on the underlying interface of the operating system and is compatible with mainstream systems such as Windows, macOS, and Linux. It can be integrated into various applications such as instant messaging, office, and browsers, and has a wide range of applications. Attached Figure Description

[0040] Figure 1 This is a flowchart illustrating the process of the clipboard-based memory instruction set data acquisition method described in this invention.

[0041] Figure 2 This is a schematic diagram of the structure of the clipboard-based memory instruction set data acquisition system described in this invention. Detailed Implementation

[0042] The present invention will be further described in detail below with reference to the embodiments and accompanying drawings, but the embodiments of the present invention are not limited thereto.

[0043] like Figure 1 As shown, a method for obtaining memory instruction set data based on the clipboard includes the following steps:

[0044] S1. The user triggers the copy command by scrolling the mouse wheel. After the copy command is triggered, multiple types of target messages are captured, and format identifiers are added to the multiple types of target messages to obtain the target messages with format identifiers.

[0045] S2. Store the target message with format identifier in binary stream form to the clipboard. Generate a memory instruction set using the physical storage address of the clipboard, the format identifier of the target message, and the message length. Store the memory instruction set in the specified memory address.

[0046] S3. Locate and read the memory instruction set through the memory address. Extract binary stream data from the clipboard according to the physical storage address of the clipboard in the memory instruction set. Identify the target message type through the Type field in the binary stream data. Locate the binary data segment of the target message according to the Offset and Len in the memory instruction set. Call the parsing algorithm corresponding to the target message type to parse the binary data segment and obtain the target message.

[0047] S4. Output the target message. When outputting the target message, the user can choose to paste the output or save the output locally.

[0048] The system monitors mouse operation signals in real time. When a user selects a target message area and scrolls the mouse wheel in a preset direction (e.g., upward) at least once, a copy command is triggered. Alternatively, if no specific area is selected, the user can scroll the mouse wheel while pressing an auxiliary key (e.g., the Ctrl key) to trigger the copy command, thus avoiding accidental triggering. After triggering the copy command, the system monitors and captures multiple types of target messages in real time through operating system kernel layer interfaces (e.g., Kernel32.dll for Windows, IOKit framework for macOS). These target message types include text (TXT, RTF format), images (PNG, JPG, GIF format), videos (MP4, AVI format), files (any file extension), link cards (structured data including URL, icon, and descriptive text), and mini-programs (structured data including AppID, page path, and parameters). A unique format identifier (e.g., text: 0x01, image: 0x02, mini-program: 0x06) is added to each type of target message captured, resulting in target messages with format identifiers for distinguishing data types during subsequent parsing.

[0049] All target messages with format identifiers are stored uniformly in binary stream form to the system clipboard to ensure that the data format is not lost;

[0050] Simultaneously, based on the clipboard's physical storage address, the format identifier of each message, and the message length, a corresponding memory instruction set is generated, in the following format:

[0051] Memory instruction set = [Addr_S, Addr_E, Type_1, Len_1, Offset_1, Type_2, Len_2, Offset_2, ..., Type_n, Len_n, Offset_n];

[0052] Where Offset is the offset of a single target message in the clipboard binary stream, Addr_S is the starting address of the clipboard, Addr_E is the ending address of the clipboard, Type is the format identifier of the target message, and Len is the message length of the target message;

[0053] Store the memory instruction set to a specified area of ​​system memory (such as the 0x7F00-0x7FFF address range).

[0054] The system locates the memory instruction set stored in system memory by memory address; extracts complete binary stream data from the clipboard based on Addr_S and Addr_E in the memory instruction set; identifies message types by combining the Type field; and locates the binary data segment of a single message based on Offset and Len; calls the parsing algorithm corresponding to the message type (e.g., text: UTF-8 decoding, image: binary stream to image format, mini-program: JSON parsing) to extract the original message content and obtain the target message. Videos, cards, and mini-programs are fixed types. Videos are file types, and during parsing, the actual file path address in the computer directory is obtained. After parsing cards and mini-programs, text descriptions such as (card title, card description, card cover image; mini-program name, mini-program description, mini-program cover image) will appear. For example, the parsed cover image is actually an official OSS address.

[0055] For the target message, users can choose to paste or save the output locally. Paste output allows users to paste directly into any application by right-clicking or using a keyboard shortcut, and directly use the message content. Save output provides users with the option to save large messages such as files and videos to a specified local folder and generate a file path index.

[0056] like Figure 2 As shown, a clipboard-based memory instruction set data acquisition system includes a trigger module, a message capture module, a storage and instruction generation module, a parsing module, and an output module.

[0057] The trigger module allows the user to initiate the copy command by scrolling the mouse wheel.

[0058] Message capture module: After receiving the copy command, it monitors and captures multiple types of target messages in real time, adds format identifiers to the multiple types of target messages, and obtains target messages with format identifiers;

[0059] Storage and instruction generation module: Stores the target message with format identifier in binary stream form to the clipboard, generates a memory instruction set based on the physical storage address of the clipboard and the format identifier and message length of the target message with format identifier, and stores the memory instruction set in the specified memory address;

[0060] The parsing module locates the target message by memory address, reads the stored memory instruction set, extracts binary stream data from the clipboard based on the physical storage address of the clipboard in the memory instruction set, identifies the target message type in the binary stream data by combining the Type field, locates the binary data segment of the target message based on Offset and Len, and calls the parsing algorithm corresponding to the target message type to parse the binary data segment to obtain the target message.

[0061] Output module: Outputs the target message. Users can choose to paste the output or save the output locally.

[0062] In this invention, the triggering module consists of a mouse operation recognition unit and an instruction generation unit. It is responsible for communicating with the input device (mouse) at the underlying level. It interfaces with the device driver through a hook function to capture the original signals of mouse scrolling events in real time (such as the direction of scroll wheel rotation, number of rotations, and auxiliary button status), and converts the signals into system-recognizable instructions (copy instructions), providing hardware-level support for the triggering mechanism.

[0063] The message capture module is developed based on the operating system kernel-mode interface (such as Kernel32.dll for Windows and IOKit framework for macOS), providing message capture services and directly bypassing application layer APIs to achieve uninterrupted access to target message data;

[0064] The storage and instruction generation module includes a clipboard storage unit and a memory instruction set generation unit. Its core function is to realize unified storage of message data and generate a memory instruction set containing address, type, and length information.

[0065] The parsing module has a built-in library of multiple message parsing algorithms. Its core function is to locate data through the memory instruction set and call the corresponding algorithm to parse the original content.

[0066] The storage and instruction generation module and the parsing module are the core of the architecture. They are responsible for the generation, storage and parsing of memory instruction sets. By establishing a mapping relationship of "clipboard physical address - message attribute - parsing rule", they build a lightweight memory instruction set to ensure the accuracy of data location and the efficiency of parsing.

[0067] The output module includes a paste interface unit and a local storage unit, providing standardized output interfaces and format conversion services to adapt to the data source requirements of different applications and support various usage scenarios such as paste output, local storage, and cross-application transmission.

[0068] By statistically analyzing the execution time difference between the replication process using the application layer API and the replication process of this invention, it was found that compared with the traditional method, the operation efficiency of this invention is improved by more than 60%, the parsing latency is reduced by more than 50%, and the parsing integrity reaches 99.9%; the traditional API call to parsing takes about 1 second, while direct memory retrieval takes about 300ms.

[0069] Traditional Windows clipboards provide APIs, such as interfaces for retrieving and setting clipboard content. These interfaces require HTTP calls to be implemented. This invention reduces the HTTP call process by directly reading the clipboard's physical address associated with the memory instruction set.

[0070] This invention enables direct kernel-mode interaction and memory instruction set mapping. By shortening the data transmission path from "application-application layer API-operating system kernel-clipboard" to "application-kernel service-clipboard", it reduces intermediate call steps and significantly lowers data transmission latency and format loss. At the same time, it achieves unified identification and accurate positioning of multiple message types through memory instruction set, solving the problem of multi-format data compatibility and parsing in traditional solutions.

[0071] Meanwhile, this invention provides:

[0072] A server includes a processor and a memory, the memory storing at least one program that is loaded and executed by the processor to implement the above-described clipboard-based memory instruction set data acquisition method.

[0073] A computer-readable storage medium storing at least one program, which is loaded and executed by a processor to implement the above-described clipboard-based memory instruction set data acquisition method.

[0074] The above embodiments are preferred embodiments of the present invention, but the embodiments of the present invention are not limited to the above embodiments. Any changes, modifications, substitutions, combinations, or simplifications made without departing from the spirit and principle of the present invention shall be considered equivalent substitutions and shall be included within the protection scope of the present invention.

Claims

1. A method for acquiring memory instruction set data based on clipboard, characterized in that, Includes the following steps: S1. The user triggers the copy command by scrolling the mouse wheel. After the copy command is triggered, multiple types of target messages are captured, and format identifiers are added to the multiple types of target messages to obtain the target messages with format identifiers. S2. Store the target message with format identifier in binary stream form to the clipboard. Generate a memory instruction set using the physical storage address of the clipboard, the format identifier of the target message, and the message length. Store the memory instruction set in the specified memory address. S3. Locate and read the memory instruction set by memory address, extract binary stream data from the clipboard according to the physical storage address of the clipboard in the memory instruction set, identify the target message type by the Type field in the binary stream data, and locate the binary data segment of the target message according to the Offset and Len in the memory instruction set. The binary data segment is parsed using the parsing algorithm corresponding to the target message type to obtain the target message; S4. Output the target message. When outputting the target message, the user can choose to paste the output or save the output locally.

2. The method for acquiring memory instruction set data based on clipboard according to claim 1, characterized in that, Step S1 involves real-time monitoring of mouse operation signals. When a user selects a target message area and scrolls the mouse wheel in a preset direction more than a preset number of times, a copy command is triggered. If the user does not select a specific area, the copy command is triggered by scrolling the mouse wheel while pressing an auxiliary button. After the copy command is triggered, multiple types of target messages are monitored and captured in real time. These target messages include text, images, videos, files, link cards, and mini-programs. A unique format identifier is added to each type of target message captured to obtain target messages with format identifiers.

3. The method for acquiring memory instruction set data based on clipboard according to claim 1, characterized in that, Step S2 involves storing all target messages with format identifiers as a binary stream to the clipboard, resulting in binary stream data. This binary stream data is composed of the format identifiers and binary data segments of the target messages, specifically in the following format: Binary stream data = [Type_1, Value_1, Type_2, Value_2, ..., Type_n, Value_n]; Where Type is the format identifier of the target message, and Value is the binary data segment of the target message; Based on the clipboard's physical storage address, the format identifier of each target message, and the message length of the target message, a corresponding memory instruction set is generated and stored in the specified memory address. The format of the memory instruction set is as follows: Memory instruction set = [Addr_S, Addr_E, Type_1, Len_1, Offset_1, Type_2, Len_2, Offset_2, ..., Type_n, Len_n, Offset_n]; Where Offset is the offset of a single target message in the clipboard binary stream data, Addr_S is the starting address of the clipboard, Addr_E is the ending address of the clipboard, Type is the format identifier of the target message, and Len is the message length of the target message.

4. The clipboard-based memory instruction set data acquisition method according to claim 1, characterized in that, Step S3 involves locating and reading the stored memory instruction set via memory address; extracting binary stream data from the clipboard based on Addr_S and Addr_E in the memory instruction set; identifying each target message type through the Type field in the binary stream data; locating the binary data segment of a single target message based on Offset and Len: reading the Offset and Len parameters in the memory instruction set, moving the read pointer of the binary stream data to the Offset position, skipping the Type field, locating the starting position of the binary data segment of a single target message, and reading the Len bytes of binary data from the starting position of the single target message to obtain the binary data segment of the single target message. The binary data segment is parsed using the parsing algorithm corresponding to the target message type to obtain the target message.

5. The method for acquiring memory instruction set data based on clipboard according to claim 1, characterized in that, Step S4 involves the user choosing to paste the target message or save it locally. Pasting allows the user to paste the target message content directly in any application using the right mouse button or a keyboard shortcut. Saving the target message locally provides the user with a save option to store large target message content such as files and videos in a specified local folder and generates a file path index.

6. A clipboard-based memory instruction set data acquisition system, characterized in that, It includes a trigger module, a message capture module, a storage and instruction generation module, a parsing module, and an output module; The trigger module allows the user to initiate the copy command by scrolling the mouse wheel. Message capture module: After receiving the copy command, it monitors and captures multiple types of target messages in real time through the system kernel layer interface, adds format identifiers to the multiple types of target messages, and obtains target messages with format identifiers; Storage and instruction generation module: Stores the target message with format identifier in binary stream form to the clipboard, generates a memory instruction set based on the physical storage address of the clipboard and the format identifier and message length of the target message with format identifier, and stores the memory instruction set in the specified memory address; The parsing module locates the target message by memory address, reads the stored memory instruction set, extracts binary stream data from the clipboard based on the physical storage address of the clipboard in the memory instruction set, identifies the target message type by combining the Type field in the binary stream data, locates the binary data segment of the target message based on the Offset and Len in the memory instruction set, and calls the parsing algorithm corresponding to the target message type to parse the binary data segment to obtain the target message. Output module: Outputs the target message. Users can choose to paste the output or save the output locally.

7. A server, characterized in that, The server includes a processor and a memory, the memory storing at least one program, which is loaded and executed by the processor to implement the clipboard-based memory instruction set data acquisition method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, The storage medium stores at least one program, which is loaded and executed by a processor to implement the clipboard-based memory instruction set data acquisition method according to any one of claims 1 to 5.