Text information processing method and device, electronic equipment, server and storage medium
By monitoring the selection operations of the terminal's displayed content through the instant messaging client server, and obtaining and processing the text information in the clipboard, the problem of users being unable to select the text information format is solved, and automatic processing of text information format is achieved, improving user experience and efficiency.
Patent Information
- Application Number
- CN202010479751.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-05-29
- Publication Date
- 2025-12-09
- Estimated Expiration
- 2040-05-29
AI Technical Summary
Instant messaging software does not allow users to choose whether to retain HTML formatting when copying text messages, requiring users to perform additional editing, increasing operational complexity, and affecting user experience.
By monitoring the selection of content on the terminal's display interface through the instant messaging client server, obtaining text information from the clipboard, and processing it accordingly based on the user's selected format instructions, it supports conversion between plain text and HTML formats, reducing the number of editing steps for users.
It enables automatic processing of text information formats according to needs in different usage scenarios, reducing user editing time and improving text information processing efficiency and user experience.
Smart Images

Figure CN113743055B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to information processing technology, and in particular to a text information processing method and device, an electronic device, a server and a storage medium. BACKGROUND
[0002] At present, with the continuous popularity and development of terminals, users are increasingly dependent on terminals, and various applications can be installed on terminals. Among them, an instant messaging client (IM) is widely used in communication and document sharing processes. Users can complete real-time communication with friends through the instant messaging application, such as real-time sending and receiving of instant messaging messages in a chat scenario with friends, or sharing of documents through a micro-document process. However, in this process, although the instant messaging software provides a copy-paste related component, the copied content cannot be selected to retain or not retain the HTML (HyperText Mark-up Language) format, and the text content that does not require the HTML format cannot be used and needs to be edited again. At the same time, the copied text information content cannot be selected to retain or not retain the format, which is not conducive to improving the user experience and increasing the complexity of user operation. SUMMARY
[0003] Therefore, the embodiments of the present application provide a text information processing method and device, an electronic device, a server and a storage medium. The technical solutions of the embodiments of the present application are as follows:
[0004] The embodiments of the present application provide a text information processing method, which comprises the following steps:
[0005] Obtaining a selection operation on content in a terminal display interface, wherein the selection operation is used to select corresponding text information in the display interface through a key or a touch instruction;
[0006] In response to the selection operation, determining text information to be processed stored in a clipboard process;
[0007] Receiving a text information format selection instruction and sending the text information format selection instruction to a corresponding instant messaging client server;
[0008] Receiving a text processing instruction sent by the instant messaging client server;
[0009] In response to the text processing instruction, processing the text information to be processed stored in the clipboard process according to the corresponding text information format.
[0010] The embodiments of the present application also provide a text information processing method, which comprises the following steps:
[0011] The instant communication client server listens to the selection operation of the content in the terminal display interface and acquires the text information stored in the clipboard process to be processed;
[0012] The terminal sends a text information format selection instruction, and according to the text information format selection instruction, the text information format matched with the text information to be processed is determined;
[0013] Based on the text information format matched with the text information to be processed, different processing processes are triggered, the text processing instruction matched with the text information format of the text information is formed, and is sent to the terminal to realize the processing of the text information stored in the clipboard process to be processed.
[0014] The embodiment of the application further provides a text information processing device, and the method comprises:
[0015] The first information transmission module is used for acquiring the selection operation of the content in the terminal display interface, wherein the selection operation is used for selecting the corresponding text information in the display interface through a key or a touch instruction;
[0016] The first information processing module is used for determining the text information stored in the clipboard process to be processed in response to the selection operation;
[0017] The first information processing module is used for receiving a text information format selection instruction and sending the text information format selection instruction to the corresponding instant communication client server;
[0018] The first information transmission module is used for receiving the text processing instruction sent by the instant communication client server;
[0019] The first information processing module is used for processing the text information stored in the clipboard process to be processed according to the corresponding text information format in response to the text processing instruction.
[0020] In the above scheme,
[0021] The first information processing module is used for determining the identification of the target client in the data migration component process;
[0022] The first information processing module is used for processing the text information stored in the clipboard process to be processed based on the identification of the target client to realize the paste or cut of the text information to be processed.
[0023] The embodiment of the application further provides a text information processing device, and the method comprises:
[0024] The second information transmission module is configured to listen to a selection operation of content in a terminal display interface through an instant messaging client server, and acquire text information to be processed stored in a clipboard process.
[0025] The second information processing module is configured to receive a text information format selection instruction sent by the terminal, and determine a text information format matched with the text information to be processed according to the text information format selection instruction.
[0026] The second information processing module is configured to trigger different processing processes based on the text information format matched with the text information to be processed, form a text processing instruction matched with the text information 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.
[0027] In the above scheme,
[0028] The second information processing module is configured to determine position information of a cursor in the terminal display interface and paragraph format information in the terminal display interface when the text information format matched with the text information to be processed is a pure text format.
[0029] The second information processing module is configured to form a first text processing instruction matched with the pure text format of the text information based on the position information of the cursor and the paragraph format information.
[0030] In the above scheme,
[0031] The second information processing module is configured to determine a data structure corresponding to the hypertext markup language format when the text information format matched with the text information to be processed is the hypertext markup language format.
[0032] The second information processing module is configured to determine style information of the 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.
[0033] The second information processing module is configured to determine a text processing instruction matched with the hypertext markup language format through the data structure corresponding to the hypertext markup language format based on the style information of the hypertext markup language format and the corresponding document object model object structure in the text information to be processed.
[0034] In the above scheme,
[0035] The second information processing module is configured to determine position information of a cursor in the terminal display interface and paragraph format information in the terminal display interface.
[0036] The second information processing module is configured to determine instruction information recognizable by a text processing process in the instant messaging client based on the position information of the cursor and the paragraph format information.
[0037] The second information processing module is configured to fuse the instruction information recognizable by the 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 matching the hypertext markup language format.
[0038] In the above scheme,
[0039] The second information processing module is configured to detect operation histories of different users by the instant messaging client server, to record text processing instructions generated when the different users operate the to-be-processed text.
[0040] The second information processing module is configured to update a document corresponding to the to-be-processed text information based on the recorded text processing instructions.
[0041] The second information processing module is configured to adjust displayed document content by the recorded text processing instructions generated when the different users operate the to-be-processed text, when the document corresponding to the to-be-processed text information is woken up by a new target user, to realize consistency of document content obtained by the different users.
[0042] In the above scheme,
[0043] The second information processing module is configured to send a user identifier, a text processing instruction, to-be-processed text information, and a document corresponding to the to-be-processed text information to a blockchain network, to enable
[0044] The nodes of the blockchain network fill the user identifier, the text processing instruction, the to-be-processed text information, and the document corresponding to the to-be-processed text information into a new block, and when a consensus on the new block is reached, the new block is appended to a tail of the blockchain.
[0045] In the above scheme,
[0046] The second information processing module is configured to receive a data synchronization request of other nodes in the blockchain network.
[0047] The second information processing module is configured to verify a permission of the other nodes in response to the data synchronization request.
[0048] The second information processing module is configured to, when the authority of the other node is verified, control data synchronization between the current node and the other node to enable the other node to obtain the user identifier, the text processing instruction, the to-be-processed text information, and the document corresponding to the to-be-processed text information.
[0049] In the above scheme,
[0050] The second information processing module is configured to, in response to a query request, parse the query request to obtain a corresponding object identifier.
[0051] The second information processing module is configured to, according to the object identifier, obtain authority information in a target block in a blockchain network.
[0052] The second information processing module is configured to verify the matching of the authority information and the object identifier.
[0053] The second information processing module is configured to, when the authority information matches the object identifier, obtain corresponding to-be-processed text information and a document corresponding to the to-be-processed text information in the blockchain network.
[0054] The second information processing module is configured to, in response to the query instruction, push the obtained to-be-processed text information and the document corresponding to the to-be-processed text information to a corresponding client, to enable the client to obtain the corresponding to-be-processed text information and the document corresponding to the to-be-processed text information saved in the blockchain network.
[0055] The embodiment of the present application further provides an electronic device, which comprises:
[0056] A memory is configured to store executable instructions.
[0057] A processor is configured to, when running the executable instructions stored in the memory, implement the text information processing method.
[0058] The embodiment of the present application further provides a server, which comprises:
[0059] A memory is configured to store executable instructions.
[0060] A processor is configured to, when running the executable instructions stored in the memory, implement the text information processing method.
[0061] The embodiment of the present application further provides a computer readable storage medium, which stores executable instructions, and the executable instructions are executed by a processor to implement the text information processing method.
[0062] The embodiment of the present application has the following beneficial effects:
[0063] The embodiment of the present application listens to the selection operation of the content in the display interface of the interface terminal through the instant communication client server, and acquires the text information stored in the clipboard process; receives the text information format selection instruction sent by the terminal, determines the text information format matched with the text information to be processed according to the text information format selection instruction; triggers different processing processes based on the text information format matched with the text information to be processed, forms the text processing instruction matched with the text information format of the text information, and sends to the terminal, thereby realizing the processing of the text information to be processed stored in the clipboard process, meeting the different requirements of the text information format in different use scenarios, reducing the editing time of the user for the text information, and improving the efficiency of the text information processing. BRIEF DESCRIPTION OF DRAWINGS
[0064] Figure 1 The use environment schematic diagram of the text information processing method provided by the embodiment of the present application is shown in the figure;
[0065] Figure 2 The composition structure schematic diagram of the text information processing device provided by the embodiment of the present application is shown in the figure;
[0066] Figure 3 An optional flow schematic diagram of the text information processing method provided by the embodiment of the present application is shown in the figure;
[0067] Figure 4 An optional display effect schematic diagram of the text information processing method provided by the embodiment of the present application is shown in the figure;
[0068] Figure 5 The composition structure schematic diagram of the text information processing device provided by the embodiment of the present application is shown in the figure;
[0069] Figure 6 An optional flow schematic diagram of the text information processing method provided by the embodiment of the present application is shown in the figure
[0070] Figure 7 An optional flow schematic diagram of the text information processing method provided by the embodiment of the present application is shown in the figure;
[0071] Figure 8 An optional flow schematic diagram of the text information processing method provided by the embodiment of the present application is shown in the figure;
[0072] Figure 9 The data structure schematic diagram of the text information processing method provided by the embodiment of the present application is shown in the figure;
[0073] Figure 10 The data structure schematic diagram of the text information processing method provided by the embodiment of the present application is shown in the figure;
[0074] Figure 11 An optional display effect schematic diagram of the text information processing method provided by the embodiment of the present application is shown in FIG. 1;
[0075] Figure 12 An optional display effect schematic diagram of the text information processing method provided by the embodiment of the present application is shown in FIG. 1;
[0076] Figure 13 An optional display effect schematic diagram of the text information processing method provided by the embodiment of the present application is shown in FIG. 1;
[0077] Figure 14 An architecture schematic diagram of the text information processing device 100 provided by the embodiment of the present application is shown in FIG. 1;
[0078] Figure 15 A structure schematic diagram of a blockchain in the blockchain network 200 provided by the embodiment of the present application is shown in FIG. 1;
[0079] Figure 16 A function architecture schematic diagram of the blockchain network 200 provided by the embodiment of the present application is shown in FIG. 1. DETAILED DESCRIPTION
[0080] In order to make the objects, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings, and the described embodiments should not be regarded as limiting the present application. All other embodiments obtained by those of ordinary skill in the art without making creative efforts fall within the scope of protection of the present application.
[0081] In the following description, “some embodiments” are related to a subset of all possible embodiments, but it can be understood that “some embodiments” can be the same subset or different subsets of all possible embodiments, and can be combined with each other without conflict.
[0082] In the application of the related data collection and processing in the embodiments of the present application, the informed consent or separate consent of the personal information subject should be obtained strictly according to the requirements of the relevant laws and regulations, and the subsequent data use and processing should be carried out within the scope of authorization of the laws and regulations and the personal information subject.
[0083] Before the embodiments of the present application are further described in detail, the terms and phrases involved in the embodiments of the present application are explained, and the terms and phrases involved in the embodiments of the present application are applicable to the following explanations.
[0084] 1) DataTransfer, when reading and writing data operations are carried out, the DataTransfer object is used to save the data dragged to the browser through the drag and drop action. It can save one or more data, one or more data types. This object can be obtained from the dataTransfer attribute of all drag events, but cannot be created alone.
[0085] 2) terminal, including but not limited to: general terminal, special terminal, wherein the general terminal maintains a long connection and / or a short connection with the sending channel, and the special terminal maintains a long connection with the sending channel.
[0086] 3) client, a carrier for implementing specific functions in a terminal, for example, a mobile client (APP) is a carrier for specific functions in a mobile terminal, such as executing a live broadcast function or an online video playing function.
[0087] 4) in response to, used to indicate the conditions or states on which the operations performed depend, when the dependent conditions or states are met, one or more operations performed can be real-time or have a set delay; in the absence of special instructions, there is no restriction on the execution sequence of multiple operations performed.
[0088] 5) ClipboardEvent, ClipboardEvent is a web api interface provided by webview, which describes events related to modifying the clipboard, including cut, copy and paste events.
[0089] 6) ClipboardEvent.clipboardData, ClipboardEvent.clipboardData attribute saves a DataTransfer object, which can be used to describe which data can be put into the clipboard by the cut and copy event handler, usually by calling the setData(format, data) method, and the data copied into the clipboard by the paste event handler, usually by calling the getData(format) method.
[0090] 7) setData, the ataTransfer.setData() method is used to set the drag data for a drag and drop operation to the specified data and type. If the data for the given type does not exist, it is added to the end of the drag data store, so that the last item in the types list will be the new type. If the data for the given type already exists, the existing data is replaced in the same position. That is, the order of the types list is not changed when replacing data of the same type. Example data types are: "text / plain" and "text / uri-list", text / html.
[0091] 8) getData, the DataTransfer.getData() method takes a drag and drop (in the form of a DOMString) of the specified type. If the drag and drop behavior has not manipulated any data, an empty string is returned. Data types are: text / plain, text / html, text / uri-list.
[0092] 9) UIPasteboard: The UIPasteboard class provides a pasteboard: a protected area in an app or between apps to share data. The class provides methods to read items of data from the pasteboard and to write items of data to the pasteboard for pasting.
[0093] 10) UIKit, the UIKit framework provided in IOS implements the copy-paste-paste capability in the UITextView and UITextField classes.
[0094] 11) Micro Document Process: Micro Document Process is a document product provided in WeChat Enterprise, which can support multiple people to edit / view the same document content online, and can solve the product form of document content collaboration in daily office work.
[0095] 12) CS Instruction: The CS instruction in the micro document is used to provide the instruction content for the synchronization of the editing content with the background data when multiple people collaborate online, and can be used to solve the conflict when editing content.
[0096] 13) Abstract Syntax Tree (AST), or Syntax Tree, is a tree-like representation of the abstract syntax structure of source code, which can specifically refer to the source code of a programming language.
[0097] 14) Transaction, equivalent to the computer term "transaction", a transaction includes an operation that needs to be submitted to the blockchain network for execution, and is not only a transaction in the business context, given that the term "transaction" is used by convention in blockchain technology, the embodiments of the present application follow this convention.
[0098] For example, a Deploy transaction is used to install a specified smart contract into a node in the blockchain network and prepare it to be called; an Invoke transaction is used to append a record of a transaction in the blockchain by calling a smart contract, and to operate 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).
[0099] 15) Block chain, a storage structure of encrypted, chained transactions formed by blocks.
[0100] For example, the header of each block can include the hash values of all transactions in the block, as well as the hash values of all transactions in the previous block, so as to achieve tamper-proofing and forgery-proofing of the transactions in the block based on the hash values; newly generated transactions are filled into a block and, after consensus by the nodes in the blockchain network, are appended to the tail of the block chain to form a chained growth.
[0101] 16) Block chain Network, a collection of nodes that incorporate new blocks into the block chain through consensus.
[0102] 17) Ledger, a general term for the block chain (also referred to as ledger data) and the state database synchronized with the block chain.
[0103] Among them, the block chain is recorded in the form of files in the file system; the state database is recorded in the form of different types of key (Key) value (Value) pairs to record the transactions in the block chain, to support fast query of transactions in the block chain.
[0104] 18) Smart Contracts, also known as Chain code or application code, programs deployed in nodes in the blockchain network, nodes execute the smart contract called in the received transaction to update or query the key-value pair data of the ledger database.
[0105] 19)Consensus, is a process in the blockchain network, used to reach an agreement on the transaction in the block between multiple nodes involved, the agreed block will be added to the tail of the blockchain, the mechanism to achieve consensus includes Proof of Work (Po W), Proof of Stake (PoS), Delegated Proof-of-Stake (DPoS), Proof of Elapsed Time (Po ET) and so on.
[0106] The text information processing method provided by the embodiment of the application is described below by taking the WeChat application as an example of instant messaging software in a social environment, wherein, Figure 1 The use environment of the text information processing method provided by the embodiment of the application is shown in FIG. 1. Figure 1 The terminal (including terminal 10-1 and terminal 10-2) is provided with a corresponding WeChat client that can be deployed as an instant messaging client. The user can obtain and display different social information through the corresponding client, and copy and paste the text information in different documents in the social information to be used. The terminal is connected to the server 200 through the network 300. The network 300 can be a wide area network or a local area network, or a combination of the two, and the data transmission is realized by using a wireless link.
[0107] As an example, the server 200 is used to deploy the text information processing device to realize the text information processing method provided by the application, to listen to the selection operation of the content in the terminal display interface through the instant messaging client server, and to obtain the text information to be processed stored in the clipboard process. The text information format selection instruction sent by the terminal is received, and the text information format matched with the text information to be processed is determined according to the text information format selection instruction. Different processing processes are triggered based on the text information format matched with the text information to be processed, the text processing instruction matched with the text information format of the text information is formed, and is sent to the terminal to realize the processing of the text information to be processed stored in the clipboard process.
[0108] Similarly, as an example, terminals (including terminals 10-1 and 10-2) can also deploy corresponding text information processing devices to achieve the selection operation of content in the terminal display interface. The selection operation is used to select corresponding text information in the display interface via button or touch commands; in response to the selection operation, the text information to be processed stored in the clipboard process is determined; a text information format selection command is received and sent to the corresponding instant messaging client server; a text processing command is received from the instant messaging client server; and in response to the text processing command, the text information to be processed stored in the clipboard process is processed according to the corresponding text information format. Of course, the text information processing device provided by this invention can 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 social software (instant messaging clients) for information interaction, and the final text information processing result is presented on the user interface for the user to view. The text information obtained by the user in the current display interface can also be called by other applications.
[0109] However, in the process of processing text information, although instant messaging software provides copy and paste components, the copied content cannot be selected to retain the HTML format. Text content that does not require HTML format cannot be used and needs to be edited again. At the same time, the copied text content does not allow users to choose whether to retain the format, which is not conducive to improving the user experience.
[0110] The structure of the text information processing device according to an embodiment of the present invention will be described in detail below. The text information processing device can be implemented in various forms, such as a dedicated terminal with text information processing function, or a server equipped with text information processing function, for example, the preceding... Figure 1 Server 200 in the middle. Figure 2 This is a schematic diagram of the composition structure of the text information processing device provided in the embodiments of the present invention. It can be understood that... Figure 2 The diagram shows only an exemplary structure of the text information processing device, not the entire structure; implementation is possible as needed. Figure 2 The structure shown may be part or all of the structure.
[0111] The text information processing apparatus provided in the embodiments of the present application comprises at least one processor 201, a memory 202, a user interface 203 and at least one network interface 204. The various components in the text information processing apparatus are coupled together through a bus system 205. It can be understood that the bus system 205 is used to realize the connection communication between the components. The bus system 205 comprises a data bus, a power supply bus, a control bus and a status signal bus, but for the purpose of clear illustration, all the buses are marked as the bus system 205 in the Figure 2
[0112] The user interface 203 can comprise a display, a keyboard, a mouse, a trackball, a click wheel, a key, a button, a touchpad or a touch screen, etc.
[0113] It can be understood that the memory 202 can be a volatile memory or a non-volatile memory, and can also comprise both volatile and non-volatile memories. The memory 202 in the embodiments of the present application can store data to support the operation of the terminal (such as 10-1). Examples of the data include any computer programs used for operating on the terminal (such as 10-1), such as an operating system and an application program. The operating system comprises various system programs, for example, a framework layer, a core library layer, a driver layer, etc., for realizing various basic services and processing hardware-based tasks. The application program can comprise various application programs.
[0114] In some embodiments, the text information processing apparatus provided in the embodiments of the present application can be realized in a combination of software and hardware. As an example, the text information processing apparatus provided in the embodiments of the present application can 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 application. For example, the processor in the form of a hardware decoding processor can adopt 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 elements.
[0115] As an example of the text information processing device provided in this embodiment of the invention, which is implemented using a combination of hardware and software, the text information processing device provided in this embodiment of the invention can be directly embodied as a combination of software modules executed by processor 201. The software modules can be located in a storage medium, which is located in memory 202. Processor 201 reads the executable instructions included in the software modules in memory 202 and combines them with necessary hardware (e.g., including processor 201 and other components connected to bus 205) to complete the text information processing method provided in this embodiment of the invention.
[0116] As an example, processor 201 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., wherein the general-purpose processor can be a microprocessor or any conventional processor, etc.
[0117] As an example of the hardware implementation of the text information processing device provided in the embodiments of the present invention, the device provided in the embodiments of the present invention can be directly executed by a processor 201 in the form of a hardware decoding processor. For example, it can be 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 in the embodiments of the present invention.
[0118] In this embodiment of the invention, the memory 202 is used to store various types of data to support the operation of the text information processing device. Examples of such data include: any executable instructions for operation on the text information processing device, such as executable instructions that can be included in a program implementing the text information processing method of this embodiment of the invention.
[0119] In other embodiments, the text information processing apparatus provided in this invention can be implemented in software. Figure 2The text information processing apparatus stored in the memory 202 is shown, which can be software in the form of programs and plug-ins, and includes a series of modules. As an example of the programs stored in the memory 202, the text information processing apparatus can 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 embodiments of the present application will be implemented, wherein the functions of the various software modules in the text information processing apparatus include:
[0120] The first information transmission module 2081 is configured to obtain a selection operation on the content in the display interface of the terminal, wherein the selection operation is used to select the corresponding text information in the display interface through a key or touch instruction.
[0121] The first information processing module 2082 is configured to determine the text information to be processed stored in the clipboard process in response to the selection operation.
[0122] 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 the corresponding instant messaging client server.
[0123] The first information transmission module 2081 is configured to receive a text processing instruction sent by the instant messaging client server.
[0124] The first information processing module 2082 is configured to process the text information to be processed stored in the clipboard process according to the corresponding text information format in response to the text processing instruction.
[0125] In combination with Figure 2 The text information processing apparatus shown illustrates the text information processing method provided by the embodiments of the present application. Referring to Figure 3 , Figure 3 For an optional flowchart of the text information processing method provided by the embodiments of the present application, it can be understood that Figure 3 The steps shown can be executed by various electronic devices running the text information processing apparatus, for example, it can be a server or a server cluster with the text information processing apparatus, wherein the special terminal with the text information processing apparatus can be encapsulated in Figure 1 The server shown to execute the corresponding software modules in the text information processing apparatus shown in Figure 2 The following will be described with respect to the steps shown in Figure 3 .
[0126] Step 301: The text information processing apparatus obtains a selection operation on the content in the display interface of the terminal.
[0127] The selection operation is used to select the corresponding text information in the display interface by a key or touch instruction.
[0128] Step 302: The text information processing device determines the text information to be processed stored in the clipboard process in response to the selection operation.
[0129] The reference Figure 4 , Figure 4 An optional display effect schematic diagram of the text information processing method provided by the embodiment of the application is provided, wherein the instant messaging software in the social environment is taken as the WeChat Enterprise application program as an example. The WeChat Enterprise involved in the application is a basic office communication tool for enterprise level. The enterprise can realize basic management and efficiency communication function through the WeChat Enterprise. Referring to Figure 4 , the micro document process of the WeChat Enterprise provides the function of supporting the original html format and the complete pure text format when copying the text information. The complete pure text format that can be reserved by the micro document process of the WeChat Enterprise can be expressed as the text information displayed without any text modification, without any bold, underline, italic, graphics, symbol or special character and special printing format text. Only the text content is saved, the format setting of the text content is not saved, and all section symbols, page symbols, new line characters are converted into paragraph marks to avoid the influence of the format setting on the display of the text information. Further, taking the IOS system as an example, the UIKit framework is provided for the developer. The framework provides the method and mechanism required for realizing the copy, cut and paste in the app. The IOS client function UIKit related interface capability supplement includes:
[0130] The UIPasteboard class provides the clipboard: a protected area for sharing data in the app or between apps. The class provides methods that can read the items of data from the clipboard and write the items of data to the clipboard process;
[0131] The UIMenuController class displays an edit button above or below the selected text to copy, cut, or paste. The default edit menu commands include: copy, cut, paste, select, and select all, and of course adding custom menu items to the edit menu. Further, the UIResponder class declares the canPerformAction:withSender: method. Responder classes can implement this method to display and remove commands from the edit menu based on the current content. Further, the UIResponderStandardEditActions informal protocol declares the interface for handling the copy, cut, paste, select, and select all commands. When the user triggers any of the commands in the edit menu, the corresponding UIResponderStandardEditActions method is called.
[0132] Step 303: The text information processing device receives the text information format selection instruction and sends the text information format selection instruction to the corresponding instant messaging client server.
[0133] Step 304: The text information processing device receives the text processing instruction sent by the instant messaging client server.
[0134] In some embodiments of the present application, the clipboard is a standardized mechanism for exchanging data within or between apps. The clipboard is most commonly used to handle copy, cut, and paste operations: when the user selects data in an app and selects the copy (or cut) command, the selected data is placed on the clipboard. When the user selects the paste command (which can be in the same or a different app, and can be triggered by the system to share between different apps, such as pasting text information in a personal WeChat client into the display interface of an enterprise WeChat client), the data on the clipboard is copied into the current app, and the user can choose whether the paste format needs to be html format.
[0135] Further, for the copied rich text or HTML, PDF, and plain text representation of the copied data. The rich text (Rich Text Format) is a cross-platform document format. With built-in compatibility, it is easy to dump formatted text and graphics between applications, and a clipboard item includes representations of all data items that an app can provide. Each clipboard item representation is typically identified by a unique type identifier (UTI Unique Type Identifier), which is a simple string that serves as a unique marker for a particular data type.
[0136] UTI provides a general method for marking data types. If custom data types need to be supported, a unique identifier must be created for them. For example, reverse-DNS notation can be used to represent type strings to ensure uniqueness.
[0137] In some embodiments of the present invention, WeChat for Enterprise (an instant messaging client) also supports the selection of rich text and images. The rich text and the Unicode version of the selected text, as well as different representations of the selected image, are placed in the clipboard. Each representation of each item stores its own data. In some embodiments of the present invention, to maximize the sharing effect, clipboard items can contain as many different representations as possible; correspondingly, the clipboard reader needs to find the data type best suited to its functionality.
[0138] Step 305: 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.
[0139] Furthermore, when a user triggers a copy operation, the WeChat Work client can write the text information to the clipboard in either HTML or plain text format. When the user triggers the paste action in the WeChat Document process, the client calls the JSAPI interface provided by the WeChat Document process to read the data from the clipboard and pass it to the WeChat Document web page based on the user's selected HTML or plain text type.
[0140] In this process, when the processed text information is applied to other clients, the identifier of the target client in the data migration component process can be determined. Based on the identifier of the target client, the text information to be processed stored in the clipboard process is processed to achieve pasting or cutting of the text information to be processed. This can avoid the defect of repeated editing when users use the same text information in different clients, effectively improve the processing speed of text information, and enhance the user experience.
[0141] The structure of the server in this embodiment of the invention will be described in detail below. The server provided in this application embodiment can deploy a text information processing device to implement a text information processing method. It can be a dedicated server with text information processing device processing capabilities, or a server equipped with an instant messaging client that has text information processing device processing capabilities, such as the one mentioned earlier. Figure 1 Server 200. Figure 5 This is a schematic diagram of the composition structure of the text information processing device provided in the embodiments of the present invention. It can be understood that... Figure 5 Only an exemplary structure of the text information processing device is shown, not the entire structure; it can be implemented as needed.Figure 5 part of the structure or the whole structure.
[0142] The text information processing apparatus provided by the embodiments of the present application comprises at least one processor 401, a memory 402, a user interface 403 and at least one network interface 404. The various components in the text information processing apparatus are coupled together through a bus system 405. It can be understood that the bus system 405 is used to realize the connection communication between the components. The bus system 405 comprises a data bus, a power supply bus, a control bus and a status signal bus in addition to the data bus. However, for the purpose of clear illustration, all the buses are marked as the bus system 405 in the Figure 5 embodiments of the present application.
[0143] The user interface 403 can comprise a display, a keyboard, a mouse, a trackball, a click wheel, a key, a button, a touchpad or a touch screen, etc.
[0144] It can be understood that the memory 402 can be a volatile memory or a non-volatile memory, and can also comprise both volatile and non-volatile memories. The memory 402 in the embodiments of the present application can store data to support the operation of the terminal (such as 10-1). Examples of the data include any computer programs for operating on the terminal (such as 10-1), such as an operating system and an application program. The operating system comprises various system programs, for example, a framework layer, a core library layer, a driver layer, etc., for realizing various basic services and processing hardware-based tasks. The application program can comprise various application programs.
[0145] In some embodiments, the text information processing apparatus provided by the embodiments of the present application can be realized in a combination of software and hardware. As an example, the text information processing apparatus provided by the embodiments of the present application can be a processor in the form of a hardware decoding processor, which is programmed to execute the text information processing method provided by the embodiments of the present application. For example, the processor in the form of a hardware decoding processor can adopt 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 elements.
[0146] As an example of the text information processing device provided in this embodiment of the invention, which is implemented using a combination of hardware and software, the text information processing device provided in this embodiment of the invention can be directly embodied as a combination of software modules executed by processor 401. The software modules can be located in a storage medium, which is located in memory 402. Processor 401 reads the executable instructions included in the software modules in memory 402 and combines them with necessary hardware (e.g., including processor 401 and other components connected to bus 405) to complete the text information processing method provided in this embodiment of the invention.
[0147] As an example, processor 401 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., wherein the general-purpose processor can be a microprocessor or any conventional processor, etc.
[0148] As an example of the hardware implementation of the text information processing device provided in the embodiments of the present invention, the device provided in the embodiments of the present invention can be directly executed by a processor 401 in the form of a hardware decoding processor. For example, it can be 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 in the embodiments of the present invention.
[0149] In this embodiment of the invention, the memory 402 is used to store various types of data to support the operation of the text information processing device. Examples of such data include: any executable instructions for operation on the text information processing device, such as executable instructions that can be included in a program implementing the text information processing method of this embodiment of the invention.
[0150] In other embodiments, the text information processing apparatus provided in this invention can be implemented in software. Figure 5A text information processing device stored in memory 402 is shown. This device can be software in the form of programs and plugins, and includes a series of modules. As an example of a program stored in memory 402, it may include the text information processing device. The text information processing device includes 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 device are read into RAM and executed by processor 401, the text information processing method provided in this embodiment of the invention will be implemented. The functions of each software module in the text information processing device include:
[0151] The second information transmission module 4081 is used to listen to the selection operation of the content displayed on the interface terminal through the instant messaging client server, and to obtain the text information to be processed stored in the clipboard process.
[0152] The second information processing module 4082 is used to receive a text information format selection instruction sent by the terminal, and determine a text information format that matches the text information to be processed according to the text information format selection instruction;
[0153] The second information processing module 4082 is used to trigger different processing processes based on the text information format that matches the text information to be processed, to form a text processing instruction that matches the text information format of the text information, and to send it to the terminal, so as to process the text information to be processed stored in the clipboard process.
[0154] Combination Figure 5 The illustrated text information processing apparatus illustrates the text information processing method provided in the embodiments of the present invention. See also: Figure 6 , Figure 6 This is an optional flowchart illustrating a text information processing method provided in an embodiment of the present invention. It can be understood that... Figure 6 The steps shown can be performed by various electronic devices running text information processing devices, such as servers or server clusters equipped with text information processing devices, wherein a dedicated terminal equipped with a text information processing device can be encapsulated within... Figure 1 In the server shown, to execute the pre-processor Figure 5 The corresponding software modules in the text information processing device shown. The following section addresses... Figure 6 The steps shown are explained.
[0155] Step 601: The text information processing device listens to the selection operation of the content displayed on the interface terminal through the instant messaging client server and obtains the text information to be processed stored in the clipboard process.
[0156] Step 602: The text information processing apparatus receives a text information format selection instruction sent by the terminal, and determines a text information format matched with the text information to be processed according to the text information format selection instruction.
[0157] Step 603: The text information processing apparatus triggers different processing procedures based on the text information format matched with the text information to be processed, forms a text processing instruction matched with the text information format of the text information, and sends the text processing instruction to the terminal.
[0158] Therefore, the text information to be processed stored in the cutboard procedure can be processed.
[0159] In some embodiments of the present application, the different processing procedures triggered based on the text information format matched with the text information to be processed, and the text processing instruction matched with the text information format of the text information can be realized by the following ways:
[0160] When the text information format matched with the text information to be processed is a pure text format, the position information of the cursor in the display interface of the terminal and the paragraph format information in the display interface of the terminal are determined, and a first text processing instruction matched with the pure text format of the text information is formed based on the position information of the cursor and the paragraph format information. The pure text format text information can be sent to different users as chat content to be edited by the user in the instant messaging client, and the pure text format text information can be processed by a format text editor, for example, a text editor supporting text information format editing and recognition, such as a rich text editor (RTE Rich Text Editor).
[0161] In some embodiments of the present application, the format text editor can be embedded into the corresponding component of the instant messaging client, so that the user can edit the text content and the text information format in time. In order to facilitate the user to edit the text content and the text information format, a content editing area can be set in the message interaction interface in the display interface, so as to write and display the text content. The user can input the text content in the content editing area, and the terminal receives the text input of the user through the format text editor.
[0162] In some embodiments of the present application, the different processing procedures triggered based on the text information format matched with the text information to be processed, and the text processing instruction matched with the text information format of the text information can be realized by the following ways:
[0163] When the text information format matched with the to-be-processed text information is a hypertext markup language format, a data structure corresponding to the hypertext markup language format is determined; through a text processing process in the instant messaging client, style information and a corresponding document object model object structure of the hypertext markup language format in the to-be-processed text information are determined; based on the style information and the corresponding document object model object structure of the hypertext markup language format in the to-be-processed text information, a text processing instruction matched with the hypertext markup language format is determined through the data structure corresponding to the hypertext markup language format. Wherein, when the micro-document process Web is loaded in the Webview, the onPaste event is listened through the Web Api listening interface provided by the Webview, when the user operates to paste, the logic of the Web side is notified through the callback of listening to this event, the content to be pasted in the terminal clipboard is obtained through the Clipboard Event.clipboardData in the callback function, at this time, the content has two types of data, which are respectively obtained through clipboardData.getData('text / html') or clipboardData.getData('text / plain') html format content or pure text text information format data.
[0164] In some embodiments of the application, the method further comprises:
[0165] Determine the position information of the cursor in the terminal display interface, and the paragraph format information in the terminal display interface; based on the position information of the cursor and the paragraph format information, determine the instruction information recognizable by the text processing process in the instant messaging client; based on the data structure corresponding to the hypertext markup language format, the instruction information recognizable by the text processing process in the instant messaging client is fused to form the second text processing instruction matched with the hypertext markup language format. In combination with the preceding embodiment, the micro-document process provides two ways to select html or pure text paste mode, when the user selects the paste with html format style, the data of the clipboard can be obtained through clipboardData.getData('text / html'). Wherein, the data structure is the data structure style of AST (document noun position description), the micro-document process analyzes the AST data structure, obtains the current pasted html style and dom structure, and further obtains the data structure used to write into the micro-document process, but the data needs to be converted into CS instructions through the processing logic of the micro-document process.
[0166] Wherein, see Figure 7 , Figure 7An optional flowchart of the text information processing method provided by the embodiment of the application is shown in the figure, wherein the instant messaging client is WeChat for Enterprise, the text processing process is a micro-document process provided by WeChat for Enterprise, and the text processing process server can execute different processing logics according to different text information formats, and the specific process includes the following steps.
[0167] Step 701: The WeChat for Enterprise client generates html and text format text data.
[0168] Step 702: The Webview component notifies the micro-document server of the paste event.
[0169] Step 703: The micro-document server listens to the event to obtain clipboardData.getData('text / html').
[0170] Step 704: The micro-document server selects the html format or the Texthtml format to convert into a corresponding ast to obtain a data structure and add the data structure to the document.
[0171] Step 705: The WeChat for Enterprise performs text information processing according to the clipboard data.
[0172] In some embodiments of the application, the method further includes:
[0173] The instant messaging client server detects the operation history of different users to record the text processing instructions generated when the different users operate the to-be-processed text; the recorded text processing instructions are used to update the document corresponding to the to-be-processed text information; when the document corresponding to the to-be-processed text information is woken up by a new target user, the displayed document content is adjusted through the recorded text processing instructions generated when the different users operate the to-be-processed text, so that the document contents obtained by the different users are consistent.
[0174] In some embodiments of the application, the method further includes: Figure 8 , Figure 8 An optional flowchart of the text information processing method provided by the embodiment of the application is shown in the figure, wherein the instant messaging client is WeChat for Enterprise, the text processing process is a micro-document process provided by WeChat for Enterprise, and the text processing process server can execute different processing logics according to different text information formats, and the specific process includes the following steps.
[0175] Step 801: Obtain the logic of a connectionless pure http.
[0176] Step 802: Convert the long connection request into an http request and send the request to the logic layer for processing.
[0177] Step 803: The long connection push client requests to send to the corresponding server.
[0178] Step 804: The server stores logic and queries to send push to docpush.
[0179] Further, referring to Figure 9 and Figure 10 , Figure 9 the data structure diagram of the text information processing method provided by the embodiment of the present application, Figure 10 the data structure diagram of the text information processing method provided by the embodiment of the present application, after the micro document process acquires the pasted html data structure, the current cursor position to be inserted and the default style of the current paragraph are integrated into the CS instruction available in the micro document process; specifically, the CS instruction in the micro document process can be used to record and store content according to the data structure shown in Figure 9 .
[0180] Wherein, 1) AText, which describes the content and format of the entire document, is a json string. The text part represents the content of the document, including line break symbols. 2) The attribs part represents the description of the format, Figure 9 The string meaning shown in the above formula is: 9 bytes with 0, 1 attributes, 1 byte per line with attribute 0, b (36) bytes with attributes 0, 1, 2, 2 bytes per 2 lines; Here, the numbers only represent attribute serial numbers, and the specific attributes are described in another component APOOL. That is, the attribute pool. 3) The attribute pool is an object. It describes the corresponding relationship of the attributes, and there will be positive and negative mappings. Wherein, when AText describes the content and format of the document, the attributes can be expressed as a pair type of data, which is the same as the bold, true or bold, false attribute. Specifically, "0" represents the identifier of the modifier information. If there are multiple modifiers, they will appear in the data group in the corresponding modification order. In the same document information, an attribute pair is unique, and the compression of the format description character can be realized through the unique attribute pair at a time.
[0181] Wherein, referring to Figure 11 , Figure 12 and Figure 13After the micro-document process converts the pasted data into CS instructions, the micro-document process sends the CS instruction data of the user to the common proxy in the background through the long link of the Websocket, the common proxy initiates the merging operation of the document instruction by calling the interface provided by the document proxy interface proxy layer, merges the new CS instruction content with the original document data, and records the data into the instruction pool, and writes the data into the document background storage according to the time or a certain instruction quantity.
[0182] After the background (server) receives the newly written CS instruction of the user, the background (server) pushes the CS instruction to other users who open the micro-document through the long link, and the micro-document merges the received CS instruction with the local data, and performs data merging through the OT merging algorithm to obtain the final result to be displayed locally.
[0183] Reference Figure 11 , Figure 11 An optional display effect schematic diagram of the text information processing method provided by the embodiment of the application is shown in FIG. 6. If the user selects to paste the html style into the document, the text, the background, and the paragraph style related format can be reserved through the front-end display interface. The copied html style depends on the style information recorded on the html mark of the copied content, and the micro-document is transformed into the performance of the document in a reasonable manner.
[0184] Reference Figure 12 , Figure 12 An optional display effect schematic diagram of the text information processing method provided by the embodiment of the application is shown in FIG. 6. If the user selects to paste the html style into the document, the text, the background, and the paragraph style related format can be reserved through the front-end display interface. The copied html style depends on the style information recorded on the html mark of the copied content, and the micro-document is transformed into the performance of the document in a reasonable manner.
[0185] Reference Figure 13 , Figure 13 An optional display effect schematic diagram of the text information processing method provided by the embodiment of the application is shown in FIG. 6. If the user selects to paste the html style into the document, the text, the background, and the paragraph style related format can be reserved through the front-end display interface. The copied html style depends on the style information recorded on the html mark of the copied content, and the micro-document is transformed into the performance of the document in a reasonable manner.
[0186] Thus, the micro-document of the instant messaging client supports, after the client copies the content, identifying the content of the clipboard, supporting conversion of the content into an html format or a plain text format of normal text, so that the mobile terminal can select format-based copy and paste and non-format-based copy and paste when copying, and after selecting the content in different formats, the content can be pasted into the micro-document to record important information and data. Meanwhile, by selecting whether to retain the html format or use the plain text format, different data backup scenarios can be met, whether the original data format needs to be retained can be flexibly controlled, additional editing costs are reduced, and the efficiency of daily collaboration is further improved.
[0187] In some embodiments of the present application, in order to store the corresponding data through the blockchain network, the text information method provided by the present application further comprises:
[0188] sending the user identifier, the text processing instruction, the to-be-processed text information, and the document corresponding to the to-be-processed text information to the blockchain network, so that a node of the blockchain network fills the user identifier, the text processing instruction, the to-be-processed text information, and the document corresponding to the to-be-processed text information into a new block, and when a consensus is reached on the new block, the new block is appended to the tail of the blockchain.
[0189] In the present application, the embodiment can be implemented in combination with cloud technology. Cloud technology refers to a kind of hosting technology that unifies a series of resources such as hardware, software and network in a wide area network or a local area network to realize data calculation, storage, processing and sharing. It can also be understood as a general term for network technology, information technology, integration technology, management platform technology and application technology based on cloud computing business model application. The background service of the technical network system requires a large amount of computing and storage resources, such as video websites, picture websites and more portal websites, so cloud technology needs to be supported by cloud computing.
[0190] It should be noted that cloud computing is a computing mode that distributes computing tasks on a resource pool composed of a large number of computing machines, so that various application systems can obtain computing power, storage space and information services according to needs. The network providing resources is called "cloud". The resources in the "cloud" can be infinitely expanded in the eyes of the user, and can be obtained at any time, used on demand, expanded at any time, and paid according to use. As a basic capability provider of cloud computing, a cloud computing resource pool platform, referred to as a cloud platform, is generally called Infrastructure as a Service (IaaS), and a variety of types of virtual resources are deployed in the resource pool for external customers to choose and use. The cloud computing resource pool mainly includes: computing devices (which can be virtualized machines, including operating systems), storage devices and network devices.
[0191] In combination with the foregoing Figure 1 As shown in the figures, the text information processing method provided by the embodiments of the present application can be implemented by a corresponding cloud device, for example, a terminal (including terminal 10-1 and terminal 10-2) connects a server 200 located in the cloud through a network 300, which can be a wide area network or a local area network, or a combination of the two. It should be noted that the server 200 can be a physical device or a virtualized device.
[0192] In some embodiments of the present application, a data synchronization request of other nodes in the blockchain network can also be received; in response to the data synchronization request, the authority of the other nodes is verified; when the authority of the other nodes is verified, the current node is controlled to synchronize data with the other nodes, so that the other nodes obtain the user identifier, the text processing instruction, the text information to be processed, and the document corresponding to the text information to be processed.
[0193] Referring to Figure 14 , Figure 14 is a schematic diagram of the architecture of the text information processing device 100 provided by the embodiments of the present application, which includes a blockchain network 200 (exemplarily showing consensus nodes 210-1 to 210-3), an authentication center 300, a business principal 400, and a business principal 500, which will be described below.
[0194] The type of the blockchain network 200 is flexible and diverse, for example, it can be any one of a public chain, a private chain, or an alliance chain. Taking the public chain as an example, any electronic device of a business principal, such as a user terminal and a server, can access the blockchain network 200 without authorization; taking the alliance chain as an example, the electronic devices (such as terminals / servers) under the jurisdiction of a business principal can access the blockchain network 200 after being authorized, at which time, they become client nodes in the blockchain network 200.
[0195] In some embodiments, the client node can only serve as an observer of the blockchain network 200, that is, it provides a function of supporting a business principal to initiate a transaction (for example, for storing data on the chain or querying data on the chain), and it can default or selectively implement (for example, depending on the specific business needs of the business principal) the functions of the consensus nodes 210 of the blockchain network 200, such as sorting functions, consensus services, and ledger functions. Thus, the data and business processing logic of the business principal can be migrated to the blockchain network 200 to the greatest extent, and the data and business processing process can be realized by the blockchain network 200 to be trusted and traceable.
[0196] The consensus nodes in the blockchain network 200 receive client nodes (for example, Figure 14 the business principal 400 and the business principal 500 shown in the figures) from different business principals (for example,Figure 14 The various intermediate results or final results of the transactions executed to update the ledger or query the ledger can be returned to the client nodes of the business subjects, as shown in the client node 410 belonging to the business subject 400 and the client node 510 belonging to the business subject 500.
[0197] For example, the client nodes 410 / 510 can subscribe to events of interest in the blockchain network 200, such as transactions occurring in a specific organization / channel in the blockchain network 200, and the corresponding transaction notifications are pushed by the consensus nodes 210 to the client nodes 410 / 510, thereby triggering the corresponding business logic in the client nodes 410 / 510.
[0198] The following describes an exemplary application of the blockchain network by taking the access of multiple business subjects to the blockchain network to manage the processing results of text information as an example.
[0199] Referring to Figure 14 The multiple business subjects involved in the management link, such as the business subject 400, can be an artificial intelligence-based text information processing device, and the business subject 500 can be a display system with a text information processing function. They are registered and registered from the authentication center 300 to obtain their own digital certificates, which include the public key of the business subject and the digital signature signed by the authentication center 300 on the public key and identity information of the business subject, which is used together with the digital signature of the business subject for the transaction to be attached to the transaction and sent to the blockchain network. The blockchain network extracts the digital certificate and signature from the transaction to verify the reliability of the message (i.e., whether it has been tampered with) and the identity information of the business subject sending the message, and the blockchain network will verify the identity, such as whether it has the right to initiate the transaction. The client running on the electronic device (such as a terminal or a server) under the jurisdiction of the business subject can request access to the blockchain network 200 to become a client node.
[0200] The client node 410 of the business subject 400 is configured to listen to the selection operation of the content in the terminal display interface through the instant messaging client server, and obtain the text information to be processed stored in the clipboard process; receive the text information format selection instruction sent by the terminal, determine the text information format matched with the text information to be processed according to the text information format selection instruction; trigger different processing processes based on the text information format matched with the text information to be processed, form a text processing instruction matched with the text information format of the text information, and send it to the terminal to process the text information to be processed stored in the clipboard process, and send 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.
[0201] The user identifier, text processing instruction, to-be-processed text information, and document corresponding to the to-be-processed text information are sent to the blockchain network 200. The business logic can be set in advance in the client node 410. When the corresponding text information processing result is formed, the client node 410 automatically sends the user identifier, text processing instruction, to-be-processed text information, and document corresponding to the to-be-processed text information to the blockchain network 200. Alternatively, a business staff of the business subject 400 can log in the client node 410 manually, package the user identifier, text processing instruction, to-be-processed text information, and document corresponding to the to-be-processed text information, and send them to the blockchain network 200. When sending, the client node 410 generates a transaction corresponding to the update operation according to the user identifier, text processing instruction, to-be-processed text information, and document corresponding to the to-be-processed text information. The transaction specifies the smart contract to be called to implement the update operation and the parameters to be passed to the smart contract. The transaction also carries the digital certificate of the client node 410 and the digital signature (for example, the private key in the digital certificate of the client node 410 is used to encrypt the digest of the transaction) signed by the client node 410, and broadcasts the transaction to the consensus nodes 210 in the blockchain network 200.
[0202] When the transaction is received in the consensus nodes 210 in the blockchain network 200, the digital certificate and digital signature carried by the transaction are verified. After successful verification, whether the business subject 400 has the transaction authority is confirmed according to the identity of the business subject 400 carried in the transaction. Any verification judgment in the digital signature and authority verification will result in a failed transaction. After successful verification, the consensus node 210 signs its own digital signature (for example, the private key of the node 210-1 is used to encrypt the digest of the transaction), and continues to broadcast in the blockchain network 200.
[0203] After the transaction with successful verification is received in the consensus nodes 210 in the blockchain network 200, the transaction is filled into a new block and broadcasted. When the new block is broadcasted by the consensus nodes 210 in the blockchain network 200, a consensus process is performed on the new block. If the consensus is successful, the new block is appended to the tail of the blockchain stored by the consensus nodes 210, and the state database is updated according to the result of the transaction. The transaction in the new block is executed: for the transaction of submitting the update of the user identifier, text processing instruction, to-be-processed text information, and document corresponding to the to-be-processed text information, a key-value pair including the user identifier, text processing instruction, to-be-processed text information, and document corresponding to the to-be-processed text information is added to the state database.
[0204] The business personnel of the business subject 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 the smart contract to be called for implementing the update operation / query operation and the parameters to be passed to the smart contract in the transaction, and broadcasts the transaction to the consensus nodes 210 in the blockchain network 200.
[0205] The transaction is received in the consensus nodes 210 in the blockchain network 200, and after the transaction is verified, the block is filled and the consensus is consistent, the filled new block is appended to the tail of the blockchain stored by the consensus nodes 210, the state database is updated according to the result of the transaction, and the transaction in the new block is executed: for the transaction of submitting the update of the user identification, the text processing instruction, the text information to be processed and the document corresponding to the text information to be processed, the key-value pair corresponding to the text information processing result in the state database is updated according to the artificial recognition result; for the transaction of querying the text information processing result, the key-value pair corresponding to the text information processing result is queried from the state database, and the transaction result is returned.
[0206] It is worth noting that, in Figure 14 , the process of directly chaining the user identification, the text processing instruction, the text information to be processed and the document corresponding to the text information to be processed is exemplarily shown, but in other embodiments, for the case that the data amount of the text information processing result is large, the client node 410 can chain the hash of the text information processing result and the hash pair of the corresponding text information processing result, and store the original text information processing result and the corresponding text information processing result in the distributed file system or the database. After the client node 510 obtains the text information processing result and the corresponding text information processing result from the distributed file system or the database, the client node 510 can check the corresponding hash in the blockchain network 200, thereby reducing the workload of the chaining operation.
[0207] As an example of the blockchain, refer to Figure 15 , Figure 15 is a structural diagram of the blockchain in the blockchain network 200 provided by the embodiment of the present application. The header of each block can include the hash value of all transactions in the block, and also include the hash value of all transactions in the previous block. After the record of the new transaction is filled into the block and the consensus of the nodes in the blockchain network is passed, the record will be appended to the tail of the blockchain to form a chain-like growth. The chain-like structure based on the hash value between the blocks ensures the tamper resistance and anti-forgery of the transactions in the blocks.
[0208] The following describes an exemplary functional architecture of the blockchain network provided by the embodiments of the present application, referring to Figure 16 , Figure 16 is a functional architecture diagram of the blockchain network 200 provided by the embodiments of the present application, 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.
[0209] The resource layer 205 encapsulates the computing resources, storage resources and communication resources of each node 210 in the blockchain network 200.
[0210] The data layer 204 encapsulates various data structures for implementing the ledger, including the blockchain implemented in the form of files in the file system, the state database in the form of key-value and the proof of existence (for example, the hash tree of transactions in the block).
[0211] The network layer 203 encapsulates the functions of the point-to-point (P2P, Point to Point) network protocol, the data propagation mechanism and the data verification mechanism, the access authentication mechanism and the business subject identity management.
[0212] Among them, the P2P network protocol realizes the communication between the nodes 210 in the blockchain network 200, the data propagation mechanism ensures the propagation of transactions in the blockchain network 200, and the data verification mechanism is used to realize the reliability of data transmission between nodes 210 based on cryptographic methods (such as digital certificate, digital signature, public / private key pair); the access authentication mechanism is used to authenticate the identity of the business subject joining the blockchain network 200 according to the actual business scenario, and grant the business subject the right to access the blockchain network 200 when the authentication is passed; the business subject identity management is used to store the identity of the business subject allowed to access the blockchain network 200, and the right (such as the type of transaction that can be initiated).
[0213] The consensus layer 202 encapsulates the mechanism for nodes 210 in the blockchain network 200 to reach consensus on blocks (i.e. consensus mechanism), transaction management and ledger management functions. The consensus mechanism includes POS, POW and DP OS consensus algorithms, and supports pluggable consensus algorithms.
[0214] Transaction management is used to verify the digital signature carried in the transaction received by the node 210, verify the identity information of the business subject, and determine whether it has the right to transact according to the identity information (read related information from the business subject identity management); for the business subject authorized to access the blockchain network 200, it has a digital certificate issued by the authentication center, and the business subject signs the submitted transaction with its own private key in the digital certificate, thereby declaring its legal identity.
[0215] The account book management is used to maintain the blockchain and the state database. For the blocks that reach consensus, the blocks are appended to the tail of the blockchain; the transactions in the blocks that reach consensus are executed, the key-value pairs in the state database are updated when the transactions include update operations, the key-value pairs in the state database are queried and the query result is returned to the client node of the business subject when the transactions include query operations. The query operations of the state database in multiple dimensions are supported, including: querying the blocks according to the block vector number (for example, the hash value of the transaction); querying the blocks according to the block hash value; querying the blocks according to the transaction vector number; querying the transactions according to the transaction vector number; querying the account data of the business subject according to the account (vector number) of the business subject; querying the blockchain in the channel according to the channel name.
[0216] The application layer 201 encapsulates various businesses that can be implemented by the blockchain network, including the traceability of transactions, the evidence storage and the verification, etc.
[0217] Beneficial technical effects:
[0218] The embodiment of the application listens to the selection operation of the content in the interface terminal display interface through the instant messaging client server, and acquires the text information to be processed stored in the clipboard process; receives the text information format selection instruction sent by the terminal, determines the text information format matched with the text information to be processed according to the text information format selection instruction; triggers different processing processes based on the text information format matched with the text information to be processed, forms the text processing instruction matched with the text information format of the text information, and sends to the terminal, thereby the text information to be processed stored in the clipboard process can be processed, different requirements for the text information format in different use scenarios are met, the time for the user to edit the text information is reduced, and the efficiency of the text information processing is improved.
[0219] The above only describes the embodiments of the application, and is not used to limit the protection scope of the application, and any modification, equivalent replacement and improvement made within the spirit and principle of the application should be included in the protection scope of the application.
Claims
1. A method of processing text information, characterized by, The application is applied to a terminal, wherein an instant messaging client is run in the terminal, and the instant messaging client comprises a document process, and the method comprises: obtaining a selection operation on content in a display interface of the terminal through a listening interface of a web view of the instant messaging client, wherein the selection operation is used for selecting corresponding text information in the display interface through a key or a touch instruction; 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 server, wherein the document process provides a text information format of a hyper text markup language (HTML) format with format and a plain text format without format; receiving a text processing instruction sent by the server, wherein the text processing instruction is adapted to a data structure of the text information format; processing the text information to be processed stored in the clipboard process according to the corresponding text information format in response to the text processing instruction, wherein when a copy operation is triggered, the text information is written into the clipboard in the HTML format and the plain text format through the instant messaging client, and when a paste action is triggered in the document process, the text information in the clipboard is read according to the selected HTML format or the plain text format and is transmitted to a page of the document process by calling an interface provided by the document process.
2. The method of claim 1, wherein, The method further comprises: determining an identification of a target client in a data migration component process; processing the text information to be processed stored in the clipboard process based on the identification of the target client to realize the paste or the cut of the text information to be processed.
3. A method of processing text information, characterized by, The application is applied to a server, and the method comprises: obtaining a selection operation on content in a display interface of a terminal and obtaining text information to be processed stored in a clipboard process through a listening interface provided by a web view of an instant messaging client; receiving a text information format selection instruction sent by the terminal; determining a text information format matched with the text information according to the text information format selection instruction, wherein the text information format comprises an HTML format with format and a plain text format without format; triggering different processing processes based on the text information format matched with the text information to form a text processing instruction matched with the text information format of the text information, wherein the text processing instruction is adapted to a data structure of the text information format and is sent to the terminal to process the text information to be processed stored in the clipboard process.
4. The method of claim 3, wherein, The triggering of different processing processes based on the text information format matched with the text information to form the text processing instruction matched with the text information format of the text information comprises: when the text information format matched with the text information is the plain text format, determining position information of a cursor in the display interface of the terminal and paragraph format information in the display interface of the terminal; Form a first text processing instruction matching the plain text format of the text information based on the position information of the cursor and the paragraph format information.
5. The method of claim 3, wherein, The method further comprises: When the text information format matching the text information is an html format, determine a data structure corresponding to the html format; Determine the style information of the html format and the corresponding document object model object structure in the text information to be processed through the text processing process in the instant messaging client; Determine the text processing instruction matching the html format based on the style information of the html format and the corresponding document object model object structure in the text information to be processed through the data structure corresponding to the html format.
6. The method of claim 5, wherein, The method further comprises: Determine the position information of the cursor in the display interface of the terminal and the paragraph format information in the display interface of the terminal; Determine the instruction information recognizable by the text processing process in the instant messaging client based on the position information of the cursor and the paragraph format information; Fuse the instruction information recognizable by the text processing process in the instant messaging client based on the data structure corresponding to the html format to form the second text processing instruction matching the html format.
7. The method of claim 3, wherein, The method further comprises: Detect the operation history of different users to record the text processing instructions generated when different users operate the text information to be processed; Update the document corresponding to the text information to be processed based on the recorded text processing instructions; When the document corresponding to the text information to be processed is awakened by a new target user, adjust the displayed document content through the recorded text processing instructions generated when different users operate the text information to be processed to realize consistency of the document content obtained by different users.
8. The method according to any of claims 3-7, characterized by, The method further comprises: Send the user identifier, text processing instruction, text information to be processed, and document corresponding to the text information to be processed to the blockchain network to enable The nodes of the blockchain network fill the user identifier, text processing instruction, text information to be processed, and document corresponding to the text information to be processed into a new block, and when the consensus of the new block is consistent, append the new block to the tail of the blockchain.
9. The method of claim 8, wherein, The method further comprises: Receive a data synchronization request of other nodes in the blockchain network; In response to the data synchronization request, verify the authority of the other nodes; When the authority of the other nodes is verified, control the data synchronization between the current node and the other nodes to enable the other nodes to obtain the user identifier, text processing instruction, text information to be processed, and document corresponding to the text information to be processed.
10. The method of claim 9, wherein, The method further comprises: In response to a query request, parse the query request to obtain a corresponding object identifier; According to the object identifier, obtain the authority information in the target block in the blockchain network; The matching of the permission information and the object identifier is checked; When the permission information matches the object identifier, corresponding to-be-processed text information and a document corresponding to the to-be-processed text information in the blockchain network are obtained; In response to a query instruction, the obtained to-be-processed text information and the document corresponding to the to-be-processed text information are pushed to a corresponding client, so that the client obtains the corresponding to-be-processed text information and the document corresponding to the to-be-processed text information saved in the blockchain network.
11. A text information processing apparatus characterized by comprising: The application is applied to a terminal, an instant messaging client runs in the terminal, the instant messaging client includes a document process, and the device includes: A first information transmission module is configured to acquire a selection operation on content in a display interface of the terminal through a listening interface of a web view of the instant messaging client, wherein the selection operation is configured to select corresponding text information in the display interface through a key or a touch instruction. A first information processing module is configured to determine to-be-processed text information stored in a clipboard process in response to the selection operation. The first information processing module 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, wherein the document process provides text information formats of a hyper text markup language (HTML) format with format and a plain text format without format. The first information transmission module is configured to receive a text processing instruction sent by the server, wherein the text processing instruction is adapted to a data structure of the text information format. The first information processing module is configured to process the to-be-processed text information stored in the clipboard process according to the corresponding text information format in response to the text processing instruction, wherein when a copy operation is triggered, the text information is written into the clipboard in the HTML format and the plain text format through the instant messaging client, and when a paste behavior is triggered in the document process, the text information in the clipboard is read according to the selected HTML format or the plain text format and is transmitted to a page of the document process by calling an interface provided by the document process.
12. A text information processing apparatus characterized by comprising: The application is applied to a server, and the device includes: A second information transmission module is configured to acquire a selection operation on content in a display interface of a terminal and to-be-processed text information stored in a clipboard process through a listening interface provided by a web view of an instant messaging client. A second information processing module is configured to receive a text information format selection instruction sent by the terminal, determine a text information format matched with the text information according to the text information format selection instruction, wherein the text information format includes an HTML format with format and a plain text format without format. The second information processing module is configured to trigger different processing procedures based on the text information format matched by the text information, form a text processing instruction matched with the text information format of the text information, and send the text processing instruction to the terminal to process the text information stored in the clipboard.
13. The apparatus of claim 12, wherein, The second information processing module is further configured to determine position information of a cursor in a display interface of the terminal and paragraph format information in the display interface of the terminal when the text information format matched by the text information is a plain text format. The second information processing module is further configured to form 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.
14. The apparatus of claim 12, wherein, The second information processing module is further configured to determine a data structure corresponding to the html format when the text information format matched by the text information is an html format, determine style information and corresponding document object model object structure of the html format in the text information through a text processing procedure in the instant messaging client, and determine a text processing instruction matched with the html format based on the style information and the corresponding document object model object structure of the html format in the text information through the data structure corresponding to the html format.
15. An electronic device, comprising: The electronic device comprises: a memory configured to store executable instructions; a processor configured to execute the executable instructions stored in the memory to implement the text information processing method in any one of claims 1 to 2.
16. A server, characterized by The server comprises: a memory configured to store executable instructions; a processor configured to execute the executable instructions stored in the memory to implement the text information processing method in any one of claims 3 to 10.
17. A computer-readable storage medium storing executable instructions, wherein the instructions, when executed by a processor, cause the processor to perform operations comprising: The executable instructions are executed by the processor to implement the text information processing method in any one of claims 1 to 2 or the text information processing method in any one of claims 3 to 10.
Citation Information
Patent Citations
Method and device for synchronizing clipboard content information
CN104753969A
File editing method and system, proxy node
CN109284630A
Method for processing cut and pasted data
CN1808390A