Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
Alternative embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
A first embodiment, namely, an embodiment of a method of information processing, is provided for the present disclosure.
The following describes an embodiment of the present disclosure in detail with reference to fig. 1, where fig. 1 is a flowchart of a method for processing information provided by the embodiment of the present disclosure.
Step S101, a first target text and first word segmentation information thereof are obtained, display character strings are sequentially extracted from the first target text based on a preset extraction sequence, and a first comparison character string is spliced.
Text, which refers to the presentation of written language, is typically a sentence or combination of sentences having a complete, systematic meaning. A text may be a sentence, a paragraph, or a chapter. Typically the text is stored in a text file in the computer.
A text file is a computer file, which is a typical sequential file whose logical structure belongs to a streaming file. The text file refers to a file stored in an ASCII code manner (also referred to as a text manner), that is, english characters, numeric characters, and the like store ASCII codes, and chinese characters store machine-internal codes. The text file includes, in addition to the display characters, non-displayable format characters (e.g., information such as carriage return characters, line feed characters, etc.) represented by ASCII code characters. Text files are typically opened, read, or edited by a text editor. For example, a text file with a suffix TXT and a text file with a suffix RTF (rich text for short) can be opened, read or edited by Microsoft's tablet.
Part of the characters are selected from the target text, and the selected characters are displayed in a display mode different from that of the original text, and the selected characters are called word segmentation information. The first stroke information is a word selected from the first target text. The first stroke information includes: a first stroke start position and a first stroke length.
The obtaining of the first target text and the first word segmentation information thereof may obtain the first target text from a data table stored in a database, and obtain the first word segmentation information of the stored first target text from the data table; or inputting a first target text in a text editor of the terminal, and selecting first word segmentation information from the first target text; or the text editor of the terminal calls and displays the first target text from the data table stored in the database, and selects the first word-dividing information from the first target text. Of course, it should be understood that the above-mentioned obtaining manner is only an example, and a person skilled in the art may completely obtain the first target text and the corresponding first stroke information through a simple variation of the above-mentioned obtaining manner, which is not limited by the embodiment of the present disclosure.
For example, the first target text has a first segment ab + cd and a second segment ef.
The preset extraction sequence comprises an extraction sequence from top to bottom or an extraction sequence from bottom to top.
The display character string refers to a character string composed of visible characters. I.e. does not include format characters.
Sequentially extracting display character strings from the first target text based on a preset extraction sequence, and splicing the display character strings into a first comparison character string, for example, the first target text is stored in a rich text, sequentially extracting content blocks from the rich text based on a top-down extraction sequence by using paragraphs as key values, deleting format characters (such as line feed characters) in the content blocks, and then splicing the format characters into the first comparison character string; continuing with the above example, the content blocks are spliced into a first comparison string ab + cdef.
And step S102, receiving the change information of the first target text to generate a second target text.
Change information, including: operation information, a change start position, a change length, and a change character string. Operational information, including: insert information and/or delete information. The modification information actually includes deletion information and/or insertion information.
For example, continuing the above example, the change information: the operation information is insertion information, the change start position is 5, the change length is 1, and the change character string is 'A'; the first segment of the second target text generated is ab + cdA.
And S103, sequentially extracting display character strings from the second target text based on a preset extraction sequence, and splicing the display character strings into a second comparison character string.
For example, continuing the above example, the second comparison string is ab + cdAef.
And step S104, carrying out differential comparison on the second comparison character string and the first comparison character string to obtain differential information.
The difference information includes: a difference start position, a difference length, and a difference operation type. The difference operation type includes an insert type and/or a delete type.
For example, continuing with the above example, the second comparison character string is ab + cdAef, the first comparison character string is ab + cdef, and the difference information is obtained after comparing the two comparison character strings: the difference starting position is 5, the difference length is 1, and the difference operation type is an insertion type.
Step S105, generating the second word segmentation information based on the difference information, the first word segmentation information, and a preset word segmentation adjustment rule.
Wherein the second stroke information includes: a second stroke start position and a second stroke length.
The first stroke ending position is equal to the sum of the first stroke starting position and the first stroke length.
The difference end position is equal to the sum of the difference start position and the difference length.
The composite value is equal to a difference between the difference end position and the first pronouncing start position.
For example, the first stroke starting position is X1, the first stroke length is Y1; the starting position of the second stroke is X2, and the length of the first stroke is Y2; the difference starting position is x, and the difference length is y; the first stroke ending position is Z1 ═ X1+ Y1, the difference ending position is Z ═ X + Y, and the composite value is N ═ Z-X1.
When the difference operation type is an insertion type, the second word segmentation information is generated based on the difference information, the first word segmentation information and a preset word segmentation adjustment rule, and the method comprises the following steps:
step S105-1-11, when the difference starting position is less than or equal to the first stroke starting position, the second stroke starting position is equal to the sum of the first stroke starting position and the difference length, and the second stroke length is equal to the first stroke length.
For example, continuing the above example, when X is less than or equal to X1, then X2 ═ X1+ Y and Y2 ═ Y1.
And/or, in step S105-1-21-12, when the difference starting position is greater than the sum of the first stroke starting position and the first stroke length, the second stroke starting position is equal to the first stroke starting position, and the second stroke length is equal to the first stroke length.
For example, continuing the above example, when X is greater than Z1, then X2 ═ X1 and Y2 ═ Y1.
And/or, in step S105-1-31-13, when the difference starting position is greater than the first stroke starting position and the difference starting position is less than or equal to the first stroke ending position, the second stroke starting position is equal to the first stroke starting position, and the second stroke length is equal to the difference between the first stroke length and the difference length.
For example, continuing the above example, when X is greater than X1 and X is less than or equal to Z1, then X2 ═ X1, Y2 ═ Y1+ Y.
When the difference operation type is a deletion type, the second word segmentation information is generated based on the difference information, the first word segmentation information and a preset word segmentation adjustment rule, and the method comprises the following steps:
step S105-2-11-21, when the difference starting position is greater than or equal to the first stroke starting position, the difference starting position is smaller than the first stroke ending position, and the difference ending position is smaller than or equal to the first stroke ending position, the second stroke starting position is equal to the first stroke starting position, and the second stroke length is equal to the difference between the first stroke length and the difference length.
For example, continuing the above example, when X is greater than or equal to X1, and X is less than Z1, and Z is less than or equal to Z1, then X2 ═ X1, Y2 ═ Y1-Y.
And/or, in step S105-2-21-22, when the difference starting position is greater than or equal to the first stroke starting position, the difference starting position is less than the first stroke ending position, and the difference ending position is greater than the first stroke ending position, then the second stroke starting position is equal to the first stroke starting position, and the second stroke length is equal to the difference between the difference starting position and the first stroke starting position plus one.
For example, continuing the above example, when X is greater than or equal to X1, and X is less than Z1, and Z is greater than Z1, then X2 ═ X1, Y2 ═ X-X1+ 1.
And/or, in step S105-2-31-23, when the difference ending position is smaller than the first stroke starting position, the second stroke starting position is equal to the difference between the first stroke starting position and the difference length, and the second stroke length is equal to the first stroke length.
For example, continuing the above example, when z is less than X1, then X2 ═ X1-Y and Y2 ═ Y1.
And/or, in step S105-2-41-24, when the difference starting position is greater than or equal to the first stroke ending position, the second stroke starting position is equal to the first stroke starting position, and the second stroke length is equal to the first stroke length.
For example, continuing the above example, when X is greater than or equal to Z1, then X2 ═ X1 and Y2 ═ Y1.
And/or, in step S105-2-51-25, when the difference starting position is smaller than the first stroke starting position and the difference ending position is greater than or equal to the first stroke starting position, the second stroke starting position is equal to the difference starting position, and the second stroke length is equal to the difference between the first stroke length and the integrated value.
For example, continuing the above example, when X is less than X1 and z is greater than or equal to X1, then X2 is X and Y2 is Y1-N.
Optionally, the obtaining the first target text includes the following steps:
and step S101-1a, acquiring the first target text from the comment data set.
Optionally, the method of the embodiment of the present disclosure further includes the following steps:
and step S106, acquiring a first key value corresponding to the first target text from the comment data set.
That is, the review data set includes: key values and target text.
The key values are obtained with the purpose of: regardless of how the target text is altered, there is a unique value representing the target text. The one-to-one correspondence relationship between the key values and the target text is shown.
After step S106, the embodiment of the present disclosure provides two application scenarios.
Scene one
Step S107a, based on the first key value, updating the first target text in the comment data set to be the second target text, and updating the first word segmentation information to be the second word segmentation information.
Thereby keeping the second target text stored in the comment data set in information synchronization with the second comparison character string in the first posting information.
Scene two
In step S107b-1, a first timestamp is acquired.
The time stamp is the time when the release information is generated. The version number is used for representing the version number of the change, and information errors caused by disordered sequence of the two changes reaching the end point due to network reasons are avoided.
The first timestamp is used for representing the time of generating the first release information. Therefore, the first time stamp is generated in a previous step of generating the first distribution information.
Step S107b-2, generating and sending first posting information based on the first key value, the second comparison character string, the second pronouncing information, and the first timestamp for insertion into a remote dictionary service queue of a remote dictionary server.
Remote dictionary service (Redis) is a common non-relational data caching service, and is often installed in a remote dictionary server. A remote dictionary service queue is a service in Redis. Optionally, the maximum length of the remote dictionary service queue is 5.
Optionally, the method further comprises the following steps:
step S107b-3, generating and transmitting a first post message associated with the first post information for insertion into a message queue associated with a telecommunication service of a telecommunication service cluster.
The first publishing message is used for informing the remote communication service that the first publishing information to be published exists in a remote dictionary service queue of the remote dictionary server.
For large internet applications, telecommunication services are often installed in telecommunication service clusters. For example, the WebSocket communication service is installed in the WebSocket communication service cluster. The WebSocket communication service cluster is an entity which is formed by a plurality of servers providing WebSocket connection and provides uniform and transparent communication service to the outside.
And the remote dictionary service queue is used for receiving the first release information from the remote dictionary service queue, and the first release information is triggered to be pulled from the remote dictionary service queue based on the first release information.
Step S107b-4, the telecommunication service obtains the first publish message.
Step S107b-5, based on the trigger of the first distribution message, the telecommunication service pulls the corresponding first distribution information from the remote dictionary service queue.
After the telecommunication service pulls the first distribution information, the first distribution information may be sent to the terminal. And the terminal changes the first target text including the first word segmentation information into a second target text including the second word segmentation information according to the first publishing information.
The embodiment of the disclosure provides a target text analysis and combination scheme, which meets the requirements of real-time updating and combination of information processing areas. Meanwhile, a real-time communication architecture is provided, and real-time synchronization of information processing is met.
The present disclosure also provides a second embodiment, namely, an information processing apparatus, corresponding to the first embodiment provided by the present disclosure. Since the second embodiment is basically similar to the first embodiment, the description is simple, and the relevant portions should be referred to the corresponding description of the first embodiment. The device embodiments described below are merely illustrative.
Fig. 2 shows an embodiment of an information processing apparatus provided by the present disclosure. Fig. 2 is a block diagram of units of an information processing apparatus according to an embodiment of the present disclosure.
Referring to fig. 2, the present disclosure provides an information processing apparatus, including: the first alignment character string unit 201 is spliced to generate a second target text unit 202, the second alignment character string unit 203 is spliced to acquire difference information unit 204, and the second stroke information unit 205 is generated.
A first comparison character string splicing unit 201, configured to obtain a first target text and first stroke information thereof, sequentially extract display character strings from the first target text based on a preset extraction order, and splice the display character strings into a first comparison character string;
a generate second target text unit 202, configured to receive change information of the first target text and generate a second target text;
a second comparison character string splicing unit 203, configured to sequentially extract display character strings from the second target text based on a preset extraction order, and splice the display character strings into a second comparison character string;
an obtaining difference information unit 204, configured to perform difference comparison on the second comparison character string and the first comparison character string to obtain difference information;
a generate second word segmentation information unit 205, configured to generate second word segmentation information based on the difference information, the first word segmentation information, and a preset word segmentation adjustment rule.
Optionally, the first stroke information includes: a first stroke starting position and a first stroke length;
the second stroke information includes: a second stroke starting position and a second stroke length;
the difference information includes: a difference starting position, a difference length and a difference operation type; the difference operation type includes an insert type and/or a delete type.
In the unit 205 for generating second compartment information, the following steps are included:
the insertion type subunit is used for generating second word segmentation information when the difference operation type is the insertion type;
in the insertion type subunit, comprising:
a first inserting subunit, configured to, when the difference starting position is less than or equal to the first stroke starting position, determine that the second stroke starting position is equal to a sum of the first stroke starting position and the difference length, and the second stroke length is equal to the first stroke length.
In the insertion type subunit, comprising:
a second inserting subunit, configured to, when the difference starting position is greater than a sum of the first stroke starting position and the first stroke length, determine that the second stroke starting position is equal to the first stroke starting position, and the second stroke length is equal to the first stroke length.
In the insertion type subunit, comprising:
a third inserting subunit, configured to, when the difference starting position is greater than the first stroke starting position and the difference starting position is less than or equal to a first stroke ending position, determine that the second stroke starting position is equal to the first stroke starting position and the second stroke length is equal to a difference between the first stroke length and the difference length; wherein the first stroke ending position is equal to the sum of the first stroke starting position and the first stroke length.
Optionally, the generating the second stroke information unit 205 includes:
a deletion type subunit, configured to generate second word segmentation information when the difference operation type is an insertion type;
in the deletion type subunit, the method includes:
a first deleting subunit, configured to, when the difference starting position is greater than or equal to the first stroke starting position, the difference starting position is smaller than the first stroke ending position, and the difference ending position is smaller than or equal to the first stroke ending position, determine that the second stroke starting position is equal to the first stroke starting position, and the second stroke length is equal to a difference between the first stroke length and the difference length; wherein the disparity end position is equal to the sum of the disparity start position and the disparity length.
In the deletion type subunit, the method includes:
a second deleting subunit, configured to, when the difference starting position is greater than or equal to the first stroke starting position, the difference starting position is smaller than the first stroke ending position, and the difference ending position is greater than the first stroke ending position, determine that the second stroke starting position is equal to the first stroke starting position, and the second stroke length is equal to a difference between the difference starting position and the first stroke starting position plus one.
In the deletion type subunit, the method includes:
a third deleting subunit, configured to, when the difference ending position is smaller than the first stroke starting position, determine that the second stroke starting position is equal to a difference between the first stroke starting position and the difference length, and determine that the second stroke length is equal to the first stroke length.
In the deletion type subunit, the method includes:
a fourth deleting subunit, configured to, when the difference starting position is greater than or equal to the first stroke ending position, determine that the second stroke starting position is equal to the first stroke starting position, and the second stroke length is equal to the first stroke length.
In the deletion type subunit, the method includes:
a fifth deletion subunit, configured to, when the difference starting position is smaller than the first stroke starting position and the difference ending position is greater than or equal to the first stroke starting position, determine that the second stroke starting position is equal to the difference starting position and the second stroke length is equal to a difference between the first stroke length and a comprehensive value; wherein the composite value is equal to a difference between the difference end position and the first stroke start position.
Optionally, the concatenating first comparison character string unit 201 includes:
and acquiring a first target text subunit from the data set, wherein the first target text subunit is used for acquiring the first target text from the comment data set.
Optionally, the apparatus further comprises:
the first key value obtaining unit is used for obtaining a first key value corresponding to the first target text from a comment data set after the second word segmentation information is generated;
a first timestamp acquiring unit, configured to acquire a first timestamp;
a first posting information generating unit to generate and send first posting information for insertion into a remote dictionary service queue of a remote dictionary server based on the first key value, the second comparison string, the second pronouncing information, and the first timestamp.
Optionally, the apparatus further comprises:
and the updating unit is used for updating the first target text in the comment data set to be the second target text and updating the first word segmentation information to be the second word segmentation information based on the first key value after the first key value corresponding to the first target text is acquired from the comment data set.
Optionally, the apparatus further comprises:
a first publish message generating unit configured to generate and transmit a first publish message associated with the first publish information for insertion of the first publish message into a message queue associated with a telecommunication service of a telecommunication service cluster.
Optionally, the apparatus further comprises:
a first publishing message acquiring unit, configured to acquire the first publishing message by the telecommunication service;
and the pulling unit is used for pulling the corresponding first publishing information from the remote dictionary service queue by the telecommunication service based on the triggering of the first publishing information.
The embodiment of the disclosure provides a target text analysis and combination scheme, which meets the requirements of real-time updating and combination of information processing areas. Meanwhile, a real-time communication architecture is provided, and real-time synchronization of information processing is met.
The present disclosure provides a third embodiment, that is, an electronic device, which is used in an information processing method, and includes: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the one processor to cause the at least one processor to perform the method of processing information as described in the first embodiment.
The disclosed embodiments provide a fourth embodiment, which is a computer storage medium for information processing, the computer storage medium storing computer-executable instructions, the computer-executable instructions being capable of executing the method for information processing as described in the first embodiment.
Referring now to FIG. 3, shown is a schematic diagram of an electronic device suitable for use in implementing embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 3 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 3, the electronic device may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 301 that may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)302 or a program loaded from a storage device 308 into a Random Access Memory (RAM) 303. In the RAM 303, various programs and data necessary for the operation of the electronic apparatus are also stored. The processing device 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input/output (I/O) interface 305 is also connected to bus 304.
Generally, the following devices may be connected to the I/O interface 305: input devices 306 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 307 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage devices 308 including, for example, magnetic tape, hard disk, etc.; and a communication device 309. The communication means 309 may allow the electronic device to communicate wirelessly or by wire with other devices to exchange data. While fig. 3 illustrates an electronic device having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication means 309, or installed from the storage means 308, or installed from the ROM 302. The computer program, when executed by the processing device 301, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText transfer protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of an element does not in some cases constitute a limitation on the element itself.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
Corresponding to the first embodiment provided by the present disclosure, the present disclosure also provides a fifth embodiment, i.e., a system. Since the fifth embodiment is basically similar to the first embodiment, the description is relatively simple, and the relevant portions can be referred to the corresponding description of the first embodiment. The system embodiments described below are merely illustrative.
Fig. 4 illustrates an embodiment of a system provided by the present disclosure. FIG. 4 shows a block diagram of a system according to an embodiment of the disclosure.
Referring to fig. 4, the present disclosure provides a system comprising:
an owner terminal configured to: acquiring a first key value, a first target text and first word segmentation information from a comment data set of the target and key achievement method service cluster, and displaying the first target text with the first word segmentation information; receiving change information of the first target text, generating a second target text based on the change information, adjusting the first word segmentation information based on the change information and a preset word segmentation adjustment rule, and generating second word segmentation information; displaying the second target text with the second stroke information; sending change information of a first target text to the target and key achievement method service cluster;
the goal and key achievement method service cluster is configured to: acquiring the first key value, the first target text and the first word segmentation information from the comment data set, sequentially extracting display character strings from the first target text based on a preset extraction sequence, and splicing the display character strings into a first comparison character string; receiving change information of the first target text to generate a second target text; sequentially extracting display character strings from the second target text based on a preset extraction sequence, and splicing the display character strings into a second comparison character string; carrying out differential comparison on the second comparison character string and the first comparison character string to obtain differential information; generating second word segmentation information based on the difference information, the first word segmentation information and a preset word segmentation adjusting rule; acquiring a first timestamp, and generating first release information and a first release message associated with the first release information based on the first key value, the second comparison character string, the second word segmentation information and the first timestamp; sending the first publishing information and the first publishing message;
a remote dictionary server configured to: receiving the first publishing information and storing the first publishing information in a remote dictionary service queue;
a telecommunications service cluster configured to: the telecommunication service receiving the first published message for insertion into a message queue associated with the telecommunication service; the remote communication service acquires the first publishing message from the message queue, and triggers the remote communication service to pull the corresponding first publishing message from the remote dictionary service queue based on the first publishing message and sends the first publishing message to a consultant terminal;
the reviewer terminal configured to: acquiring the first key value and the first target text from the comment data set, and displaying the first target text with the first word segmentation information; and receiving the first publishing information, and displaying the second target text with the second word segmentation information based on the first publishing information.
Optionally, the objective and key achievement method service cluster is configured to:
acquiring a first target text and first word-dividing information thereof, sequentially extracting display character strings from the first target text based on a preset extraction sequence, and splicing the display character strings into a first comparison character string;
receiving change information of the first target text to generate a second target text;
sequentially extracting display character strings from the second target text based on a preset extraction sequence, and splicing the display character strings into a second comparison character string;
carrying out differential comparison on the second comparison character string and the first comparison character string to obtain differential information;
and generating second word segmentation information based on the difference information, the first word segmentation information and a preset word segmentation adjusting rule.
Optionally, the objective and key achievement method service cluster is configured to: the first stroke information includes: a first stroke starting position and a first stroke length; the second stroke information includes: a second stroke starting position and a second stroke length; the difference information includes: a difference starting position, a difference length and a difference operation type; the difference operation type comprises an insertion type and/or a deletion type;
optionally, the objective and key achievement method service cluster is configured to: when the difference operation type is an insertion type, and when the difference starting position is less than or equal to the first stroke starting position, the second stroke starting position is equal to the sum of the first stroke starting position and the difference length, and the second stroke length is equal to the first stroke length.
Optionally, the objective and key achievement method service cluster is configured to: when the difference operation type is an insertion type, when the difference starting position is greater than the sum of the first stroke starting position and the first stroke length, the second stroke starting position is equal to the first stroke starting position, and the second stroke length is equal to the first stroke length;
optionally, the objective and key achievement method service cluster is configured to: when the difference operation type is an insertion type, when the difference starting position is greater than the first stroke starting position and the difference starting position is less than or equal to a first stroke ending position, the second stroke starting position is equal to the first stroke starting position, and the second stroke length is equal to the difference between the first stroke length and the difference length; wherein the first stroke ending position is equal to the sum of the first stroke starting position and the first stroke length.
Optionally, the objective and key achievement method service cluster is configured to: when the difference operation type is a deletion type, when the difference starting position is greater than or equal to the first stroke starting position, the difference starting position is less than the first stroke ending position, and the difference ending position is less than or equal to the first stroke ending position, the second stroke starting position is equal to the first stroke starting position, and the second stroke length is equal to the difference between the first stroke length and the difference length; wherein the disparity end position is equal to the sum of the disparity start position and the disparity length;
optionally, the objective and key achievement method service cluster is configured to: when the difference operation type is a deletion type, when the difference starting position is greater than or equal to the first stroke starting position, the difference starting position is less than the first stroke ending position, and the difference ending position is greater than the first stroke ending position, the second stroke starting position is equal to the first stroke starting position, and the second stroke length is equal to the difference between the difference starting position and the first stroke starting position plus one;
optionally, the objective and key achievement method service cluster is configured to: when the difference operation type is a deletion type, and when the difference ending position is smaller than the first stroke starting position, the second stroke starting position is equal to the difference between the first stroke starting position and the difference length, and the second stroke length is equal to the first stroke length;
optionally, the objective and key achievement method service cluster is configured to: when the difference operation type is a deletion type, when the difference starting position is greater than or equal to the first word dividing ending position, the second word dividing starting position is equal to the first word dividing starting position, and the second word dividing length is equal to the first word dividing length;
optionally, the objective and key achievement method service cluster is configured to: when the difference operation type is a deletion type, when the difference starting position is smaller than the first stroke starting position and the difference ending position is greater than or equal to the first stroke starting position, the second stroke starting position is equal to the difference starting position, and the second stroke length is equal to the difference between the first stroke length and the comprehensive value; wherein the composite value is equal to a difference between the difference end position and the first stroke start position. Optionally, the objective and key achievement method service cluster is configured to: and after the second word segmentation information is generated, updating the first target text in the comment data set to be the second target text based on the first key value, and updating the first word segmentation information to be the second word segmentation information.
Optionally, the reviewer terminal is further configured to send heartbeat information to the telecommunication service cluster based on a preset frequency.
Optionally, the preset frequency is transmitted once within a time range less than or equal to 30 seconds.
Optionally, the owner terminal is further configured to: and when second word segmentation information cannot be generated after the first word segmentation information is adjusted based on the change information and a preset word segmentation adjusting rule or a second target text cannot be generated based on the change information, acquiring a second target text and second word segmentation information from the comment data set based on a first key value, and displaying the second target text with the second word segmentation information.
Optionally, the telecommunication service cluster is further configured to: sequentially acquiring a timestamp of each release message from the remote dictionary service queue; and pulling the release information in the remote dictionary service queue in sequence based on the sequence of each release information timestamp and sending the release information to a consultant terminal.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.