CN117389769B - Browser-end rich text copying method and system based on cloud service and cloud platform - Google Patents

Browser-end rich text copying method and system based on cloud service and cloud platform Download PDF

Info

Publication number
CN117389769B
CN117389769B CN202311688954.1A CN202311688954A CN117389769B CN 117389769 B CN117389769 B CN 117389769B CN 202311688954 A CN202311688954 A CN 202311688954A CN 117389769 B CN117389769 B CN 117389769B
Authority
CN
China
Prior art keywords
file
cloud
multimedia file
rich text
content
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311688954.1A
Other languages
Chinese (zh)
Other versions
CN117389769A (en
Inventor
钟朝阳
杨誓永
王松
郑向东
顾昊
沈海俊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Zhongfang Information Technology Co ltd
Original Assignee
Hangzhou Zhongfang Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Zhongfang Information Technology Co ltd filed Critical Hangzhou Zhongfang Information Technology Co ltd
Priority to CN202311688954.1A priority Critical patent/CN117389769B/en
Publication of CN117389769A publication Critical patent/CN117389769A/en
Application granted granted Critical
Publication of CN117389769B publication Critical patent/CN117389769B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/543User-generated data transfer, e.g. clipboards, dynamic data exchange [DDE], object linking and embedding [OLE]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention provides a browser-end rich text copying method and system based on cloud service and a cloud platform, and belongs to the field of cloud computing. According to the method, the device and the system, the rich text content to be pasted is monitored locally, the text and the multimedia file are separated from the rich text content, the local multimedia file in the content to be pasted is converted into the network resource path on the cloud server based on the cloud service, meanwhile, uploading efficiency is improved through the pre-check deduplication and slice uploading technology in the process of uploading the multimedia file to the cloud server, and further, batch rich text content is pasted to a rich text editing area of a browser end to be displayed efficiently. In addition, the method combines cloud storage and cloud content detection services, performs content security inspection on the text, the picture, the video and other multimedia files to be pasted while pasting rich text content, greatly reduces manual auditing cost, improves content quality, and improves platform security and user experience.

Description

Browser-end rich text copying method and system based on cloud service and cloud platform
Technical Field
The invention belongs to the field of cloud computing and web application, and particularly relates to a browser-side rich text copying method and system based on cloud service and a cloud platform.
Background
Currently, there are a number of popular technical languages in the web industry, such as Vue and practice, that support rendering rich text, based on which rich teletext content can be presented in web pages.
In the aspect of rich text editing, a large amount of materials are sourced from carriers such as WORD, PPT and the like and need to be reported to a web application end. However, for the graphics and text information in the word, PPT and other carriers, a large number of multimedia files (such as pictures, videos and the like) are often contained, but the operations in the traditional rich text editor can only be carried out by single copy and paste, and cannot realize batch copy and paste of the multimedia files. This is due to the inability of the browser limiting system to directly read the local photo (or multimedia) file. But this process-by-process approach is quite inefficient if the number of multimedia files that are copied at once is large.
Therefore, a key technology capable of copying the graphic information in the carriers such as WORD, PPT and the like in batches is continuously provided, so that the graphic data can be efficiently transmitted to a rich text editing area of a web end and displayed.
Disclosure of Invention
The invention aims to solve the problem that multimedia files are difficult to upload in batches in a rich text editing page in the prior art, and provides a rich text copying method and system at a browser end based on cloud service and a cloud platform, so that efficient rich text of local text data is realized, and the efficiency of pasting and displaying rich text at the browser end is improved.
In order to achieve the above purpose of the present invention, the following specific technical scheme is adopted in the present invention:
in a first aspect, the present invention provides a cloud service-based browser-side rich text copying method, which includes:
s1, registering a monitoring event on a rich text editing page of a browser end, and acquiring paste content information from a system paste board when a user is monitored to execute paste operation in a rich text editor;
S2, analyzing the pasted content information, respectively extracting text content and all multimedia files from the pasted content information, respectively generating abstract information of each multimedia file, checking whether each multimedia file is uploaded through a request cloud server interface, directly acquiring a network resource address of the multimedia file on a cloud server if one multimedia file is uploaded, and calling certificates required by a cloud storage service to upload the multimedia file to the cloud server and then acquiring the network resource address of the multimedia file if the multimedia file is not uploaded;
S3, replacing the local file by using the network resource address of the multimedia file, and pasting the analyzed text content and the network resource address of each multimedia file into an HTML file and then into a rich text editing page.
As a preferable aspect of the first aspect, when the paste content information is parsed, matching whether a multimedia file in a picture form exists in the paste content information through a regular expression, if so, acquiring picture byte data through a local protocol file address of a picture, and then generating abstract information of the picture and sending the abstract information to a cloud server interface for verification; and after the network resource address of each picture on the cloud server is obtained, replacing the corresponding local protocol file address by using the network resource address in the HTML file.
As a preferred aspect of the first aspect, when the paste content information is parsed, determining whether an ole file exists, if so, extracting multimedia file byte data in a video form from the ole file, determining a position of each video in the original paste content information, and then generating summary information of the video and transmitting the summary information to a cloud server interface for verification; and after the network resource address of each video on the cloud server is obtained, the network resource address of each video is placed at the corresponding position of the video in the HTML file.
As a preferable aspect of the foregoing first aspect, when uploading the multimedia file to the cloud server, it is required to determine whether the size of the multimedia file exceeds a threshold, if so, it is required to segment the multimedia file, then check whether each segment of segment data has been uploaded, and if not, upload the corresponding segment sequence number and segment data to the server.
As a preferable aspect of the first aspect, the cloud server uses an object storage service to store a file, and supports elastic expansion capability.
As a preferred aspect of the foregoing first aspect, in the process of uploading the multimedia files to the server, the uploading return status of each multimedia file needs to be received in real time and transmitted to the browser through the websocket communication technology, and the browser section is visually displayed through the progress bar.
As a preferable aspect of the first aspect, the cloud server is provided with a first content detection model for text, before the HTML file is formed and pasted on the rich text editing page, text content parsed from the pasted content information needs to call the corresponding first content detection model on the cloud server to identify sensitive information, and if the sensitive information exists, prompt information needs to be returned to the local area and the generation of the HTML file is terminated.
As a preferable aspect of the foregoing first aspect, the cloud server is provided with a second content detection model for images and videos, and the images and video files parsed from the pasted content information need to call the corresponding second content detection model on the cloud server to identify sensitive information, and if there is sensitive information, prompt information needs to be returned locally and the generation of HTML files is terminated.
In a second aspect, the present invention provides a browser-side rich text copying system based on cloud services, which includes
The monitoring module is used for registering a monitoring event on a rich text editing page of the browser end, and acquiring pasting content information from a system pasting board when a user is monitored to execute pasting operation in a rich text editor;
The analysis uploading module is used for analyzing the paste content information, respectively extracting text content and all multimedia files from the paste content information, respectively generating abstract information of each multimedia file, checking whether each multimedia file is uploaded through a request cloud server interface, directly acquiring a network resource address of the multimedia file on a cloud server if one multimedia file is uploaded, and calling certificates required by a cloud storage service to upload the multimedia file to the cloud server and then acquiring the network resource address of the multimedia file if the multimedia file is not uploaded;
And the rich text file generation module is used for replacing the local file by utilizing the network resource address of the multimedia file, and pasting the analyzed text content and the network resource address of each multimedia file into the rich text editing page after forming an HTML file again.
In a second aspect, the present invention provides a cloud platform, where the cloud platform establishes a remote communication connection with a local client through a network, so as to serve as a cloud server to provide cloud services for the local client; the local client is installed on a local computer of a user, and establishes connection with the browser through websocket communication, and the local client is used for realizing the rich text copying method of the browser based on the cloud service according to any one of the first aspect.
Compared with the prior art, the invention has the following beneficial effects:
The invention provides a method capable of copying multimedia rich texts in batches, which is characterized in that the method is used for monitoring the rich text content to be pasted, separating texts and multimedia files from the rich text content, converting the local multimedia files in the content to be pasted into network resource paths on a cloud server based on cloud service, and improving uploading efficiency through pre-checking and de-duplication and slice uploading technologies in the process of uploading the multimedia files to the cloud server, so that the batch rich text content is pasted to a rich text editing area of a browser end for displaying.
In addition, the method combines cloud storage and cloud content detection services, performs content security inspection on the text, the picture, the video and other multimedia files to be pasted while pasting rich text content, greatly reduces manual auditing cost, improves content quality, and improves platform security and user experience.
Drawings
FIG. 1 is a flowchart of a browser-side rich text copying method based on cloud services in an embodiment of the invention;
FIG. 2 is a diagram of a browser-side rich text copying system module based on cloud services in an embodiment of the invention;
fig. 3 is a schematic diagram of network connection between a cloud platform and a plurality of local clients in an embodiment of the present invention.
Detailed Description
In order that the above objects, features and advantages of the invention will be readily understood, a more particular description of the invention will be rendered by reference to the appended drawings. In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention. The present invention may be embodied in many other forms than described herein and similarly modified by those skilled in the art without departing from the spirit of the invention, whereby the invention is not limited to the specific embodiments disclosed below. The technical features of the embodiments of the invention can be combined correspondingly on the premise of no mutual conflict.
In the description of the present invention, it will be understood that when an element is referred to as being "connected" to another element, it can be directly connected to the other element or be indirectly connected with intervening elements present. In contrast, when an element is referred to as being "directly connected" to another element, there are no intervening elements present.
In the description of the present invention, it should be understood that the terms "first" and "second" are used solely for the purpose of distinguishing between the descriptions and not necessarily for the purpose of indicating or implying a relative importance or implicitly indicating the number of features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature.
As shown in fig. 1, in the embodiment of the present invention, a rich text copying method at a browser end based on cloud service is provided, where the method can copy rich text contents containing a large number of multimedia files in carriers such as WORD and PPT at a local end, and paste the rich text contents into a rich text editing page of a web application at the browser end in batches, so as to solve the problem that the web application cannot read the local file and cannot copy the rich text contents in batches due to browser limitation. The specific implementation method of the cloud service-based browser-side rich text copying method is described in detail below in combination with the steps S1-S3.
S1, registering a monitoring event on a rich text editing page of a browser end, and acquiring paste content information from a system paste board when a user is monitored to execute paste operation in a rich text editor.
It should be noted that, the manner of obtaining the paste content information from the system paste board belongs to the prior art, and will not be described again. The copy source of the rich text content in the invention can be local WORD, PPT and other files, and can be theoretically web page content without limitation.
In addition, in order to facilitate the use of the common user, the browser end monitors the registration of the event, and the realization can be realized by installing a special client end on the local end by the user. Of course, the client may not necessarily only realize the single function of registering the monitoring event, and the functions of analyzing data, processing file byte stream, uploading the server, packaging the HTML file and the like in the subsequent steps may also be uniformly realized by the client. When a user opens an editing page of the rich text editor to edit contents, the client can establish a communication relationship with a locally established monitoring service by using a WebSocket immediately after the user opens the current editing page, and if the connection is successful, the installed client of the user is prompted to enter a monitoring state, and the monitoring event comprises message receiving, communication channel closing and communication failure.
S2, analyzing the paste content information obtained in the S1, respectively extracting text content and all multimedia files from the text content, respectively generating abstract information of each multimedia file, checking whether each multimedia file is uploaded through a request cloud server interface, directly acquiring a network resource address of the multimedia file on a cloud server if one multimedia file is uploaded, and calling certificates required by a cloud storage service to upload the multimedia file to the cloud server and then acquiring the network resource address of the multimedia file if the multimedia file is not uploaded.
It should be noted that, when the rich text content is copied from different carriers, the format of the paste content information may be different, so that the specific manner of parsing the paste content information needs to be adjusted according to the actual format of the paste content information. The pictures and the videos are the most common multimedia files, so in the embodiment of the invention, when the pasted content information is analyzed, analysis and verification rules of the pictures and the videos can be respectively set.
For pictures, they are typically created and recorded with a local protocol file address when copied. Therefore, in the embodiment of the invention, when the paste content information is analyzed, whether a multimedia file in a picture form (the format of the picture includes, but is not limited to png, tif, jpg and the like) exists or not can be matched through a regular expression, if the picture exists, the picture byte data is obtained through the local protocol file address of the picture existing in the paste content information, and then the abstract information of the picture is generated and sent to the cloud server interface for verification.
For example, when copying the rich text content of the picture contained in the local word file to the web application, the obtained paste content information in the paste event in the system paste board is generally in HTML format, the read HTML content can be transmitted to the local client through the websocket communication technology, the client analyzes the HTML text, including the HTML tag and url address, and the picture temporary path is identified through the regular expression so as to obtain the picture file, so that the picture file is conveniently sent to the cloud server.
For video, a compressed ole file is generally generated when the video is copied, and the ole file is decompressed to obtain a file named "[ 1] ole10 native", in which path information in the video byte file and byte data of the source video are recorded. Therefore, in the embodiment of the invention, when the paste content information in the system paste board is analyzed, whether the ole file exists can be judged, if so, the multimedia file byte data in the form of video is extracted from the ole file, meanwhile, the position of each video in the original paste content information is determined, and then the abstract information of the video is generated and sent to the cloud server interface for verification.
An important function of the cloud server in the invention is to store mass multimedia files in rich texts, and in a scene where a large number of users access, the cloud server can use object storage services (oss) to store files, thereby meeting the requirements of mass storage and security of uploading files by platform users and having elastic expansion capability.
In the invention, the fingerprint calculation is designed for the file byte stream and binding with the uploading record so as to improve the pasting performance and reduce the file repeated uploading space waste, thereby being capable of carrying out uploading uniqueness judgment by considering the repeatability and redundancy of a large number of multimedia files during storage. Specifically, summary information of each multimedia file needs to be generated in advance, and then whether each multimedia file is uploaded or not is checked by requesting a cloud server interface. In specific implementation, the summary information of each file can be obtained through a summary calculation function, and the summary information can be generated by using MD4, MD5, SHA1, SM3, and the like.
In addition, considering that large files such as pictures and videos are easy to fail in uploading due to unstable networks and the like, the picture byte streams of the large files can be uploaded in a piece by piece in the process of uploading the multimedia files to the cloud server, and the support of breakpoint continuous transmission can be considered. In the embodiment of the invention, when the multimedia file is uploaded to the cloud server, whether the size of the multimedia file exceeds a threshold value is needed to be judged, if so, the multimedia file is required to be fragmented, then whether each fragment of fragment data is uploaded is checked, and if not, the corresponding fragment sequence number and fragment data are uploaded to the server.
It should be noted that, if a multimedia file has not yet been uploaded to the cloud server, it needs to invoke credentials required by the cloud storage service to verify, and the verification may upload the multimedia file to the cloud server to generate its network resource address through the back. Similarly, when the abstract information of the multimedia file is sent to the cloud server interface for verification, if the cloud server requires verification, a data acquisition credential is required to be provided to ensure the safety of cloud data.
In addition, because the invention is a batch of rich text content copying method, if the number of multimedia files to be uploaded to the cloud server is large, the time required for uploading the checksum of the multimedia files can be longer. Therefore, in consideration of user experience, the uploading return state of each multimedia file can be received in real time in the process of uploading the multimedia files to the server, and is transmitted to the browser through the websocket communication technology, and visual display is carried out on the browser section through the progress bar, so that the user can see the whole uploading progress.
S3, replacing the local file by using the network resource address of the multimedia file, and pasting the analyzed text content and the network resource address of each multimedia file into an HTML file and then into a rich text editing page.
In the invention, the original copied local multimedia files are uploaded to the cloud server in the previous step, so that the network resource addresses of the multimedia files can be used for replacing the local multimedia files in the original system paste board, and the analyzed text content and the network resource addresses of the multimedia files are combined into the HTML file again, so that rich text can be directly displayed in the web application of the browser side. In the process, the local client can automatically process the processes of analysis, file acquisition, uploading, network address replacement and the like in the background, so that users do not need to process one by one, and the problem that web applications cannot read local files and further cannot copy rich text contents in batches due to browser limitation is solved.
For multimedia files such as most common pictures and videos, the manner in which the multimedia files are combined to form the HTML file needs to consider the respective positions of the multimedia files in the original file. For example, for the pictures, after the network resource address of each picture on the cloud server is acquired, the corresponding local protocol file address is replaced by the network resource address in the HTML file. For the video, after the network resource address of each video on the cloud server is acquired, the network resource address of each video is placed at a position corresponding to the video in the HTML file.
In addition, in other embodiments of the present invention, in the field of data content sensitivity, considering content security during uploading of rich text content, it is also necessary to perform content security check on text, picture, etc. that are pasted correspondingly while being pasted in combination with cloud storage and cloud content detection services. In an embodiment, a first content detection model for text may be set on the cloud server, before the HTML file is formed and pasted on the rich text editing page, the text content parsed from the pasted content information needs to be called for sensitive information identification by the corresponding first content detection model on the cloud server, and if there is sensitive information, prompt information needs to be returned locally and generation of the HTML file is terminated. The text, image, video and other multimedia files in the rich text content can be respectively subjected to content identification. In an embodiment, a second content detection model for images and videos may be set on the cloud server, and the images and video files parsed from the pasted content information need to call the corresponding second content detection model on the cloud server to identify sensitive information, and if the sensitive information exists, prompt information needs to be returned to the local area and the generation of the HTML file is terminated. When sensitive information exists, the sensitive information in the content can be marked in different forms so as to facilitate the user to locate the sensitive information to be modified. For the sensitive information of the text mode, different color labels can be used for marking, for the sensitive information of the image mode, a corresponding mask color label can be added to the picture, and for the sensitive information of the video mode, sensitive frames in the video can be extracted or marked. Through automatic content detection, the manual auditing cost can be greatly reduced in the batch copying process of rich texts, the content quality is improved, and the platform safety and the user experience are improved.
In order to facilitate understanding of the technical solution provided by the present invention, a preferred embodiment is taken as an example of copying rich text content containing a large number of pictures and videos from a local Word file, so as to describe in detail how to copy Word pictures and texts to corresponding web pages in a local batch without damage for display.
In the preferred embodiment of the present invention, the user first needs to install a client (including but not limited to a local client implemented by java, c++, python, etc.) in the personal computer, the client will monitor a port (e.g. 13332) in the local computer of the user after installation, when the user opens the rich text editor to edit the content, the client establishes a communication relationship with a locally established monitoring service by using WebSocket when the user opens the current editing page, and if the connection is successful, the installed client of the user is prompted to enter a monitoring state, and the monitoring event includes receiving a message, closing a communication channel, and failing to communicate. When the current page is initialized, a monitoring event is registered in the current rich text editing page, when a pasting event occurs on the page, content information of a system pasting board is obtained through a front-end code, text data (text/HTML format) of clipboardData in the pasting event is obtained, and when an obtained data tag is < w: wordDocument >, tag content, operation type (meaning that Word content needs to be pasted) and credential information (appKey, appSecret) needed by a remote cloud storage service are sent to a local client through a websocket. The local client receives the sent message, analyzes and acquires the credential information and the text information and the operation type in the sticky board to be processed, and when the operation type transmitted currently is a word text sticky event, the text information and the non-text multimedia information (picture and video) need to be respectively extracted and processed.
When extracting the picture, the local client can match all picture information in the text file through a regular table format (such as "< img \s [ ] src \s = \s [ '\" ] ([ +\ "]) [' ] ]", and acquire a file protocol file address (such as: file:// C: \Users \addmin\Pictures \640. Png), and then acquire corresponding picture file byte data based on IO capability of the local client.
Similarly, for video information in the rich text content copied from the Word file, ole file information with the type of text/rtf can be obtained from the paste content data of the system paste board, the ole file is decompressed to obtain a [1] ole10native file, the [1] ole10native file contains path information in the file and byte data of the original multimedia file, and therefore the original multimedia file can be obtained through extraction of the [1] ole10native file, and then the original multimedia file is transmitted to a cloud server through a local client to be replaced to obtain a network resource address of a cloud.
In addition, when the pictures and the video files are uploaded to the cloud server, the abstract information of each file can be obtained through an abstract calculation function. The summary information is generated by MD4, MD5, SHA1, SM3, etc. After obtaining all the abstract information of the multimedia files, processing the individual files in a circulating mode, wherein the steps are as follows: and using abstract information of the current file to request a server interface, checking whether the current file is uploaded, if so, using a network resource address returned by the cloud server, if not, judging the size of the current file, if so, slicing the file if the file is greater than a configured slicing uploading threshold value, checking whether byte data after current slicing is uploaded, if not, uploading the slicing, if not, uploading the corresponding slicing serial number and the slicing data to the server, and then using the network resource address returned by the cloud server. The remote file storage service provided by the cloud server may use cloud object storage service (oss) for file storage.
In addition, in the preferred embodiment, content inspection is also performed on text content and uploaded multimedia files.
The content security check for the paste text is as follows: the local client performs label interception processing on the acquired text, for example, the originally acquired text is "< p > < div > and gives dominance to the earnings of the public area owned by the owner according to the management regulations of the community, each person XXX needs to participate in the community management < div > </p >", if the 'XXX' is sensitive information, the acquired text can be processed into the 'according to the management regulations of the community and gives dominance to the earnings of the public area owned by the owner, each person XXX needs to participate in the community pipe', then the text after processing is subjected to sensitive information detection by calling a text content detection model API of the cloud server, different color types are adopted for the keywords in the text according to the returned detection result, for example, the 'XXX' is detected to belong to the sensitive information, and different color labels are used for prompting the 'XXX'. The display of "XXX" as using a red label causes the text to be converted into: < p > < div > according to the management regulations of communities, the income of public areas owned by owners is dominated, and each person < SPAN STYLE = "color: red; text-decoration: line-through" > XXX </span > needs to participate in community management </div > </p >.
In addition, after the picture or video file is obtained, the file can be safely detected through a content detection model API of the picture or video provided by the cloud server, a corresponding mask color label is added to the picture with the sensitive information according to the returned risk detection type, and the sensitive frame extraction and marking are carried out on the video with the sensitive information so as to remind a user whether the multimedia file is illegal or not.
In addition, in the preferred embodiment, in order to visualize the file uploading progress, the client synchronizes the processing progress of the file to the browser end based on websocket every time one file uploading is completed. In particular, when the browser monitors the processing of the message, and when the client sends the message with the progress type, the front end displays the uploading progress through the progress bar. After the current file is uploaded, the network resource address (such as https:// aliyun.files.wpsf042.Tmp. Png) returned by the remote server can be used to replace the original local file protocol address.
When all the files are processed, the client sends the HTML text information with the address replaced and the processed signals to the browser, and when the browser monitors the processed signals, the data transmitted by the client are analyzed, and then the processed HTML is pasted into the rich text editing page of the corresponding text application.
In addition, it should be noted that, the browser-side rich text copying method based on the cloud service in the above embodiment may be essentially executed by a computer program. Therefore, based on the same inventive concept, another preferred embodiment of the present invention further provides a cloud service-based browser-side rich text copying system corresponding to the cloud service-based browser-side rich text copying method provided in the foregoing embodiment, as shown in fig. 2, where the system includes:
The monitoring module is used for registering a monitoring event on a rich text editing page of the browser end, and acquiring pasting content information from a system pasting board when a user is monitored to execute pasting operation in a rich text editor;
The analysis uploading module is used for analyzing the paste content information, respectively extracting text content and all multimedia files from the paste content information, respectively generating abstract information of each multimedia file, checking whether each multimedia file is uploaded through a request cloud server interface, directly acquiring a network resource address of the multimedia file on a cloud server if one multimedia file is uploaded, and calling certificates required by a cloud storage service to upload the multimedia file to the cloud server and then acquiring the network resource address of the multimedia file if the multimedia file is not uploaded;
And the rich text file generation module is used for replacing the local file by utilizing the network resource address of the multimedia file, and pasting the analyzed text content and the network resource address of each multimedia file into the rich text editing page after forming an HTML file again.
In the browser-side rich text copying system based on the cloud service, specific functions in each functional module correspond to S1 to S3 in the foregoing embodiments, so specific implementation forms may also refer to the foregoing embodiments, and are not repeated herein.
Similarly, based on the same inventive concept, another preferred embodiment of the present invention further provides a computer electronic device corresponding to the browser-side rich text copying method based on cloud service provided in the foregoing embodiment, where the computer electronic device includes a memory and a processor;
the memory is used for storing a computer program;
The processor is configured to implement the browser-side rich text copying method based on the cloud service in the above embodiment when executing the computer program.
Further, the logic instructions in the memory described above may be implemented in the form of software functional units and stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention.
Therefore, based on the same inventive concept, another preferred embodiment of the present invention further provides a computer readable storage medium corresponding to the cloud service-based browser-side rich text copying method provided in the above embodiment, where the storage medium stores a computer program, and when the computer program is executed by a processor, the cloud service-based browser-side rich text copying method in the above embodiment can be implemented.
It is understood that the storage medium may include random access Memory (Random Access Memory, RAM) or may include Non-Volatile Memory (NVM), such as at least one disk Memory. Meanwhile, the storage medium may be various media capable of storing program codes, such as a USB flash disk, a mobile hard disk, a magnetic disk or an optical disk.
It is understood that the above-mentioned processors may be general-purpose processors including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but may also be a digital signal processor (DIGITAL SIGNAL Processing, DSP), application SPECIFIC INTEGRATED Circuit (ASIC), field-Programmable gate array (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic device, discrete gate or transistor logic device, discrete hardware components.
It should be further noted that, for convenience and brevity of description, specific working processes of the system described above may refer to corresponding processes in the foregoing method embodiments, which are not described herein again. In the embodiments of the present application, the division of steps or modules in the system and the method is only one logic function division, and other division manners may be implemented in actual implementation, for example, multiple modules or steps may be combined or may be integrated together, and one module or step may also be split.
In another embodiment of the present invention, a corresponding cloud platform may be provided for the local client in the above embodiment, where the cloud platform establishes a remote communication connection with the local client through a network, so as to serve as a cloud server to provide cloud services for the local client; the local client is installed on a local computer of the user, and establishes connection with the browser through websocket communication, and the local client is used for realizing the browser-side rich text copying method based on the cloud service described in the foregoing embodiment.
However, as shown in fig. 3, the relationship between the cloud platform and the local client is not one-to-one, but a one-to-many connection relationship may be established. The local computer mode of carrying local customer end can be various, and personal PC computer, notebook computer, server, mobile device all can be through wired or wireless network connection mode access this cloud platform, for the user carries out rich text batch copying.
The above embodiment is only a preferred embodiment of the present invention, but it is not intended to limit the present invention. Various changes and modifications may be made by one of ordinary skill in the pertinent art without departing from the spirit and scope of the present invention. Therefore, all the technical schemes obtained by adopting the equivalent substitution or equivalent transformation are within the protection scope of the invention.

Claims (10)

1. The browser-side rich text copying method based on the cloud service is characterized by being applied to a local client and comprising the following steps of:
s1, registering a monitoring event on a rich text editing page of a browser end, and acquiring paste content information from a system paste board when a user is monitored to execute paste operation in a rich text editor;
S2, analyzing the pasted content information, respectively extracting text content and all multimedia files from the pasted content information, respectively generating abstract information of each multimedia file, checking whether each multimedia file is uploaded through a request cloud server interface, directly acquiring a network resource address of the multimedia file on a cloud server if one multimedia file is uploaded, and calling certificates required by a cloud storage service to upload the multimedia file to the cloud server and then acquiring the network resource address of the multimedia file if the multimedia file is not uploaded;
S3, replacing the local file by using the network resource address of the multimedia file, and pasting the analyzed text content and the network resource address of each multimedia file into an HTML file and then into a rich text editing page.
2. The rich text copying method of a browser end based on cloud service as claimed in claim 1, wherein when resolving the paste content information, whether a multimedia file in a picture form exists in the paste content information is matched through a regular expression, if the picture exists, picture byte data is obtained through a local protocol file address of the picture, and then abstract information of the picture is generated and sent to a cloud server interface for verification; and after the network resource address of each picture on the cloud server is obtained, replacing the corresponding local protocol file address by using the network resource address in the HTML file.
3. The rich text copying method of browser based on cloud service as claimed in claim 1, wherein when resolving the paste content information, judging whether an ole file exists, if so, extracting multimedia file byte data in the form of video from the ole file, simultaneously determining the position of each video in the original paste content information, then generating abstract information of the video, and transmitting the abstract information to a cloud server interface for verification; and after the network resource address of each video on the cloud server is obtained, the network resource address of each video is placed at the corresponding position of the video in the HTML file.
4. The rich text copying method of a browser based on cloud service as claimed in claim 1, wherein when uploading the multimedia file to the cloud server, it is required to determine whether the size of the multimedia file exceeds a threshold, if yes, it is required to segment the multimedia file, then check whether each segment of segment data has been uploaded, and if not, then upload the corresponding segment serial number and segment data to the server.
5. The browser-side rich text copying method based on cloud service according to claim 1, wherein the cloud server adopts an object storage service to store files and supports elastic expansion capability.
6. The rich text copying method of a browser based on cloud service as claimed in claim 1, wherein in the process of uploading the multimedia files to the server, the uploading return state of each multimedia file is required to be received in real time and transmitted to the browser through websocket communication technology, and visual display is performed on the browser through a progress bar.
7. The rich text copying method of a browser end based on cloud service according to claim 1, wherein a first content detection model for text is arranged on the cloud server, before an HTML file is formed and pasted on a rich text editing page, text content analyzed from the pasted content information needs to call the corresponding first content detection model on the cloud server to identify sensitive information, and if the sensitive information exists, prompt information needs to be returned locally and generation of the HTML file is terminated.
8. The cloud service-based browser-side rich text copying method according to claim 1, wherein a second content detection model for images and videos is arranged on the cloud server, the images and the video files analyzed from the pasted content information are required to be called for sensitive information identification by the corresponding second content detection model on the cloud server, and prompt information is required to be returned to the local area and generation of the HTML file is required to be terminated if the sensitive information exists.
9. A local client based on cloud services, comprising
The monitoring module is used for registering a monitoring event on a rich text editing page of the browser end, and acquiring pasting content information from a system pasting board when a user is monitored to execute pasting operation in a rich text editor;
The analysis uploading module is used for analyzing the paste content information, respectively extracting text content and all multimedia files from the paste content information, respectively generating abstract information of each multimedia file, checking whether each multimedia file is uploaded through a request cloud server interface, directly acquiring a network resource address of the multimedia file on a cloud server if one multimedia file is uploaded, and calling certificates required by a cloud storage service to upload the multimedia file to the cloud server and then acquiring the network resource address of the multimedia file if the multimedia file is not uploaded;
And the rich text file generation module is used for replacing the local file by utilizing the network resource address of the multimedia file, and pasting the analyzed text content and the network resource address of each multimedia file into the rich text editing page after forming an HTML file again.
10. The cloud platform is characterized in that the cloud platform establishes remote communication connection with a local client through a network, so that cloud service is provided for the local client as a cloud server; the local client is installed on a local computer of a user, and is connected with the browser through websocket communication, and the local client is used for realizing the rich text copying method of the browser based on the cloud service according to any one of claims 1-8.
CN202311688954.1A 2023-12-11 2023-12-11 Browser-end rich text copying method and system based on cloud service and cloud platform Active CN117389769B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311688954.1A CN117389769B (en) 2023-12-11 2023-12-11 Browser-end rich text copying method and system based on cloud service and cloud platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311688954.1A CN117389769B (en) 2023-12-11 2023-12-11 Browser-end rich text copying method and system based on cloud service and cloud platform

Publications (2)

Publication Number Publication Date
CN117389769A CN117389769A (en) 2024-01-12
CN117389769B true CN117389769B (en) 2024-04-30

Family

ID=89468694

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311688954.1A Active CN117389769B (en) 2023-12-11 2023-12-11 Browser-end rich text copying method and system based on cloud service and cloud platform

Country Status (1)

Country Link
CN (1) CN117389769B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104317779A (en) * 2014-09-27 2015-01-28 昆明钢铁集团有限责任公司 Browser-based Word formula copying and uploading control and method
CN106095743A (en) * 2016-06-21 2016-11-09 武汉斗鱼网络科技有限公司 A kind of RichText Edition method and device
WO2018008861A1 (en) * 2016-07-07 2018-01-11 라온위즈기술 주식회사 Html control system and method using user server
CN111625313A (en) * 2020-05-20 2020-09-04 北京达佳互联信息技术有限公司 Resource processing progress display method and device, electronic equipment and storage medium
CN111832274A (en) * 2019-04-15 2020-10-27 北京智启蓝墨信息技术有限公司 Rich media editing method, rich media generating method, rich media editing device, rich media generating device and rich media generating system in intelligent teaching materials
CN112541476A (en) * 2020-12-24 2021-03-23 西安交通大学 Malicious webpage identification method based on semantic feature extraction
CN113761074A (en) * 2020-06-16 2021-12-07 北京沃东天骏信息技术有限公司 Rich text information storage method, device and system
CN114049319A (en) * 2021-11-04 2022-02-15 广州华多网络科技有限公司 Text security type detection method and device, equipment, medium and product thereof
CN114138717A (en) * 2021-12-02 2022-03-04 中国建设银行股份有限公司 Rich text information publishing method and related device
CN115048905A (en) * 2022-07-12 2022-09-13 电子科大科园股份有限公司 File processing method, device and equipment of rich text editor and storage medium
CN115718792A (en) * 2022-10-18 2023-02-28 国网山东省电力公司信息通信公司 Sensitive information extraction method based on natural semantic processing and deep learning

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104317779A (en) * 2014-09-27 2015-01-28 昆明钢铁集团有限责任公司 Browser-based Word formula copying and uploading control and method
CN106095743A (en) * 2016-06-21 2016-11-09 武汉斗鱼网络科技有限公司 A kind of RichText Edition method and device
WO2018008861A1 (en) * 2016-07-07 2018-01-11 라온위즈기술 주식회사 Html control system and method using user server
CN111832274A (en) * 2019-04-15 2020-10-27 北京智启蓝墨信息技术有限公司 Rich media editing method, rich media generating method, rich media editing device, rich media generating device and rich media generating system in intelligent teaching materials
CN111625313A (en) * 2020-05-20 2020-09-04 北京达佳互联信息技术有限公司 Resource processing progress display method and device, electronic equipment and storage medium
CN113761074A (en) * 2020-06-16 2021-12-07 北京沃东天骏信息技术有限公司 Rich text information storage method, device and system
CN112541476A (en) * 2020-12-24 2021-03-23 西安交通大学 Malicious webpage identification method based on semantic feature extraction
CN114049319A (en) * 2021-11-04 2022-02-15 广州华多网络科技有限公司 Text security type detection method and device, equipment, medium and product thereof
CN114138717A (en) * 2021-12-02 2022-03-04 中国建设银行股份有限公司 Rich text information publishing method and related device
CN115048905A (en) * 2022-07-12 2022-09-13 电子科大科园股份有限公司 File processing method, device and equipment of rich text editor and storage medium
CN115718792A (en) * 2022-10-18 2023-02-28 国网山东省电力公司信息通信公司 Sensitive information extraction method based on natural semantic processing and deep learning

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
A microservices architecture for collaborative document editing enhanced with face recognition;Cristian Gadea等;《IEEE》;20160709;全文 *
网页富文本技术在南方智媒云平台的实践;范玉平等;《南方传媒研究》;20230430(第4期);全文 *
面向3G的手机富浏览器的设计与实现;莫晓斌;付威;尹辉;;移动通信;20110615(第11期);全文 *

Also Published As

Publication number Publication date
CN117389769A (en) 2024-01-12

Similar Documents

Publication Publication Date Title
US10803274B2 (en) Computer configured to display multimedia content
CN107665233B (en) Database data processing method and device, computer equipment and storage medium
CN112468520B (en) Data detection method, device and equipment and readable storage medium
CN101582083A (en) Web-based detection in image, extraction and recognition
US20120072969A1 (en) Determining a sensitivity label of document information in real time
US11800201B2 (en) Method and apparatus for outputting information
CN112311654A (en) Instant messaging message processing method, device, medium and electronic equipment
WO2014194827A1 (en) Method and device for mobile terminal to process visualization graphics code
CN110753050A (en) Method and device for generating protocol document, computer storage medium and electronic equipment
CN112286815A (en) Interface test script generation method and related equipment thereof
CN111277569B (en) Network message decoding method and device and electronic equipment
CN111737528A (en) Data acquisition and verification method and device, electronic equipment and storage medium
CN115795417B (en) Method and device for tracing OOXML document, electronic equipment and storage medium
CN117389769B (en) Browser-end rich text copying method and system based on cloud service and cloud platform
CN115858320A (en) Operation log recording method, apparatus, medium and product
CN113778709B (en) Interface calling method, device, server and storage medium
CN114257443A (en) Special inter-intranet signature system, method and equipment for court
CN114357524A (en) Electronic document processing method and device
CN112580762B (en) Dynamic two-dimensional code and identification method and identification device thereof
CN113852835A (en) Live broadcast audio processing method and device, electronic equipment and storage medium
CN112433752A (en) Page parsing method, device, medium and electronic equipment
CN112752165A (en) Subtitle processing method, subtitle processing device, server and computer-readable storage medium
CN108920589A (en) Browsing kidnaps recognition methods, device, server and storage medium
CN111385136B (en) Method and device for determining user communication identifier
CN113703780B (en) Decompilation detection and webpage resource data sending method, device, equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant