CN113743055A - Text information processing method and device, electronic equipment, server and storage medium - Google Patents
Text information processing method and device, electronic equipment, server and storage medium Download PDFInfo
- Publication number
- CN113743055A CN113743055A CN202010479751.1A CN202010479751A CN113743055A CN 113743055 A CN113743055 A CN 113743055A CN 202010479751 A CN202010479751 A CN 202010479751A CN 113743055 A CN113743055 A CN 113743055A
- Authority
- CN
- China
- Prior art keywords
- text
- text information
- processed
- format
- information
- 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.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/12—Use of codes for handling textual entities
- G06F40/14—Tree-structured documents
- G06F40/143—Markup, e.g. Standard Generalized Markup Language [SGML] or Document Type Definition [DTD]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0487—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
- G06F3/0488—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Human Computer Interaction (AREA)
- Document Processing Apparatus (AREA)
Abstract
The invention provides a text processing method, which comprises the following steps: acquiring selection operation of contents in a terminal display interface, and determining text information to be processed stored in a clipboard process in response to the selection operation; receiving a text information format selection instruction, and sending the text information format selection instruction to a corresponding instant messaging client server; receiving a text processing instruction sent by an instant messaging client server; and responding to the text processing instruction, and processing the text information to be processed stored in the clipboard process according to the corresponding text information format. The invention also provides a processing device, an electronic device, a server and a storage medium. The invention can process the text information to be processed stored in the clipboard process, meets different requirements on text information formats in different use scenes, reduces the time for a user to edit the text information, and improves the efficiency of processing the text information.
Description
Technical Field
The present invention relates to information processing technologies, and in particular, to a text information processing method and apparatus, an electronic device, a server, and a storage medium.
Background
At present, with the continuous popularization and development of terminals, users increasingly rely on terminals, and various applications can be installed on the terminals, wherein an instant messaging client (IM instant messaging) is widely used in the communication and document sharing processes, and the users can complete real-time communication with friends through the instant messaging application, for example, real-time receiving and sending of instant messaging messages in a chat scene with the friends, or document sharing through a micro-document process. However, in this process, although the instant messaging software provides relevant components for copy and paste, the copied content cannot select whether a format of HyperText markup Language (HTML HyperText Mark-up Language) needs to be reserved, and text content which does not need HTML format cannot be used and needs to be edited again; meanwhile, the copied text information content cannot enable a user to select whether the format is reserved, so that the use experience of the user is not favorably improved, and the complexity of user operation is increased.
Disclosure of Invention
In view of this, an embodiment of the present invention provides a text information processing method, an apparatus, an electronic device, a server, and a storage medium, and a technical solution of the embodiment of the present invention is implemented as follows:
the embodiment of the invention provides a text information processing method, which comprises the following steps:
acquiring a selection operation of contents in a terminal display interface, wherein the selection operation is used for selecting corresponding text information in the display interface through a key or a touch instruction;
in response to the selection operation, determining to-be-processed text information stored in a clipboard process;
receiving a text information format selection instruction, and sending the text information format selection instruction to a corresponding instant messaging client server;
receiving a text processing instruction sent by an instant messaging client server;
and responding to the text processing instruction, and processing the text information to be processed stored in the clipboard process according to the corresponding text information format.
The embodiment of the invention also provides a text information processing method, which comprises the following steps:
monitoring the selection operation of the content in the display interface of the interface terminal through the instant messaging client server, and acquiring the text information to be processed stored in the process of the clipboard;
receiving a text information format selection instruction sent by a terminal, and determining a text format matched with text information to be processed according to the text information format selection instruction;
and triggering different processing processes based on the text format matched with the text information to be processed, forming a text processing instruction matched with the text format of the text information, and sending the text processing instruction to the terminal so as to process the text information to be processed stored in the clipboard process.
The embodiment of the invention also provides a text information processing device, which is characterized in that the method comprises the following steps:
the terminal comprises a first information transmission module, a second information transmission module and a display module, wherein the first information transmission module is used for acquiring selection operation of contents in a terminal display interface, and the selection operation is used for selecting corresponding text information in the display interface through a key or a touch instruction;
the first information processing module is used for responding to the selection operation and determining the text information to be processed stored in the clipboard process;
the first information processing module is used for receiving a text information format selection instruction and sending the text information format selection instruction to a corresponding instant messaging client server;
the first information transmission module is used for receiving a text processing instruction sent by the instant messaging client server;
and the first information processing module is used for responding to the text processing instruction and processing the text information to be processed stored in the clipboard process according to the corresponding text information format.
In the above-mentioned scheme, the first step of the method,
the first information processing module is used for determining the identification of a target client in the data migration component process;
and the first information processing module is used for processing the text information to be processed stored in the clipboard process based on the identification of the target client so as to realize pasting or cutting of the text information to be processed.
The embodiment of the invention also provides a text information processing device, and the method comprises the following steps:
the second information transmission module is used for monitoring the selection operation of the content in the display interface of the interface terminal through the instant messaging client server and acquiring the text information to be processed stored in the clipboard process;
the second information processing module is used for receiving a text information format selection instruction sent by the terminal and determining a text format matched with the text information to be processed according to the text information format selection instruction;
the second information processing module is used for triggering different processing processes based on the text format matched with the text information to be processed, forming a text processing instruction matched with the text format of the text information, and sending the text processing instruction to the terminal so as to process the text information to be processed stored in the clipboard process.
In the above-mentioned scheme, the first step of the method,
the second information processing module is used for determining the position information of a cursor in the terminal display interface and paragraph format information in the terminal display interface when the text format matched with the text information to be processed is a plain text format;
and the second information processing module is used for forming a first text processing instruction matched with the plain text format of the text information based on the position information of the cursor and the paragraph format information.
In the above-mentioned scheme, the first step of the method,
the second information processing module is used for determining a data structure corresponding to the hypertext markup language format when the text format matched with the text information to be processed is the hypertext markup language format;
the second information processing module is used for determining style information in a hypertext markup language format and a corresponding document object model object structure in the text information to be processed through a text processing process in the instant messaging client;
and the second information processing module is used for determining a text processing instruction matched with the hypertext markup language format through a data structure corresponding to the hypertext markup language format based on the style information in the hypertext markup language format in the text information to be processed and the corresponding document object model object structure.
In the above-mentioned scheme, the first step of the method,
the second information processing module is used for determining the position information of a cursor in the terminal display interface and paragraph format information in the terminal display interface;
the second information processing module is used for determining instruction information which can be identified by a text processing process in the instant messaging client based on the position information of the cursor and the paragraph format information;
and the second information processing module is used for fusing instruction information which can be identified by a text processing process in the instant messaging client based on a data structure corresponding to the hypertext markup language format to form a second text processing instruction matched with the hypertext markup language format.
In the above-mentioned scheme, the first step of the method,
the second information processing module is used for detecting the operation history of different users by the instant messaging client server so as to record text processing instructions generated when the different users operate the text to be processed;
the second information processing module is used for updating the document corresponding to the text information to be processed based on the recorded text processing instruction;
and the second information processing module is used for adjusting the displayed document contents through the recorded text processing instructions generated when different users operate the text to be processed when the document corresponding to the text information to be processed is awakened by a new target user, so as to realize the consistency of the document contents acquired by different users.
In the above-mentioned scheme, the first step of the method,
the second information processing module is used for sending the user identification, the text processing instruction, the text information to be processed and the document corresponding to the text information to be processed to the block chain network so as to ensure that the document is sent to the block chain network
And the node of the block chain network fills the user identification, the text processing instruction, the text information to be processed and the document corresponding to the text information to be processed into a new block, and when the new block is identified consistently, the new block is added to the tail of the block chain.
In the above-mentioned scheme, the first step of the method,
the second information processing module is configured to receive data synchronization requests of other nodes in the blockchain network;
the second information processing module is used for responding to the data synchronization request and verifying the authority of the other nodes;
and the second information processing module is used for controlling the current node and the other nodes to carry out data synchronization when the authority of the other nodes passes the verification so as to realize that the other nodes acquire the user identification, the text processing instruction, the text information to be processed and the document corresponding to the text information to be processed.
In the above-mentioned scheme, the first step of the method,
the second information processing module is used for responding to a query request and analyzing the query request to obtain a corresponding object identifier;
the second information processing module is used for acquiring authority information in a target block in the block chain network according to the object identifier;
the second information processing module is used for checking the matching of the authority information and the object identifier;
the second information processing module is used for acquiring corresponding text information to be processed and a document corresponding to the text information to be processed in the block chain network when the authority information is matched with the object identifier;
and the second information processing module is used for responding to the query instruction, pushing the acquired text information to be processed and the document corresponding to the text information to be processed to the corresponding client, so that the client can acquire the corresponding text information to be processed and the document corresponding to the text information to be processed, which are stored in the blockchain network.
An embodiment of the present invention further provides an electronic device, where the electronic device includes:
a memory for storing executable instructions;
and the processor is used for realizing the text information processing method when the executable instructions stored in the memory are executed.
An embodiment of the present invention further provides a server, where the server includes:
a memory for storing executable instructions;
and the processor is used for realizing the text information processing method of the preamble when the executable instruction stored in the memory is operated.
The embodiment of the invention also provides a computer-readable storage medium, which stores executable instructions, and the executable instructions are executed by a processor to realize the text information processing method of the preamble.
The embodiment of the invention has the following beneficial effects:
the embodiment of the invention monitors the selection operation of the content in the display interface of the interface terminal through the instant messaging client server and acquires the text information to be processed stored in the process of the clipboard; receiving a text information format selection instruction sent by a terminal, and determining a text format matched with text information to be processed according to the text information format selection instruction; different processing processes are triggered based on the text format matched with the text information to be processed, a text processing instruction matched with the text format of the text information is formed and sent to the terminal, and therefore the text information to be processed stored in the clipboard process can be processed, different requirements for the text information formats in different use scenes are met, time for editing the text information by a user is shortened, and efficiency for processing the text information is improved.
Drawings
Fig. 1 is a schematic diagram of a usage environment of a text information processing method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a structure of a text message processing apparatus according to an embodiment of the present invention;
fig. 3 is a schematic flow chart of an alternative text information processing method according to an embodiment of the present invention;
fig. 4 is a schematic diagram of an optional display effect of the text information processing method according to the embodiment of the present invention;
FIG. 5 is a schematic diagram of a structure of a text information processing apparatus according to an embodiment of the present invention;
fig. 6 is a schematic flow chart of an alternative text information processing method according to an embodiment of the present invention
Fig. 7 is an alternative flow chart of a text message processing method according to an embodiment of the present invention;
fig. 8 is an alternative flow chart of a text message processing method according to an embodiment of the present invention;
fig. 9 is a schematic data structure diagram of a text information processing method according to an embodiment of the present invention;
fig. 10 is a schematic data structure diagram of a text information processing method according to an embodiment of the present invention;
fig. 11 is a schematic diagram of an optional display effect of the text information processing method according to the embodiment of the present invention;
fig. 12 is a schematic diagram of an optional display effect of the text information processing method according to the embodiment of the present invention;
fig. 13 is a schematic diagram of an optional display effect of the text information processing method according to the embodiment of the present invention;
FIG. 14 is a block diagram of an exemplary embodiment of a text message processing apparatus 100;
fig. 15 is a schematic structural diagram of a block chain in the block chain network 200 according to an embodiment of the present invention;
fig. 16 is a functional architecture diagram of a blockchain network 200 according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail with reference to the accompanying drawings, the described embodiments should not be construed as limiting the present invention, and all other embodiments obtained by a person of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict.
Before further detailed description of the embodiments of the present invention, terms and expressions mentioned in the embodiments of the present invention are explained, and the terms and expressions mentioned in the embodiments of the present invention are applied to the following explanations.
1) And the DataTransfer object is used for storing data and dragging the data to the browser through drag and drop actions when data reading and writing operations are carried out. It may hold one or more items of data, one or more data types. This object can be obtained from the dataTransfer attribute of all drag events drags events, but cannot be created separately.
2) Terminals, including but not limited to: the system comprises a common terminal and a special terminal, wherein the common terminal is in long connection and/or short connection with a sending channel, and the special terminal is in long connection with the sending channel.
3) The client, a carrier in the terminal for implementing a specific function, for example, a mobile client (APP) is a carrier of a specific function in the mobile terminal, for example, a function of performing live online broadcasting or a playing function of online video.
4) In response to the condition or state on which the performed operation depends, one or more of the performed operations may be in real-time or may have a set delay when the dependent condition or state is satisfied; there is no restriction on the order of execution of the operations performed unless otherwise specified.
5) ClipboardEvent, which is a web api interface provided by webview, describes events related to modifying clipboard-related information, including cut, copy, and paste pass events.
6) Clipboardbata, clipboardbata attributes hold a DataTransfer object that can be used to describe which data can be placed into the clipboard by the cut and copy event handlers, typically by calling the setData method, and can retrieve data that is copied into the clipboard by the paste event handler, typically by calling the getdata (format) method.
7) setData, atatransfer setData () method is used to set the drag data of a drag-and-drop operation to the specified data and type. If data of a given type does not exist, it is added to the end of the drag data store so that the last item in the typelist will be of the new type. If data of a given type already exists, the existing data will be replaced with the same location. That is, the order of the typelists does not change when the same type of data is replaced. Example data types are: "text/plane" and "text/uri-list", text/html.
8) getData, datatransfer, getData () methods accept drag-and-drop (in the form of DOMString) data of a specified type. If the drag and drop behavior does not manipulate any data, an empty string is returned. The data types are: text/plane, text/html, text/uri-list.
9) Uipaperboard: the uidashboard class provides clipboard: the protected regions of data are shared in or between apps. The type providing method can read data items from the clipboard and paste semi-written data items.
10) The UIKit framework provided in UIKit, IOS implements the copy-cut-paste capability in UITextView and UITextField classes.
11) And (3) micro document process: the micro-document process is a document product provided in enterprise WeChat, can support multiple persons to collaboratively edit/view the same document content on line, and can solve the problem of the product form of collaboration on the document content in daily office work.
12) A CS instruction: the micro document is used for providing instruction content which is synchronous with background data when the content is edited by multiple persons in online collaboration, and can be used for solving the detailed information use for judging the edited content when conflicts are solved through CS instructions.
13) An abstract syntax tree (AST abstract syntax tree), or syntax tree (syntax tree), is a tree representation of the abstract syntax structure of source code, and may particularly refer to the source code of a programming language.
14) Transactions (transactions), equivalent to the computer term "Transaction," include operations that need to be committed to a blockchain network for execution and do not refer solely to transactions in the context of commerce, which embodiments of the present invention follow in view of the convention colloquially used in blockchain technology.
For example, a deployment (deployment) transaction is used to install a specified smart contract to a node in a blockchain network and is ready to be invoked; the Invoke (Invoke) transaction is used to append records of the transaction in the blockchain by invoking the smart contract and to perform operations on the state database of the blockchain, including update operations (including adding, deleting, and modifying key-value pairs in the state database) and query operations (i.e., querying key-value pairs in the state database).
15) A Block chain (Block chain) is an encrypted, chained transaction storage structure formed of blocks (blocks).
For example, the header of each block may include hash values of all transactions in the block, and also include hash values of all transactions in the previous block, so as to achieve tamper resistance and forgery resistance of the transactions in the block based on the hash values; newly generated transactions, after being filled into the tiles and passing through the consensus of nodes in the blockchain network, are appended to the end of the blockchain to form a chain growth.
16) A Block chain Network (Block chain Network) incorporates new blocks into a set of nodes of a Block chain in a consensus manner.
17) Ledger (legger) is a general term for blockchains (also called Ledger data) and state databases synchronized with blockchains.
Wherein, the blockchain records the transaction in the form of a file in a file system; the state database records the transactions in the blockchain in the form of different types of Key (Key) Value pairs for supporting fast query of the transactions in the blockchain.
18) Intelligent Contracts (Smart Contracts), also known as Chain codes (Chain codes) or application codes, are programs deployed in nodes of a blockchain network, which execute intelligent Contracts called in received transactions to perform operations of updating or querying key-value data of the account database.
19) Consensus (Consensus), a process in a blockchain network, is used to agree on transactions in blocks among the nodes involved, the agreed blocks are to be appended to the end of the blockchain, and the mechanisms to achieve Consensus include Proof of workload (Po W), Proof of rights and interests (PoS, Proof of stamp), Proof of equity authorization (D PoS, released Proof of stamp), Proof of Elapsed Time (Po ET, Proof of Elapsed Time), etc.
The text information processing method provided by the embodiment of the present invention is described below by taking an enterprise wechat application as an instant messaging software of a social environment as an example, where fig. 1 is a schematic view of a use environment of the text information processing method provided by the embodiment of the present invention, referring to fig. 1, a terminal (including a terminal 10-1 and a terminal 10-2) is provided with a corresponding wechat client capable of being deployed as an instant messaging client, and a user can obtain and display different social information through the corresponding client, and copy and paste text information in different documents in the social information that needs to be used; the terminal is connected to the server 200 through a network 300, and the network 300 may be a wide area network or a local area network, or a combination of the two, and uses a wireless link to realize data transmission.
As an example, the server 200 is configured to lay out the text information processing apparatus to implement the text information processing method provided by the present invention, so as to monitor the selection operation of the content in the interface terminal display interface through the instant messaging client server, and obtain the text information to be processed stored in the clipboard process; receiving a text information format selection instruction sent by a terminal, and determining a text format matched with text information to be processed according to the text information format selection instruction; and triggering different processing processes based on the text format matched with the text information to be processed, forming a text processing instruction matched with the text format of the text information, and sending the text processing instruction to the terminal so as to process the text information to be processed stored in the clipboard process.
Similarly, as an example, the terminal (including the terminal 10-1 and the terminal 10-2) may also deploy a corresponding text information processing apparatus to implement a selection operation for obtaining content in a display interface of the terminal, where the selection operation is used to select corresponding text information in the display interface through a key or a touch instruction; in response to the selection operation, determining to-be-processed text information stored in a clipboard process; receiving a text information format selection instruction, and sending the text information format selection instruction to a corresponding instant messaging client server; receiving a text processing instruction sent by an instant messaging client server; and responding to the text processing instruction, and processing the text information to be processed stored in the clipboard process according to the corresponding text information format. Certainly, the text information processing apparatus provided by the present invention may be applied to various types of text information processing environments (including but not limited to various types of text information viewing and text information editing and sharing environments) or a usage environment in which social software (an instant messaging client) performs information interaction, and presents a final text information processing result on a User display Interface (User Interface) for a User to view. The text information obtained by the user in the current display interface can be also called by other application programs.
However, in the process of processing the text information, although the instant messaging software provides relevant components for copying and pasting, the copied content cannot select whether to reserve the html format, and the text content which does not need the html format cannot be used and needs to be edited again; meanwhile, the copied text information content cannot enable the user to select whether the format is reserved, and the use experience of the user is not improved.
As will be described in detail below with respect to the structure of the text information processing apparatus according to the embodiment of the present invention, the text information processing apparatus may be implemented in various forms, such as a dedicated terminal with a processing function of the text information processing apparatus, or a server provided with a processing function of the text information processing apparatus, such as the server 200 in the foregoing fig. 1. Fig. 2 is a schematic diagram of a composition structure of a text information processing apparatus according to an embodiment of the present invention, and it is understood that fig. 2 only shows an exemplary structure of the text information processing apparatus, and not a whole structure thereof, and a part of or the whole structure shown in fig. 2 may be implemented as needed.
The text information processing device provided by the embodiment of the invention comprises: at least one processor 201, memory 202, user interface 203, and at least one network interface 204. The various components of the text information processing apparatus are coupled together by a bus system 205. It will be appreciated that the bus system 205 is used to enable communications among the components. The bus system 205 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as bus system 205 in fig. 2.
The user interface 203 may include, among other things, a display, a keyboard, a mouse, a trackball, a click wheel, a key, a button, a touch pad, or a touch screen.
It will be appreciated that the memory 202 can be either volatile memory or nonvolatile memory, and can include both volatile and nonvolatile memory. The memory 202 in embodiments of the present invention is capable of storing data to support operation of the terminal (e.g., 10-1). Examples of such data include: any computer program, such as an operating system and application programs, for operating on a terminal (e.g., 10-1). The operating system includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, and is used for implementing various basic services and processing hardware-based tasks. The application program may include various application programs.
In some embodiments, the text information processing apparatus provided in the embodiments of the present invention may be implemented by a combination of hardware and software, and by way of example, the text information processing apparatus provided in the embodiments of the present invention may be a processor in the form of a hardware decoding processor, which is programmed to execute the text information processing method provided in the embodiments of the present invention. For example, a processor in the form of a hardware decoding processor may employ one or more Application Specific Integrated Circuits (ASICs), DSPs, Programmable Logic Devices (PLDs), Complex Programmable Logic Devices (CPLDs), Field Programmable Gate Arrays (FPGAs), or other electronic components.
As an example of the text information processing apparatus provided by the embodiment of the present invention implemented by combining software and hardware, the text information processing apparatus provided by the embodiment of the present invention may be directly embodied as a combination of software modules executed by the processor 201, where the software modules may be located in a storage medium, the storage medium is located in the memory 202, and the processor 201 reads executable instructions included in the software modules in the memory 202, and completes the text information processing method provided by the embodiment of the present invention in combination with necessary hardware (for example, including the processor 201 and other components connected to the bus 205).
By way of example, the Processor 201 may be an integrated circuit chip having Signal processing capabilities, such as a general purpose Processor, a Digital Signal Processor (DSP), or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or the like, wherein the general purpose Processor may be a microprocessor or any conventional Processor or the like.
As an example of the text information processing apparatus provided by the embodiment of the present invention implemented by hardware, the apparatus provided by the embodiment of the present invention may be implemented by directly using the processor 201 in the form of a hardware decoding processor, for example, by being executed by one or more Application Specific Integrated Circuits (ASICs), DSPs, Programmable Logic Devices (PLDs), Complex Programmable Logic Devices (CPLDs), Field Programmable Gate Arrays (FPGAs), or other electronic components, to implement the text information processing method provided by the embodiment of the present invention.
The memory 202 in the embodiment of the present invention is used to store various types of data to support the operation of the text information processing apparatus. Examples of such data include: any executable instructions for operating on the text information processing apparatus, such as executable instructions, a program that implements the text information processing method of the embodiment of the present invention may be contained in the executable instructions.
In other embodiments, the text information processing apparatus provided by the embodiment of the present invention may be implemented by software, and fig. 2 shows the text information processing apparatus stored in the memory 202, which may be software in the form of programs, plug-ins, and the like, and includes a series of modules, and as an example of the programs stored in the memory 202, the text information processing apparatus may include the following software modules: a first information transmission module 2081 and a first information processing module 2082. When the software modules in the text information processing apparatus are read into the RAM by the processor 201 and executed, the text information processing method provided by the embodiment of the invention is implemented, wherein the functions of the software modules in the text information processing apparatus include:
the first information transmission module 2081, configured to acquire a selection operation on content in a terminal display interface, where the selection operation is used to select corresponding text information in the display interface through a key or a touch instruction;
the first information processing module 2082, configured to determine, in response to the selection operation, to-be-processed text information stored in a clipboard process;
the first information processing module 2082 is configured to receive a text information format selection instruction, and send the text information format selection instruction to a corresponding instant messaging client server;
the first information transmission module 2081, configured to receive a text processing instruction sent by an instant messaging client server;
the first information processing module 2082 is configured to, in response to the text processing instruction, process the text information to be processed stored in the clipboard process according to the corresponding text information format.
Referring to fig. 3, fig. 3 is an optional flowchart of the text information processing method according to the embodiment of the present invention, and it can be understood that the steps shown in fig. 3 may be executed by various electronic devices operating the text information processing apparatus, such as a server or a server cluster with the text information processing apparatus, where a dedicated terminal with the text information processing apparatus may be packaged in the server shown in fig. 1 to execute corresponding software modules in the text information processing apparatus shown in the foregoing fig. 2. The following is a description of the steps shown in fig. 3.
Step 301: the text information processing device acquires a selection operation of contents in a terminal display interface.
And the selection operation is used for selecting corresponding text information in the display interface through a key or a touch instruction.
Step 302: the text information processing device responds to the selection operation and determines the text information to be processed stored in the clipboard process.
Referring to fig. 4, fig. 4 is a schematic diagram illustrating an optional display effect of the text information processing method according to the embodiment of the present invention, where an enterprise wechat application is taken as an example of instant messaging software in a social environment, enterprise wechat related to the present invention is an enterprise-level-oriented basic office communication tool, and an enterprise can implement basic management and efficient communication functions through enterprise wechat. Referring to fig. 4, the micro document process of the enterprise wechat provides a function of supporting the preservation of the original html format and the complete plain text format when copying the text information, wherein the complete plain text format which can be preserved by the micro document process of the enterprise wechat can be expressed as the text which is not modified by any text in the displayed text information, has no bold, underline, italic, graphic, symbol or special character and has a special printing format, only saves the text content, does not save the format setting of the text content, and converts all section symbols, page breaks and new line characters into paragraph symbols so as to avoid the format setting from affecting the display of the text information; further, taking the IOS system as an example, it provides the developer with UIKit framework, and the framework provides the methods and mechanisms needed for implementing copy, cut, and paste in app, where the IOS client function UIKit is supplemented with related interface capabilities, including:
the uidashboard class provides clipboard: the protected regions of data are shared in or between apps. The type providing method can read data items from the clipboard and write the data items into the clipboard process;
the UIMenuController class displays an edit button above or below the selected portion for copying, cutting, or pasting. Default edit menu commands include: copy, cut, paste, select, and select, all of which, of course, also include adding custom menu items to the edit menu. Further, the UIResponder class declares canPerformAction: withSender: method. The Responder class may implement the method to display and remove commands for editing menus based on the current content. Further, the UIResponerStandardEditActions informal protocol declares interfaces to handle copy, cut, paste, select, and select all commands. When the user triggers any command in the edit menu, the corresponding uiresponstandedediactions method is called.
Step 303: and the text message processing device receives the text message format selection instruction and sends the text message format selection instruction to the corresponding instant messaging client server.
Step 304: the text information processing device receives a text processing instruction sent by the instant messaging client server.
Among other things, in particular, in some embodiments of the invention, a clipboard is a standardized mechanism for exchanging data within or between apps. Clipboards are most commonly used to handle copy, cut, and paste operations: when a user selects data in the app and selects a copy (or cut) command, the selected data is placed on the clipboard. When the user selects a paste command (which may be in the same or different APPs, and may be triggered to share among different APPs by the system, for example, to paste text information in the personal wechat client into a display interface of the enterprise wechat client), the data on the clipboard is copied into the current APP, and the user may select whether the paste format requires html format.
Further, for copied rich text or HTML, PDF, and plain text representations that provide copied data. The Rich Text (Rich Text Format) is a cross-platform document Format. With established compatibility, which facilitates easy dumping of formatted text and graphics between applications, an item of the clipboard includes a representation of the data items that all apps can provide. The representation of each clipboard item is typically identified by a Unique Type Identifier (UTI Unique Type Identifier), where UTI is a simple string of characters that can serve as a Unique token for a particular data Type.
Among other things, UTI provides a universal method of marking data types. If a custom data type needs to be supported, a unique identifier must be created for it. For example, a reverse-DNS (reverse-DNS) notation may be used to denote the type string to ensure uniqueness.
In some embodiments of the invention, enterprise Wechat (instant Messaging client) also supports the selection of rich text and pictures. The rich text and the Unicode version of the selected text, as well as the different representations of the selected pictures, are placed on the clipboard. Each representation of each item stores its own data. In some embodiments of the present invention, to maximize the sharing, clipboard items may contain as many different representations as possible, and accordingly, the clipboard reader also needs to find the type of data that best fits its function.
Step 305: and the text information processing device responds to the text processing instruction and processes the text information to be processed stored in the clipboard process according to the corresponding text information format.
Furthermore, after the user triggers the copy operation, the enterprise wechat client can write the text information into the clipboard according to the html format and the plain text format, and when the user triggers the paste behavior in the micro-document process, the user reads the data in the clipboard and transmits the data to the Web page of the wechat document according to the html or plain text type selected by the user by calling the jsapi interface provided by the micro-document process.
When the processed text information is applied to other clients, the identification of the target client in the data migration component process can be determined; based on the identification of the target client, the to-be-processed text information stored in the clipboard process is processed to realize the pasting or cutting of the to-be-processed text information, so that the defect of repeated editing when a user uses the same text information in different clients can be overcome, the processing speed of the text information is effectively improved, and the use experience of the user is improved.
The following describes a structure of a server according to an embodiment of the present invention in detail, where the server provided in the embodiment of the present invention may be a dedicated server with a processing function of a text information processing apparatus, or a server of an instant messaging client with a processing function of a text information processing apparatus, such as the server 200 in the foregoing fig. 1. Fig. 5 is a schematic diagram of a composition structure of a text information processing apparatus according to an embodiment of the present invention, and it is understood that fig. 5 only shows an exemplary structure of the text information processing apparatus, and not a whole structure thereof, and a part of or the whole structure shown in fig. 5 may be implemented as needed.
The text information processing device provided by the embodiment of the invention comprises: at least one processor 401, memory 402, a user interface 403, and at least one network interface 404. The various components of the text information processing device are coupled together by a bus system 405. It will be appreciated that the bus system 405 is used to enable communications among the components. The bus system 405 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as bus system 405 in fig. 5.
The user interface 403 may include, among other things, a display, a keyboard, a mouse, a trackball, a click wheel, a key, a button, a touch pad, or a touch screen.
It will be appreciated that the memory 402 can be either volatile memory or nonvolatile memory, and can include both volatile and nonvolatile memory. The memory 402 in embodiments of the present invention may be capable of storing data to support operation of the terminal (e.g., 10-1). Examples of such data include: any computer program, such as an operating system and application programs, for operating on a terminal (e.g., 10-1). The operating system includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, and is used for implementing various basic services and processing hardware-based tasks. The application program may include various application programs.
In some embodiments, the text information processing apparatus provided in the embodiments of the present invention may be implemented by a combination of hardware and software, and by way of example, the text information processing apparatus provided in the embodiments of the present invention may be a processor in the form of a hardware decoding processor, which is programmed to execute the text information processing method provided in the embodiments of the present invention. For example, a processor in the form of a hardware decoding processor may employ one or more Application Specific Integrated Circuits (ASICs), DSPs, Programmable Logic Devices (PLDs), Complex Programmable Logic Devices (CPLDs), Field Programmable Gate Arrays (FPGAs), or other electronic components.
As an example of the text information processing apparatus provided by the embodiment of the present invention implemented by combining software and hardware, the text information processing apparatus provided by the embodiment of the present invention may be directly embodied as a combination of software modules executed by the processor 401, where the software modules may be located in a storage medium, the storage medium is located in the memory 402, the processor 401 reads executable instructions included in the software modules in the memory 402, and the text information processing method provided by the embodiment of the present invention is completed in combination with necessary hardware (for example, including the processor 401 and other components connected to the bus 405).
By way of example, the Processor 401 may be an integrated circuit chip having Signal processing capabilities, such as a general purpose Processor, a Digital Signal Processor (DSP), or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or the like, wherein the general purpose Processor may be a microprocessor or any conventional Processor or the like.
As an example of the text information processing apparatus provided by the embodiment of the present invention implemented by hardware, the apparatus provided by the embodiment of the present invention may be implemented by directly using the processor 401 in the form of a hardware decoding processor, for example, by being executed by one or more Application Specific Integrated Circuits (ASICs), DSPs, Programmable Logic Devices (PLDs), Complex Programmable Logic Devices (CPLDs), Field Programmable Gate Arrays (FPGAs), or other electronic components, to implement the text information processing method provided by the embodiment of the present invention.
The memory 402 in the embodiment of the present invention is used to store various types of data to support the operation of the text information processing apparatus. Examples of such data include: any executable instructions for operating on the text information processing apparatus, such as executable instructions, a program that implements the text information processing method of the embodiment of the present invention may be contained in the executable instructions.
In other embodiments, the text information processing apparatus provided by the embodiment of the present invention may be implemented by software, and fig. 5 shows the text information processing apparatus stored in the memory 402, which may be software in the form of programs, plug-ins, and the like, and includes a series of modules, and as an example of the programs stored in the memory 402, the text information processing apparatus may include the following software modules: a second information transmission module 4081 and a second information processing module 4082. When the software modules in the text information processing apparatus are read into the RAM by the processor 401 and executed, the text information processing method provided by the embodiment of the invention is implemented, wherein the functions of the software modules in the text information processing apparatus include:
the second information transmission module 4081 is used for monitoring the selection operation of the content in the interface terminal display interface through the instant messaging client server and acquiring the text information to be processed stored in the clipboard process;
the second information processing module 4082 is configured to receive a text information format selection instruction sent by the terminal, and determine a text format matched with the text information to be processed according to the text information format selection instruction;
the second information processing module 4082 is configured to trigger different processing processes based on the text format matched with the text information to be processed, form a text processing instruction matched with the text format of the text information, and send the text processing instruction to the terminal, so as to process the text information to be processed stored in the clipboard process.
Referring to fig. 6, fig. 6 is an optional flowchart of the text information processing method according to the embodiment of the present invention, and it can be understood that the steps shown in fig. 6 may be executed by various electronic devices operating the text information processing apparatus, for example, a server or a server cluster with the text information processing apparatus, where a dedicated terminal with the text information processing apparatus may be packaged in the server shown in fig. 1 to execute corresponding software modules in the text information processing apparatus shown in the previous fig. 5. The following is a description of the steps shown in fig. 6.
Step 601: the text information processing device monitors the selection operation of the content in the display interface of the interface terminal through the instant messaging client server and obtains the text information to be processed stored in the clipboard process.
Step 602: the text information processing device receives a text information format selection instruction sent by a terminal, and determines a text format matched with the text information to be processed according to the text information format selection instruction.
Step 603: the text information processing device triggers different processing processes based on the text format matched with the text information to be processed, forms a text processing instruction matched with the text format of the text information, and sends the text processing instruction to the terminal.
Therefore, the text information to be processed stored in the clipboard process can be processed.
In some embodiments of the present invention, different processing procedures are triggered based on a text format matched with text information to be processed, a text processing instruction matched with the text format of the text information is formed, and a packet may be implemented by:
when the text format matched with the text information to be processed is a plain text format, determining the position information of a cursor in the terminal display interface and paragraph format information in the terminal display interface; and forming a first text processing instruction matched with a plain text format of the text information based on the position information of the cursor and the paragraph format information. The Text information in plain Text format may be sent to different users in an instant messaging client as chat content to be edited by the user, and specifically, the Text information in plain Text format may be processed by a format Text Editor, for example, a Text Editor supporting Text format editing and recognition, such as a rich Text Editor (RTERich Text Editor).
In some embodiments of the present invention, the format text editor can be embedded into a corresponding component of the instant messaging client, so that a user can edit text content, text format and the like in a timely manner. In order to facilitate the user to edit the text content and the text format, a content editing area can be arranged in the message interaction interface in the display interface so as to write and display the text content. The user may enter text content in the content editing region, at which time the terminal receives the user's text input through the format text editor.
In some embodiments of the present invention, different processing procedures are triggered based on a text format matched with text information to be processed, and a text processing instruction matched with the text format of the text information is formed, which may be implemented by:
when the text format matched with the text information to be processed is a hypertext markup language format, determining a data structure corresponding to the hypertext markup language format; determining style information in a hypertext markup language format and a corresponding document object model object structure in the text information to be processed through a text processing process in the instant messaging client; and determining a text processing instruction matched with the format of the hypertext markup language through a data structure corresponding to the format of the hypertext markup language based on the style information in the format of the hypertext markup language in the text information to be processed and the corresponding document object model object structure. When the user operates and pastes, the logic of the Web side is informed by monitoring a callback of the event, the callback function acquires the content to be pasted transmitted in the terminal Clipboard through Clipboard event.
In some embodiments of the invention, the method further comprises:
determining position information of a cursor in the terminal display interface and paragraph format information in the terminal display interface; determining instruction information which can be identified by a text processing process in the instant messaging client based on the position information of the cursor and the paragraph format information; and fusing instruction information which can be identified by a text processing process in the instant messaging client based on a data structure corresponding to the hypertext markup language format to form a second text processing instruction matched with the hypertext markup language format. In conjunction with the preamble embodiment, the micro-document process provides two ways to select html or plain text paste, and when the user selects style paste with html format, the clipboard data. The data structure is a data structure style of an AST (document name word position is described), the micro document process analyzes the data structure of the AST, acquires a html style and a dom structure of a current clip, and further acquires the data structure written into the micro document process, but the data needs to be converted into a CS instruction through a processing logic of the micro document process.
Referring to fig. 7, fig. 7 is an optional schematic flow chart of the text information processing method according to the embodiment of the present invention, where the instant messaging client is an enterprise WeChat, the text processing process is a micro-document process provided by the enterprise WeChat, and the text processing process server may execute different processing logics according to different text information formats, and specifically includes:
step 701: the enterprise WeChat client copies and generates text data in two formats, namely html and text.
Step 702: the Webview component notifies the paste event to the micro-document server.
Step 703: the micro document server listens for an event to get clipboarddata.
Step 704: and the micro document server selects html format or Texhtml format to convert into corresponding ast acquisition data structure to be added into the document.
Step 705: and the enterprise WeChat completes the text information processing of the corresponding text format according to the clipboard data.
In some embodiments of the invention, the method further comprises:
the instant messaging client server detects the operation history of different users to record text processing instructions generated when the different users operate the text to be processed; updating the document corresponding to the text information to be processed based on the recorded text processing instruction; when the document corresponding to the text information to be processed is awakened by a new target user, the displayed document content is adjusted through the recorded text processing instruction generated when different users operate the text to be processed, so that the document contents acquired by different users are consistent.
Referring to fig. 8, fig. 8 is an optional schematic flow chart of the text information processing method according to the embodiment of the present invention, where the instant messaging client is an enterprise WeChat, the text processing process is a micro-document process provided by the enterprise WeChat, and the text processing process server may execute different processing logics according to different text information formats, and specifically includes:
step 801: and acquiring the logic of connectionless pure http.
Step 802: and converting the request of the long connection into an http request and sending the http request to a logic layer for processing.
Step 803: and the long connection push client requests to be sent to the corresponding server.
Step 804: the server stores the logic and queries for sending a push to docpush.
Further, referring to fig. 9 and fig. 10, fig. 9 is a schematic data structure diagram of a text information processing method according to an embodiment of the present invention, and fig. 10 is a schematic data structure diagram of a text information processing method according to an embodiment of the present invention, after a micro document process obtains a pasted html data structure, a position of a cursor to be currently inserted and a default style of a current paragraph need to be integrated into a CS instruction available inside the micro document process; in particular, the CS instructions in the micro-documenting process may be used to record and store content according to the data structure shown in fig. 9.
Wherein, 1) AText describes the content and format of the whole document, which is a json string. the text part represents the content of the document, including the symbols of the line feed. 2) Description of the format represented by the attribs section, the string semantics shown in fig. 9 are: 9 bytes with 0, 1 attribute, replacing one line by 1 byte and simultaneously with attribute 0, b (36-bit system) bytes with attribute 0, 1, 2, replacing 2 lines by 2 bytes; the numbers here only represent the attribute sequence numbers, and the specific attributes, are described in another component, APOOL. I.e. a pool of attributes. 3) The property pool is an Object. The corresponding relation of the attributes is described, and meanwhile positive and negative mapping exists. The attributes involved in the process of describing the content and format of the document by AText may be represented as data of a pair type, which is the same as the attributes of bold, true or bold, false. Specifically, the "0" number represents the identifier of the modifier information, and if there are multiple modifiers, the modifiers will appear in the data set in sequence according to the corresponding modification order. In the same document information, one attribute pair is unique, and the compression of the format description characters can be realized through the unique attribute pair once.
Referring to fig. 11, 12, and 13, after the micro document process converts the pasted data into a CS instruction, the CS instruction data of the user is sent to a proxy layer (common proxy) of the long backend link through the long Websocket link, the proxy layer initiates a merge operation of the document instruction by calling an interface provided by the docProxy layer, merges the newly added CS instruction content with the original document data, records the data in an instruction pool, and writes the data in the document backend for storage according to time or a certain amount of instructions.
After receiving a CS instruction newly written by a user, a background (server) pushes the CS instruction to other users who open the micro-document through long-chain connection, meanwhile, the micro-document merges the received CS instruction with local data, and the data is merged through an OT merging algorithm to obtain a final result to be displayed locally.
Referring to fig. 11, fig. 11 is a schematic diagram of an optional display effect of the text information processing method according to the embodiment of the present invention, if a html-preserving style is selected to be pasted into a document, a style-related format of text, background, and paragraph can be preserved through a front-end display interface, the html style of the copy depends on the style information recorded on the html mark of the copy content, and the representation of the conversion into the document in a reasonable manner is performed in the micro document.
Referring to fig. 12, fig. 12 is a schematic diagram of an optional display effect of the text information processing method according to the embodiment of the present invention, wherein when the user selects a plain text pasting manner, only plain text and line feed content may be retained to retain real data content, and the plain text may be used for personalized style editing.
Referring to fig. 13, fig. 13 is a schematic diagram illustrating an optional display effect of the text information processing method according to an embodiment of the present invention, in some embodiments of the present invention, a micro document process also provides a text with html format, and if the display is abnormal or not the result required by the user, all formats can be removed by removing a key function of the format, and then editing and adjusting are performed again to obtain a style representation required by the user; for example, the content presentation may be in a clear format, and may also be converted to a plain text content.
Therefore, the micro-document support of the instant messaging client can select copy and paste with formats and copy and paste without formats when the mobile terminal copies by identifying the content of the clipboard and converting html format or plain text format of the content support after the client copies the content, can paste the content with different formats into the micro-document and records important information data through the micro-document. Meanwhile, different data backup scenes are met by selecting whether to reserve the html format or the plain text format, whether the original data format needs to be reserved or not can be flexibly controlled, extra editing cost is reduced, and the daily cooperation efficiency is further improved.
In some embodiments of the present invention, in order to implement storing corresponding data through a blockchain network, the text information method provided by the present invention further includes:
and sending the user identifier, the text processing instruction, the text information to be processed and the document corresponding to the text information to be processed to a block chain network, so that a node of the block chain network fills the user identifier, the text processing instruction, the text information to be processed and the document corresponding to the text information to be processed into a new block, and when the new block is identified in a consistent manner, the new block is added to the tail of the block chain.
The embodiment of the present invention may be implemented by combining a Cloud technology, where the Cloud technology (Cloud technology) is a hosting technology for unifying series resources such as hardware, software, and a network in a wide area network or a local area network to implement calculation, storage, processing, and sharing of data, and may also be understood as a generic term of a network technology, an information technology, an integration technology, a management platform technology, an application technology, and the like applied based on a Cloud computing business model. Background services of the technical network system require a large amount of computing and storage resources, such as video websites, photo-like websites and more portal websites, so cloud technology needs to be supported by cloud computing.
It should be noted that cloud computing is a computing mode, and distributes computing tasks on a resource pool formed by a large number of computers, so that various application systems can obtain computing power, storage space and information services as required. The network that provides the resources is referred to as the "cloud". Resources in the "cloud" appear to the user as being infinitely expandable and available at any time, available on demand, expandable at any time, and paid for on-demand. As a basic capability provider of cloud computing, a cloud computing resource pool platform, which is called an Infrastructure as a Service (IaaS) for short, is established, and multiple types of virtual resources are deployed in a resource pool and are used by external clients selectively. The cloud computing resource pool mainly comprises: a computing device (which may be a virtualized machine, including an operating system), a storage device, and a network device.
As shown in fig. 1, the text information processing method provided in the embodiment of the present invention can be implemented by corresponding cloud devices, for example: the terminals (including the terminal 10-1 and the terminal 10-2) are connected to the server 200 located at the cloud end through a network 300, and the network 300 may be a wide area network or a local area network, or a combination of the two. It should be noted that the server 200 may be a physical device or a virtualized device.
In some embodiments of the present invention, a data synchronization request of other nodes in the blockchain network may also be received; responding to the data synchronization request, and verifying the authority of the other nodes; and when the authority of the other nodes passes the verification, controlling the current node and the other nodes to carry out data synchronization so as to realize that the other nodes acquire the user identification, the text processing instruction, the text information to be processed and the document corresponding to the text information to be processed.
Referring to fig. 14, fig. 14 is a schematic structural diagram of the text information processing apparatus 100 according to the embodiment of the present invention, which includes a blockchain network 200 (exemplarily illustrating the consensus node 210-1 to the consensus node 210-3), an authentication center 300, a service agent 400, and a service agent 500, which are respectively described below.
The type of blockchain network 200 is flexible and may be, for example, any of a public chain, a private chain, or a federation chain. Taking a public link as an example, electronic devices such as user terminals and servers of any service entity can access the blockchain network 200 without authorization; taking a federation chain as an example, an electronic device (e.g., a terminal/server) under the jurisdiction of a service entity after obtaining authorization may access the blockchain network 200, and at this time, become a client node in the blockchain network 200.
In some embodiments, the client node may act as a mere watcher of the blockchain network 200, i.e., provides functionality to support a business entity to initiate a transaction (e.g., for uplink storage of data or querying of data on a chain), and may be implemented by default or selectively (e.g., depending on the specific business requirements of the business entity) with respect to the functions of the consensus node 210 of the blockchain network 200, such as a ranking function, a consensus service, and an accounting function, etc. Therefore, the data and the service processing logic of the service subject can be migrated into the block chain network 200 to the maximum extent, and the credibility and traceability of the data and service processing process are realized through the block chain network 200.
The consensus nodes in blockchain network 200 receive transactions submitted from client nodes (e.g., client node 410 attributed to business entity 400, and client node 510 attributed to business entity 500, shown in fig. 14) of different business entities (e.g., business entity 400 and business entity 500, shown in fig. 14), perform the transactions to update the ledger or query the ledger, and various intermediate or final results of performing the transactions may be returned for display in the business entity's client nodes.
For example, the client node 410/510 may subscribe to events of interest in the blockchain network 200, such as transactions occurring in a particular organization/channel in the blockchain network 200, and the corresponding transaction notifications are pushed by the consensus node 210 to the client node 410/510, thereby triggering the corresponding business logic in the client node 410/510.
An exemplary application of the blockchain network is described below, taking an example in which a plurality of service entities access the blockchain network to implement management of text information processing results.
Referring to fig. 14, a plurality of business entities involved in the management link, for example, the business entity 400 may be an artificial intelligence-based text information processing apparatus, the business entity 500 may be a display system with a text information processing function, and registers and obtains a respective digital certificate from the certificate authority 300, where the digital certificate includes a public key of the business entity and a digital signature signed by the certificate authority 300 for the public key and identity information of the business entity, and is used to be attached to a transaction together with the digital signature of the business entity for the transaction, and is sent to the blockchain network, so that the blockchain network takes out the digital certificate and the signature from the transaction, verifies the authenticity of the message (i.e., whether the message is not tampered) and the identity information of the business entity sending the message, and verifies the blockchain network according to the identity, for example, whether the blockchain network has the right to initiate the transaction. Clients running on electronic devices (e.g., terminals or servers) hosted by the business entity may request access from the blockchain network 200 to become client nodes.
The client node 410 of the service agent 400 is configured to monitor a selection operation of content in the interface terminal display interface through the instant messaging client server, and obtain to-be-processed text information stored in the clipboard process; receiving a text information format selection instruction sent by a terminal, and determining a text format matched with text information to be processed according to the text information format selection instruction; triggering different processing processes based on the text format matched with the text information to be processed, forming a text processing instruction matched with the text format of the text information, sending the text processing instruction to the terminal, processing the text information to be processed stored in the clipboard process, and sending the user identification, the text processing instruction, the text information to be processed and the document corresponding to the text information to be processed to the blockchain network 200.
The user identifier, the text processing instruction, the text information to be processed, and the document corresponding to the text information to be processed are sent to the blockchain network 200, service logic may be set in the client node 410 in advance, when a corresponding text information processing result is formed, the client node 410 automatically sends the user identifier, the text processing instruction, the text information to be processed, and the document corresponding to the text information to be processed to the blockchain network 200, or a service person of the service agent 400 logs in the client node 410, manually packages the user identifier, the text processing instruction, the text information to be processed, and the document corresponding to the text information to be processed, and sends the document to the blockchain network 200. During sending, the client node 410 generates a transaction corresponding to the update operation according to the user identifier, the text processing instruction, the to-be-processed text information, and the document corresponding to the to-be-processed text information, specifies an intelligent contract that needs to be invoked to implement the update operation, and parameters transferred to the intelligent contract in the transaction, and also carries a digital certificate of the client node 410, a signed digital signature (for example, obtained by encrypting a digest of the transaction using a private key in the digital certificate of the client node 410), and broadcasts the transaction to the consensus node 210 in the blockchain network 200.
When the transaction is received in the consensus node 210 in the blockchain network 200, the digital certificate and the digital signature carried by the transaction are verified, after the verification is successful, whether the service agent 400 has the transaction right is determined according to the identity of the service agent 400 carried in the transaction, and the transaction fails due to any verification judgment of the digital signature and the right verification. After successful verification, node 210 signs its own digital signature (e.g., by encrypting the digest of the transaction using the private key of node 210-1) and continues to broadcast in blockchain network 200.
After receiving the transaction successfully verified, the consensus node 210 in the blockchain network 200 fills the transaction into a new block and broadcasts the new block. When a new block is broadcasted by the consensus node 210 in the block chain network 200, performing a consensus process on the new block, if the consensus is successful, adding the new block to the tail of the block chain stored in the new block, updating the state database according to a transaction result, and executing a transaction in the new block: and for the transaction of submitting and updating the user identification, the text processing instruction, the text information to be processed and the document corresponding to the text information to be processed, adding the key value pair comprising the user identification, the text processing instruction, the text information to be processed and the document corresponding to the text information to be processed into the state database.
The service person of the service agent 500 logs in the client node 510, inputs the text information processing result or the target object query request, the client node 510 generates a transaction corresponding to the update operation/query operation according to the text information processing result or the target object query request, specifies an intelligent contract that needs to be called to implement the update operation/query operation and parameters transferred to the intelligent contract in the transaction, and the transaction also carries a digital certificate of the client node 510 and a signed digital signature (for example, a digest of the transaction is encrypted by using a private key in the digital certificate of the client node 510), and broadcasts the transaction to the consensus node 210 in the blockchain network 200.
After receiving the transaction in the consensus node 210 in the blockchain network 200, verifying the transaction, filling the block and making the consensus consistent, adding the filled new block to the tail of the blockchain stored in the new block, updating the state database according to the transaction result, and executing the transaction in the new block: for the submitted transaction of updating a certain user identifier, a text processing instruction, text information to be processed and a document corresponding to the text information to be processed, updating a key value pair corresponding to the text information processing result in a state database according to a manual identification result; and for the submitted transaction for inquiring a certain text information processing result, inquiring a key value pair corresponding to the text information processing result from the state database, and returning the transaction result.
It should be noted that fig. 14 exemplarily shows a process of directly linking the user identifier, the text processing instruction, the text information to be processed, and the document corresponding to the text information to be processed, but in other embodiments, for a case that the data size of the text information processing result is large, the client node 410 may pair and link the hash of the text information processing result and the corresponding hash of the text information processing result, and store the original text information processing result and the corresponding text information processing result in a distributed file system or a database. After obtaining the text message processing result and the corresponding text message processing result from the distributed file system or the database, the client node 510 may perform verification in combination with the corresponding hash in the blockchain network 200, thereby reducing the workload of uplink operations.
As an example of a block chain, referring to fig. 15, fig. 15 is a schematic structural diagram of a block chain in a block chain network 200 according to an embodiment of the present invention, where a header of each block may include hash values of all transactions in the block and also include hash values of all transactions in a previous block, a record of a newly generated transaction is filled in the block and is added to a tail of the block chain after being identified by nodes in the block chain network, so as to form a chain growth, and a chain structure based on hash values between blocks ensures tamper resistance and forgery prevention of transactions in the block.
An exemplary functional architecture of a blockchain network provided by the embodiment of the present invention is described below, referring to fig. 16, fig. 16 is a functional architecture schematic diagram of a blockchain network 200 provided by the embodiment of the present invention, which includes an application layer 201, a consensus layer 202, a network layer 203, a data layer 204, and a resource layer 205, which are described below respectively.
The resource layer 205 encapsulates the computing, storage, and communication resources that implement each node 210 in the blockchain network 200.
The data layer 204 encapsulates various data structures that implement the ledger, including blockchains implemented in files in a file system, state databases of the key-value type, and presence certificates (e.g., hash trees of transactions in blocks).
The network layer 203 encapsulates the functions of a Point-to-Point (P2P) network protocol, a data propagation mechanism and a data verification mechanism, an access authentication mechanism and service agent identity management.
Wherein the P2P network protocol implements communication between nodes 210 in the blockchain network 200, the data propagation mechanism ensures propagation of transactions in the blockchain network 200, and the data verification mechanism implements reliability of data transmission between nodes 210 based on cryptography methods (e.g., digital certificates, digital signatures, public/private key pairs); the access authentication mechanism is used for authenticating the identity of the service subject added into the block chain network 200 according to an actual service scene, and endowing the service subject with the authority of accessing the block chain network 200 when the authentication is passed; the business entity identity management is used to store the identity of the business entity that is allowed to access blockchain network 200, as well as the permissions (e.g., the types of transactions that can be initiated).
The consensus layer 202 encapsulates the functions of the mechanism for the nodes 210 in the blockchain network 200 to agree on a block (i.e., a consensus mechanism), transaction management, and ledger management. The consensus mechanism comprises consensus algorithms such as POS, POW and DPOS, and the pluggable consensus algorithm is supported.
The transaction management is configured to verify a digital signature carried in the transaction received by the node 210, verify identity information of the service entity, and determine whether the node has an authority to perform the transaction (read related information from the identity management of the service entity) according to the identity information; for the service agents authorized to access the blockchain network 200, the service agents all have digital certificates issued by the certificate authority, and the service agents sign the submitted transactions by using private keys in the digital certificates of the service agents, so that the legal identities of the service agents are declared.
The ledger administration is used to maintain blockchains and state databases. For the block with the consensus, adding the block to the tail of the block chain; executing the transaction in the acquired consensus block, updating the key-value pairs in the state database when the transaction comprises an update operation, querying the key-value pairs in the state database when the transaction comprises a query operation and returning a query result to the client node of the business entity. Supporting query operations for multiple dimensions of a state database, comprising: querying the block based on the block vector number (e.g., hash value of the transaction); inquiring the block according to the block hash value; inquiring a block according to the transaction vector number; inquiring the transaction according to the transaction vector number; inquiring account data of a business main body according to an account (vector number) of the business main body; and inquiring the block chain in the channel according to the channel name.
The application layer 201 encapsulates various services that the blockchain network can implement, including tracing, crediting, and verifying transactions.
The beneficial technical effects are as follows:
the embodiment of the invention monitors the selection operation of the content in the display interface of the interface terminal through the instant messaging client server and acquires the text information to be processed stored in the process of the clipboard; receiving a text information format selection instruction sent by a terminal, and determining a text format matched with text information to be processed according to the text information format selection instruction; different processing processes are triggered based on the text format matched with the text information to be processed, a text processing instruction matched with the text format of the text information is formed and sent to the terminal, and therefore the text information to be processed stored in the clipboard process can be processed, different requirements for the text information formats in different use scenes are met, the time for editing the text information by a user is shortened, and the efficiency for processing the text information is improved.
The above description is only exemplary of the present invention and should not be taken as limiting the scope of the present invention, and any modifications, equivalents, improvements, etc. made within the spirit and principle of the present invention should be included in the scope of the present invention.
Claims (15)
1. A method for processing text information, the method comprising:
acquiring a selection operation of contents in a terminal display interface, wherein the selection operation is used for selecting corresponding text information in the display interface through a key or a touch instruction;
in response to the selection operation, determining to-be-processed text information stored in a clipboard process;
receiving a text information format selection instruction, and sending the text information format selection instruction to a corresponding instant messaging client server;
receiving a text processing instruction sent by an instant messaging client server;
and responding to the text processing instruction, and processing the text information to be processed stored in the clipboard process according to the corresponding text information format.
2. The method of claim 1, further comprising:
determining an identifier of a target client in a data migration component process;
and processing the text information to be processed stored in the clipboard process based on the identification of the target client so as to realize the pasting or cutting of the text information to be processed.
3. A method for processing text information, the method comprising:
monitoring the selection operation of the content in the display interface of the interface terminal through the instant messaging client server, and acquiring the text information to be processed stored in the process of the clipboard;
receiving a text information format selection instruction sent by a terminal, and determining a text format matched with text information to be processed according to the text information format selection instruction;
and triggering different processing processes based on the text format matched with the text information to be processed, forming a text processing instruction matched with the text format of the text information, and sending the text processing instruction to the terminal so as to process the text information to be processed stored in the clipboard process.
4. The method according to claim 3, wherein the triggering different processing processes based on the text format matching the text information to be processed, and forming the text processing instruction matching the text format of the text information comprises:
when the text format matched with the text information to be processed is a plain text format, determining the position information of a cursor in the terminal display interface and paragraph format information in the terminal display interface;
and forming a first text processing instruction matched with a plain text format of the text information based on the position information of the cursor and the paragraph format information.
5. The method according to claim 3, wherein the triggering different processing processes based on the text format matching the text information to be processed, and forming the text processing instruction matching the text format of the text information comprises:
when the text format matched with the text information to be processed is a hypertext markup language format, determining a data structure corresponding to the hypertext markup language format;
determining style information in a hypertext markup language format and a corresponding document object model object structure in the text information to be processed through a text processing process in the instant messaging client;
and determining a text processing instruction matched with the format of the hypertext markup language through a data structure corresponding to the format of the hypertext markup language based on the style information in the format of the hypertext markup language in the text information to be processed and the corresponding document object model object structure.
6. The method of claim 5, further comprising:
determining position information of a cursor in the terminal display interface and paragraph format information in the terminal display interface;
determining instruction information which can be identified by a text processing process in the instant messaging client based on the position information of the cursor and the paragraph format information;
and fusing instruction information which can be identified by a text processing process in the instant messaging client based on a data structure corresponding to the hypertext markup language format to form a second text processing instruction matched with the hypertext markup language format.
7. The method of claim 3, further comprising:
the instant messaging client server detects the operation history of different users to record text processing instructions generated when the different users operate the text to be processed;
updating the document corresponding to the text information to be processed based on the recorded text processing instruction;
when the document corresponding to the text information to be processed is awakened by a new target user, the displayed document content is adjusted through the recorded text processing instruction generated when different users operate the text to be processed, so that the document contents acquired by different users are consistent.
8. The method according to any one of claims 3-7, further comprising:
sending the user identification, the text processing instruction, the text information to be processed and the document corresponding to the text information to be processed to a block chain network so as to enable the user identification, the text processing instruction, the text information to be processed and the document corresponding to the text information to be processed to be sent to the block chain network
And the node of the block chain network fills the user identification, the text processing instruction, the text information to be processed and the document corresponding to the text information to be processed into a new block, and when the new block is identified consistently, the new block is added to the tail of the block chain.
9. The method of claim 8, further comprising:
receiving data synchronization requests of other nodes in the blockchain network;
responding to the data synchronization request, and verifying the authority of the other nodes;
and when the authority of the other nodes passes the verification, controlling the current node and the other nodes to carry out data synchronization so as to realize that the other nodes acquire the user identification, the text processing instruction, the text information to be processed and the document corresponding to the text information to be processed.
10. The method of claim 9, further comprising:
responding to a query request, and analyzing the query request to obtain a corresponding object identifier;
acquiring authority information in a target block in a block chain network according to the object identifier;
checking the matching of the authority information and the object identification;
when the authority information is matched with the object identification, acquiring corresponding text information to be processed and a document corresponding to the text information to be processed in the block chain network;
and responding to the query instruction, pushing the acquired text information to be processed and the document corresponding to the text information to be processed to a corresponding client, so that the client acquires the corresponding text information to be processed and the document corresponding to the text information to be processed, which are stored in the block chain network.
11. A text information processing apparatus, characterized by comprising:
the terminal comprises a first information transmission module, a second information transmission module and a display module, wherein the first information transmission module is used for acquiring selection operation of contents in a terminal display interface, and the selection operation is used for selecting corresponding text information in the display interface through a key or a touch instruction;
the first information processing module is used for responding to the selection operation and determining the text information to be processed stored in the clipboard process;
the first information processing module is used for receiving a text information format selection instruction and sending the text information format selection instruction to a corresponding instant messaging client server;
the first information transmission module is used for receiving a text processing instruction sent by the instant messaging client server;
and the first information processing module is used for responding to the text processing instruction and processing the text information to be processed stored in the clipboard process according to the corresponding text information format.
12. A text information processing apparatus, characterized by comprising:
the second information transmission module is used for monitoring the selection operation of the content in the display interface of the interface terminal through the instant messaging client server and acquiring the text information to be processed stored in the clipboard process;
the second information processing module is used for receiving a text information format selection instruction sent by the terminal and determining a text format matched with the text information to be processed according to the text information format selection instruction;
the second information processing module is used for triggering different processing processes based on the text format matched with the text information to be processed, forming a text processing instruction matched with the text format of the text information, and sending the text processing instruction to the terminal so as to process the text information to be processed stored in the clipboard process.
13. An electronic device, characterized in that the electronic device comprises:
a memory for storing executable instructions;
a processor for implementing the method of processing text information according to any one of claims 1 to 2 when executing the executable instructions stored in the memory.
14. A server, characterized in that the server comprises:
a memory for storing executable instructions;
a processor for implementing the method of processing text information according to any one of claims 3 to 10 when executing the executable instructions stored in the memory.
15. A computer-readable storage medium storing executable instructions, wherein the executable instructions, when executed by a processor, implement the text information processing method of any one of claims 1 to 2, or implement the text information processing method of any one of claims 3 to 10.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010479751.1A CN113743055A (en) | 2020-05-29 | 2020-05-29 | Text information processing method and device, electronic equipment, server and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010479751.1A CN113743055A (en) | 2020-05-29 | 2020-05-29 | Text information processing method and device, electronic equipment, server and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113743055A true CN113743055A (en) | 2021-12-03 |
Family
ID=78725163
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010479751.1A Pending CN113743055A (en) | 2020-05-29 | 2020-05-29 | Text information processing method and device, electronic equipment, server and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113743055A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117033146A (en) * | 2023-10-10 | 2023-11-10 | 北京安天网络安全技术有限公司 | Identification method, device, equipment and medium for appointed consensus contract execution process |
-
2020
- 2020-05-29 CN CN202010479751.1A patent/CN113743055A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117033146A (en) * | 2023-10-10 | 2023-11-10 | 北京安天网络安全技术有限公司 | Identification method, device, equipment and medium for appointed consensus contract execution process |
CN117033146B (en) * | 2023-10-10 | 2023-12-08 | 北京安天网络安全技术有限公司 | Identification method, device, equipment and medium for appointed consensus contract execution process |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10102306B2 (en) | Patching base document object model (DOM) with DOM-differentials to generate high fidelity replay of webpage user interactions | |
CA2802746C (en) | System and methods for facilitating the synchronization of data | |
JP2022529967A (en) | Extracting data from the blockchain network | |
US20180349329A1 (en) | Support for non-native file types in web application environment | |
CN107979632B (en) | Processing method, device and system for push information | |
US20130262986A1 (en) | Systems, Methods, and Media for Managing Editable Previews of Webpages | |
US20140136957A1 (en) | Supporting Scalable Fonts | |
US10740367B2 (en) | Displaying an indication of changes made to content at a source | |
CN102870103A (en) | Server-based data sharing in computer applications | |
US9009740B2 (en) | Invocation of additional processing using remote procedure calls | |
CN113688173A (en) | Report information processing method and device, electronic equipment and storage medium | |
CN114818618B (en) | Document editing method and system based on signature encryption and medium | |
JP2022542203A (en) | Mini-program batch processing method, device, electronic device and readable storage medium | |
WO2023179549A1 (en) | Document block sharing method, apparatus and system, and storage medium | |
CN110555482A (en) | Vulgar picture identification method and device based on artificial intelligence and electronic equipment | |
WO2022156087A1 (en) | Data blood relationship establishing method and apparatus, computer device, and storage medium | |
CN110458445B (en) | Passenger information publishing management system | |
US8938522B2 (en) | Tiered XML services in a content management system | |
KR20160070254A (en) | Providing system, method for real time canvas, program and recording medium thereof | |
CN113743055A (en) | Text information processing method and device, electronic equipment, server and storage medium | |
CN111737621A (en) | OFD rendering method, system and device based on WASM | |
CN110855562A (en) | Internet of things data distribution management method and system, storage medium and management terminal | |
US20230208843A1 (en) | Systems and methods for providing software components as a service | |
KR20160070255A (en) | Providing system, method for real time canvas, program and recording medium thereof | |
CN111324271A (en) | Multimedia information processing method and device, electronic equipment and storage 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 |