CN111651967A - Session replication method and device supporting container cloud platform - Google Patents
Session replication method and device supporting container cloud platform Download PDFInfo
- Publication number
- CN111651967A CN111651967A CN202010754218.1A CN202010754218A CN111651967A CN 111651967 A CN111651967 A CN 111651967A CN 202010754218 A CN202010754218 A CN 202010754218A CN 111651967 A CN111651967 A CN 111651967A
- Authority
- CN
- China
- Prior art keywords
- content
- session
- data
- pasting
- conversation
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/166—Editing, e.g. inserting or deleting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/543—User-generated data transfer, e.g. clipboards, dynamic data exchange [DDE], object linking and embedding [OLE]
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention provides a session replication method and a session replication device for supporting a container cloud platform, wherein the method comprises the following steps: step S1: acquiring a session replication request, a first identifier and session content corresponding to the session replication request of a first client; step S2: storing the session content in a copy area in association with the first identifier; step S3: acquiring a session pasting request, a second identifier and a target pasting position of the session pasting request of a second client; step S4: and screening out the session content from the copy area based on the second identification, and pasting the session content to the target pasting position. The session replication method supporting the container cloud platform realizes the replication function of the session with the container cloud platform when a user updates equipment.
Description
Technical Field
The invention relates to the technical field of session replication, in particular to a session replication method and device supporting a container cloud platform.
Background
At present, the container cloud has the characteristics of high density and high elasticity, and can be easily handled when meeting the sudden access amount. In addition, the utilization rate of system resources by application is improved, so that the cost performance of the virtual machine is greatly improved compared with that of the virtual machine.
However, when a user connects to the container cloud platform through a client of one device and starts a session, when the user changes another device and wants to apply the session content when logging in the client of the previous device, the user can only repeat the session operation on the previous device; therefore, a session replication method supporting a container cloud platform is needed to implement a replication function of a session with the container cloud platform when a user changes a device.
Disclosure of Invention
One of the purposes of the invention is to provide a session replication method supporting a container cloud platform, which realizes the replication function of a session with the container cloud platform when a user replaces equipment.
The embodiment of the invention provides a session replication method supporting a container cloud platform, which comprises the following steps:
step S1: acquiring a session replication request, a first identifier and session content corresponding to the session replication request of a first client;
step S2: storing the session content in a copy area in association with the first identifier;
step S3: acquiring a session pasting request, a second identifier and a target pasting position of the session pasting request of a second client;
step S4: and screening out the session content from the copy area based on the second identification, and pasting the session content to the target pasting position.
Preferably, the first identifier includes: the device identification of the first client and/or the user identification of a user logged in by the first client and/or the keywords input by the user;
the second identifier includes: the device identification of the first client and/or the user identification of a user logged in by the first client and/or the keywords input by the user;
step S4: screening out the conversation content from the copy area based on the second identification, and pasting the conversation content to the target pasting position, wherein the method comprises the following steps:
matching the second identifier with the first identifier in the copy area;
when the matching is matched, acquiring the session content associated with the first identifier;
determining a number of session contents;
when the number of the session contents is one, pasting the session contents to the target pasting position;
when the number of the session contents is more than one, sequencing the session contents according to a preset rule to form a pasting list; pasting the paste list to the target paste position and virtually displaying the conversation content of the first bit of the paste list to the target paste position;
receiving a switching instruction of the second client for switching the session content virtually displayed at the target pasting position, wherein the switching instruction comprises an up-turning instruction and a down-turning instruction;
when the switching instruction is up-turning, virtually displaying the session content of the previous position of the currently virtually displayed session content in the pasting list to a target pasting position;
when the switching instruction is downward turning, virtually displaying the next conversation content of the conversation content virtually displayed at present in the pasting list to a target pasting position;
and receiving a session pasting determination instruction of the second client, and pasting the session content virtually displayed at the target pasting position.
Preferably, when pasting the session content to the target pasting position, analyzing an environment of the target pasting position and analyzing an attribute of the session content, and determining a manner of pasting the session content to the target pasting position based on the environment and the attribute specifically includes:
when the attribute of the conversation content is a multi-party conversation text and the environment of the target pasting position is no data content, the conversation content is directly pasted to the target pasting position;
when the attribute of the conversation content is a multi-party conversation text, the environment of the target pasting position is that data content exists in any one direction of the front and the back, and no data content exists in the other direction, the conversation content is directly pasted to the target pasting position, or a temporary input box suspended in a conversation interface is popped up and the conversation content is pasted into the temporary input box;
when the attribute of the conversation content is a multi-party conversation text, and the environment of the target pasting position is that data content exists in the front and data content exists in the rear, popping up a temporary input box suspended in a conversation interface and pasting the conversation content into the temporary input box;
when the attribute of the conversation content is a single conversation text and the environment of the target pasting position is no data content, directly pasting the conversation content to the target pasting position;
when the attribute of the conversation content is a single conversation text, and the environment of the target pasting position is that no data content exists in the front and data exists in the rear, analyzing the last character of the conversation content and analyzing the first character of the data content in the rear; when the last character of the conversation content and the first character of the rear data content are punctuations, directly pasting the conversation content to a target pasting position and deleting the first character of the rear data content; when the last character of the conversation content and the first character of the data content behind are not punctuations, adding a preset symbol between the conversation content and the data content behind while directly pasting the conversation content to the target pasting position, and replacing the preset symbol with the preset punctuations when sending or storing the data added with the conversation content;
when the attribute of the conversation content is a single conversation text, and the environment of the target pasting position is that data content exists in the front and no data exists in the rear, analyzing the first character of the conversation content and analyzing the last character of the data content in the front; when the first character of the conversation content and the last character of the front data content are punctuations, the first character of the conversation content is deleted while the conversation content is directly pasted to the target pasting position; when the first character of the conversation content and the last character of the preceding data content are not punctuations, adding a preset symbol between the conversation content and the preceding data content while directly pasting the conversation content to a target pasting position, and replacing the preset symbol with the preset punctuations when sending or storing the data added with the conversation content;
when the attribute of the conversation content is a single conversation text, and the environment of the target pasting position is that data content exists in front of the conversation content and data content exists behind the conversation content, analyzing a first character and a last character of the conversation content, analyzing a last character of the data content in front of the conversation content, and analyzing a first character of the data content behind the conversation content; when the first character of the conversation content is a punctuation mark, the last character of the conversation content is not the punctuation mark, the last character of the front data content is the punctuation mark, and the first character of the rear data content is not the punctuation mark, the last character of the front data content is moved to the front of the first character of the rear data content while the conversation content is directly pasted to the target pasting position; when the first character of the conversation content is not a punctuation mark, the last character of the conversation content is a punctuation mark, the last character of the front data content is not a punctuation mark, and the first character of the rear data content is a punctuation mark, the first character of the rear data content is moved to the rear of the last character of the front data content while the conversation content is directly pasted to the target pasting position; when the first character of the conversation content is not a punctuation mark, the last character of the conversation content is a punctuation mark, the last character of the front data content is not a punctuation mark, and the first character of the rear data content is not a punctuation mark, adding a preset symbol between the conversation content and the front data content while directly pasting the conversation content to a target pasting position, and replacing the preset symbol with the preset punctuation mark when sending or storing the data added with the conversation content; when the first character of the conversation content is a punctuation mark, the last character of the conversation content is not the punctuation mark, the last character of the front data content is not the punctuation mark, and the first character of the rear data content is not the punctuation mark, a preset symbol is added between the conversation content and the rear data content while the conversation content is directly pasted to the target pasting position, and the preset symbol is replaced by the preset punctuation mark when the data added with the conversation content is sent or stored.
Preferably, the session replication method supporting the container cloud platform further includes:
step S5: and receiving a moving instruction of the second client for the session content, and moving the session content according to the moving instruction.
Preferably, the session contents are sorted according to a preset rule to form a pasting list, which specifically includes:
acquiring the storage time from the storage of the session content to the copying area;
determining a difference value between the storage time and the request time corresponding to the session pasting request;
sequencing the matched conversation contents according to the sequence of the difference values from small to large;
or the like, or, alternatively,
based on the difference, calculating a first fitness of the matched session content, wherein the calculation formula is as follows:
wherein the content of the first and second substances,a first fitness representing the content of the ith conversation; n is the number of session contents;a difference value representing the content of the ith session;
acquiring first data in front of a pasting position;
acquiring second data in front of the pasting position of the historical pasting record;
based on the first data and the second data, calculating a second fitness of the matched session content, wherein the calculation formula is as follows:
wherein the content of the first and second substances,the second fitness level is represented as a second fitness level,the j characteristic value of the first data;a weight representing a jth characteristic value of the first data;a jth characteristic value representing second data;a weight representing a jth characteristic value of the second data; m represents the number of characteristic values in the first data and the second data;
acquiring third data behind the pasting position;
acquiring fourth data behind the pasting position of the historical pasting record;
based on the third data and the fourth data, calculating a third fitness of the matched session content, wherein the calculation formula is as follows:
wherein the content of the first and second substances,a third fitness measure is indicated which is,the k characteristic value of the third data;a weight representing a kth feature value of the third data;a kth characteristic value representing fourth data;a weight representing a kth feature value of the fourth data; m represents the number of characteristic values in the third data and the fourth data;
based on the session content of the history pasting record, calculating a fourth fitness of the matched session content, wherein the calculation formula is as follows:
wherein the content of the first and second substances,it is indicated that the fourth fitness level,for matching the conformed conversation contentA characteristic value;the second of the matched conversation contentsA weight of the individual feature values;the second of the conversation contents representing the history pasting recordA characteristic value;the second of the conversation contents representing the history pasting recordA weight of the individual feature values;representing the number of the session contents of the history pasting record and the number of the characteristic values in the matched session contents;
calculating the total fitness of the matched session content based on the first fitness, the second fitness, the third fitness and the fourth fitness, wherein the calculation formula is as follows:
wherein the content of the first and second substances,representing the total fitness of the matched session content;respectively corresponding to a first fitness, a second fitness, a third fitness and a fourth fitness;
and sequencing the matched conversation contents according to the sequence of the total fitness from large to small.
The invention provides a session replication device supporting a container cloud platform, which comprises:
the system comprises a replication acquisition unit, a replication processing unit and a replication processing unit, wherein the replication acquisition unit is used for acquiring a session replication request of a first client, a first identifier and session content corresponding to the session replication request;
a storage unit, configured to store the session content in the copy area in association with the first identifier;
the paste request unit is used for acquiring a session paste request of a second client, a second identifier and a target paste position of the session paste request;
and the pasting unit is used for screening out the session content from the copying area based on the second identification and pasting the session content to the target pasting position.
Preferably, the session replication apparatus supporting the container cloud platform, the first identifier includes: the device identification of the first client and/or the user identification of a user logged in by the first client and/or the keywords input by the user;
the second identifier includes: the device identification of the first client and/or the user identification of a user logged in by the first client and/or the keywords input by the user;
the pasting unit executes the following operations:
matching the second identifier with the first identifier in the copy area;
when the matching is matched, acquiring the session content associated with the first identifier;
determining a number of session contents;
when the number of the session contents is one, pasting the session contents to the target pasting position;
when the number of the session contents is more than one, sequencing the session contents according to a preset rule to form a pasting list; pasting the paste list to the target paste position and virtually displaying the conversation content of the first bit of the paste list to the target paste position;
receiving a switching instruction of the second client for switching the session content virtually displayed at the target pasting position, wherein the switching instruction comprises an up-turning instruction and a down-turning instruction;
when the switching instruction is up-turning, virtually displaying the session content of the previous position of the currently virtually displayed session content in the pasting list to a target pasting position;
when the switching instruction is downward turning, virtually displaying the next conversation content of the conversation content virtually displayed at present in the pasting list to a target pasting position;
and receiving a session pasting determination instruction of the second client, and pasting the session content virtually displayed at the target pasting position.
Preferably, when pasting the session content to the target pasting position, analyzing an environment of the target pasting position and analyzing an attribute of the session content, and determining a manner of pasting the session content to the target pasting position based on the environment and the attribute specifically includes:
when the attribute of the conversation content is a multi-party conversation text and the environment of the target pasting position is no data content, the conversation content is directly pasted to the target pasting position;
when the attribute of the conversation content is a multi-party conversation text, the environment of the target pasting position is that data content exists in any one direction of the front and the back, and no data content exists in the other direction, the conversation content is directly pasted to the target pasting position, or a temporary input box suspended in a conversation interface is popped up and the conversation content is pasted into the temporary input box;
when the attribute of the conversation content is a multi-party conversation text, and the environment of the target pasting position is that data content exists in the front and data content exists in the rear, popping up a temporary input box suspended in a conversation interface and pasting the conversation content into the temporary input box;
when the attribute of the conversation content is a single conversation text and the environment of the target pasting position is no data content, directly pasting the conversation content to the target pasting position;
when the attribute of the conversation content is a single conversation text, and the environment of the target pasting position is that no data content exists in the front and data exists in the rear, analyzing the last character of the conversation content and analyzing the first character of the data content in the rear; when the last character of the conversation content and the first character of the rear data content are punctuations, directly pasting the conversation content to a target pasting position and deleting the first character of the rear data content; when the last character of the conversation content and the first character of the data content behind are not punctuations, adding a preset symbol between the conversation content and the data content behind while directly pasting the conversation content to the target pasting position, and replacing the preset symbol with the preset punctuations when sending or storing the data added with the conversation content;
when the attribute of the conversation content is a single conversation text, and the environment of the target pasting position is that data content exists in the front and no data exists in the rear, analyzing the first character of the conversation content and analyzing the last character of the data content in the front; when the first character of the conversation content and the last character of the front data content are punctuations, the first character of the conversation content is deleted while the conversation content is directly pasted to the target pasting position; when the first character of the conversation content and the last character of the preceding data content are not punctuations, adding a preset symbol between the conversation content and the preceding data content while directly pasting the conversation content to a target pasting position, and replacing the preset symbol with the preset punctuations when sending or storing the data added with the conversation content;
when the attribute of the conversation content is a single conversation text, and the environment of the target pasting position is that data content exists in front of the conversation content and data content exists behind the conversation content, analyzing a first character and a last character of the conversation content, analyzing a last character of the data content in front of the conversation content, and analyzing a first character of the data content behind the conversation content; when the first character of the conversation content is a punctuation mark, the last character of the conversation content is not the punctuation mark, the last character of the front data content is the punctuation mark, and the first character of the rear data content is not the punctuation mark, the last character of the front data content is moved to the front of the first character of the rear data content while the conversation content is directly pasted to the target pasting position; when the first character of the conversation content is not a punctuation mark, the last character of the conversation content is a punctuation mark, the last character of the front data content is not a punctuation mark, and the first character of the rear data content is a punctuation mark, the first character of the rear data content is moved to the rear of the last character of the front data content while the conversation content is directly pasted to the target pasting position; when the first character of the conversation content is not a punctuation mark, the last character of the conversation content is a punctuation mark, the last character of the front data content is not a punctuation mark, and the first character of the rear data content is not a punctuation mark, adding a preset symbol between the conversation content and the front data content while directly pasting the conversation content to a target pasting position, and replacing the preset symbol with the preset punctuation mark when sending or storing the data added with the conversation content; when the first character of the conversation content is a punctuation mark, the last character of the conversation content is not the punctuation mark, the last character of the front data content is not the punctuation mark, and the first character of the rear data content is not the punctuation mark, a preset symbol is added between the conversation content and the rear data content while the conversation content is directly pasted to the target pasting position, and the preset symbol is replaced by the preset punctuation mark when the data added with the conversation content is sent or stored.
Preferably, the session replication apparatus supporting the container cloud platform further includes:
and the adjusting unit is used for receiving a moving instruction of the second client for the session content and moving the session content according to the moving instruction.
Preferably, the session contents are sorted according to a preset rule to form a pasting list, which specifically includes:
acquiring the storage time from the storage of the session content to the copying area;
determining a difference value between the storage time and the request time corresponding to the session pasting request;
sequencing the matched conversation contents according to the sequence of the difference values from small to large;
or the like, or, alternatively,
based on the difference, calculating a first fitness of the matched session content, wherein the calculation formula is as follows:
wherein the content of the first and second substances,a first fitness representing the content of the ith conversation; n is the number of session contents;a difference value representing the content of the ith session;
acquiring first data in front of a pasting position;
acquiring second data in front of the pasting position of the historical pasting record;
based on the first data and the second data, calculating a second fitness of the matched session content, wherein the calculation formula is as follows:
wherein the content of the first and second substances,the second fitness level is represented as a second fitness level,the j characteristic value of the first data;a weight representing a jth characteristic value of the first data;a jth characteristic value representing second data;a weight representing a jth characteristic value of the second data; m represents the number of characteristic values in the first data and the second data;
acquiring third data behind the pasting position;
acquiring fourth data behind the pasting position of the historical pasting record;
based on the third data and the fourth data, calculating a third fitness of the matched session content, wherein the calculation formula is as follows:
wherein the content of the first and second substances,a third fitness measure is indicated which is,the k characteristic value of the third data;a weight representing a kth feature value of the third data;a kth characteristic value representing fourth data;a weight representing a kth feature value of the fourth data; m represents the number of characteristic values in the third data and the fourth data;
based on the session content of the history pasting record, calculating a fourth fitness of the matched session content, wherein the calculation formula is as follows:
wherein the content of the first and second substances,it is indicated that the fourth fitness level,for matching the conformed conversation contentA characteristic value;the second of the matched conversation contentsA weight of the individual feature values;the second of the conversation contents representing the history pasting recordA characteristic value;the second of the conversation contents representing the history pasting recordA weight of the individual feature values;representing the number of the session contents of the history pasting record and the number of the characteristic values in the matched session contents;
calculating the total fitness of the matched session content based on the first fitness, the second fitness, the third fitness and the fourth fitness, wherein the calculation formula is as follows:
wherein the content of the first and second substances,representing the total fitness of the matched session content;respectively corresponding to a first fitness, a second fitness, a third fitness and a fourth fitness;
and sequencing the matched conversation contents according to the sequence of the total fitness from large to small.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
The technical solution of the present invention is further described in detail by the accompanying drawings and embodiments.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the principles of the invention and not to limit the invention. In the drawings:
fig. 1 is a schematic diagram of a session replication method supporting a container cloud platform according to an embodiment of the present invention.
Detailed Description
The preferred embodiments of the present invention will be described in conjunction with the accompanying drawings, and it will be understood that they are described herein for the purpose of illustration and explanation and not limitation.
An embodiment of the present invention provides a session replication method supporting a container cloud platform, as shown in fig. 1, including:
step S1: acquiring a session replication request, a first identifier and session content corresponding to the session replication request of a first client;
step S2: storing the session content in a copy area in association with the first identifier;
step S3: acquiring a session pasting request, a second identifier and a target pasting position of the session pasting request of a second client;
step S4: and screening out the session content from the copy area based on the second identification, and pasting the session content to the target pasting position.
The working principle and the beneficial effects of the technical scheme are as follows:
in order to realize the copy function of the session between the user and the container cloud platform when the user changes the device, the method mainly comprises two stages: the first stage is a storage stage of a copied session, and the main implementation manner may be: after a user carries out conversation with a container cloud platform through a first client, a conversation copy request, a first identifier and conversation contents corresponding to the conversation copy request are obtained through the client; storing the session content in a copy area in association with the first identifier; the storage function of the conversation of the user on the previous device is realized; the second stage is an application stage of the stored session, and the main implementation manner may be: when the user establishes communication connection with the container cloud platform through the second client, only the session pasting request, the second identifier and the target pasting position of the session pasting request of the second client are required to be acquired during application; and screening out the session content from the copy area based on the second identification, and pasting the session content to the target pasting position.
In one embodiment, the first identification comprises: the device identification of the first client and/or the user identification of a user logged in by the first client and/or the keywords input by the user;
the second identifier includes: the device identification of the first client and/or the user identification of a user logged in by the first client and/or the keywords input by the user;
the working principle and the beneficial effects of the technical scheme are as follows:
in the project of realizing the copying function of the session between the user and the container cloud platform when the user updates the equipment, how to accurately position the copied session is crucial, and the accuracy and feasibility of the copying operation are related; the accurate positioning of the session content in the copying process is realized in a mode of matching the first identifier with the second identifier; the identification of the user is adopted for positioning, so that the copy of the session content of the same user among different devices is realized; by adopting the keywords input by the user, the positioning of the target session content among the session contents is realized when the plurality of session contents are stored; the device identification is adopted, so that the copy of the session content of different users on the same device is realized; the requirements of the user on different scenes of the session copying function application are met through the equipment identification, the user identification and the keywords.
In one embodiment, step S4: screening out the conversation content from the copy area based on the second identification, and pasting the conversation content to the target pasting position, wherein the method comprises the following steps:
matching the second identifier with the first identifier in the copy area;
when the matching is matched, acquiring the session content associated with the first identifier;
determining a number of session contents;
when the number of the session contents is one, pasting the session contents to the target pasting position;
when the number of the session contents is more than one, sequencing the session contents according to a preset rule to form a pasting list; pasting the paste list to the target paste position and virtually displaying the conversation content of the first bit of the paste list to the target paste position;
receiving a switching instruction of the second client for switching the session content virtually displayed at the target pasting position, wherein the switching instruction comprises an up-turning instruction and a down-turning instruction;
when the switching instruction is up-turning, virtually displaying the session content of the previous position of the currently virtually displayed session content in the pasting list to a target pasting position;
when the switching instruction is downward turning, virtually displaying the next conversation content of the conversation content virtually displayed at present in the pasting list to a target pasting position;
and receiving a session pasting determination instruction of the second client, and pasting the session content virtually displayed at the target pasting position.
The working principle and the beneficial effects of the technical scheme are as follows:
the positioning of the session content in the copying process is realized in a mode of matching the first identifier with the second identifier; when only one piece of the positioned conversation content exists, directly copying the conversation content to a target pasting position; but when more than one piece of session content is located; firstly, sequencing all conversation contents according to a preset rule and pasting the conversation contents to a target pasting position in a pasting list mode; virtually displaying the conversation content ranked at the first position of the paste list on a target paste position; the virtual display can be represented by adding a gray background to the conversation content, can also be represented by flashing display, and can also be represented by a font with a color different from that of the target pasting position; then, the user can adopt a switching instruction to switch the virtually displayed conversation content among the conversation contents in the pasting list, key in a conversation pasting determining instruction after selecting the needed conversation content, and paste the conversation content virtually displayed at the target pasting position; the number of sessions copied and copied by the sessions is increased, and the user is prevented from switching the copying on different devices back and forth; further facilitating the use of the user.
In one embodiment, when pasting the session content to the target pasting position, parsing an environment of the target pasting position and parsing an attribute of the session content, and determining a manner of pasting the session content to the target pasting position based on the environment and the attribute specifically includes:
when the attribute of the conversation content is a multi-party conversation text and the environment of the target pasting position is no data content, the conversation content is directly pasted to the target pasting position;
when the attribute of the conversation content is a multi-party conversation text, the environment of the target pasting position is that data content exists in any one direction of the front and the back, and no data content exists in the other direction, the conversation content is directly pasted to the target pasting position, or a temporary input box suspended in a conversation interface is popped up and the conversation content is pasted into the temporary input box;
when the attribute of the conversation content is a multi-party conversation text, and the environment of the target pasting position is that data content exists in the front and data content exists in the rear, popping up a temporary input box suspended in a conversation interface and pasting the conversation content into the temporary input box;
when the attribute of the conversation content is a single conversation text and the environment of the target pasting position is no data content, directly pasting the conversation content to the target pasting position;
when the attribute of the conversation content is a single conversation text, and the environment of the target pasting position is that no data content exists in the front and data exists in the rear, analyzing the last character of the conversation content and analyzing the first character of the data content in the rear; when the last character of the conversation content and the first character of the rear data content are punctuations, directly pasting the conversation content to a target pasting position and deleting the first character of the rear data content; when the last character of the conversation content and the first character of the data content behind are not punctuations, adding a preset symbol between the conversation content and the data content behind while directly pasting the conversation content to the target pasting position, and replacing the preset symbol with the preset punctuations when sending or storing the data added with the conversation content;
when the attribute of the conversation content is a single conversation text, and the environment of the target pasting position is that data content exists in the front and no data exists in the rear, analyzing the first character of the conversation content and analyzing the last character of the data content in the front; when the first character of the conversation content and the last character of the front data content are punctuations, the first character of the conversation content is deleted while the conversation content is directly pasted to the target pasting position; when the first character of the conversation content and the last character of the preceding data content are not punctuations, adding a preset symbol between the conversation content and the preceding data content while directly pasting the conversation content to a target pasting position, and replacing the preset symbol with the preset punctuations when sending or storing the data added with the conversation content;
when the attribute of the conversation content is a single conversation text, and the environment of the target pasting position is that data content exists in front of the conversation content and data content exists behind the conversation content, analyzing a first character and a last character of the conversation content, analyzing a last character of the data content in front of the conversation content, and analyzing a first character of the data content behind the conversation content; when the first character of the conversation content is a punctuation mark, the last character of the conversation content is not the punctuation mark, the last character of the front data content is the punctuation mark, and the first character of the rear data content is not the punctuation mark, the last character of the front data content is moved to the front of the first character of the rear data content while the conversation content is directly pasted to the target pasting position; when the first character of the conversation content is not a punctuation mark, the last character of the conversation content is a punctuation mark, the last character of the front data content is not a punctuation mark, and the first character of the rear data content is a punctuation mark, the first character of the rear data content is moved to the rear of the last character of the front data content while the conversation content is directly pasted to the target pasting position; when the first character of the conversation content is not a punctuation mark, the last character of the conversation content is a punctuation mark, the last character of the front data content is not a punctuation mark, and the first character of the rear data content is not a punctuation mark, adding a preset symbol between the conversation content and the front data content while directly pasting the conversation content to a target pasting position, and replacing the preset symbol with the preset punctuation mark when sending or storing the data added with the conversation content; when the first character of the conversation content is a punctuation mark, the last character of the conversation content is not the punctuation mark, the last character of the front data content is not the punctuation mark, and the first character of the rear data content is not the punctuation mark, a preset symbol is added between the conversation content and the rear data content while the conversation content is directly pasted to the target pasting position, and the preset symbol is replaced by the preset punctuation mark when the data added with the conversation content is sent or stored.
The working principle and the beneficial effects of the technical scheme are as follows:
the conversation content includes multi-party conversation text and single item conversation text. Wherein the multi-party conversation text comprises: the client sends out a request and data responded by the container cloud platform; the single session text includes data requested by a single client or is a part of the requested data.
When the multi-party conversation text is pasted, firstly, the environment of the pasting position is determined, and when the environment has data content, the suspended temporary input box can be adopted for pasting, so that convenience is brought to a user for confirming the pasted conversation content on one hand, and the user for modifying the pasted conversation content on the other hand.
When a single session text is pasted, the environment of the pasting position is also determined, and the situation of double punctuations can not occur after pasting through the judgment of punctuations before and after the pasting position, so that the intellectualization of pasting is realized.
In one embodiment, the session replication method for supporting the container cloud platform further includes:
step S5: and receiving a moving instruction of the second client for the session content, and moving the session content according to the moving instruction.
The working principle and the beneficial effects of the technical scheme are as follows:
when the user pastes the conversation content to the target pasting position, the situation that the position of the conversation content needs to be adjusted occurs, and when the situation occurs, the pasted conversation content is moved according to the received moving instruction input by the user.
In one embodiment, the sequencing of the session contents according to a preset rule to form a pasting list specifically includes:
acquiring the storage time from the storage of the session content to the copying area;
determining a difference value between the storage time and the request time corresponding to the session pasting request;
sequencing the matched conversation contents according to the sequence of the difference values from small to large;
or the like, or, alternatively,
based on the difference, calculating a first fitness of the matched session content, wherein the calculation formula is as follows:
wherein the content of the first and second substances,a first fitness representing the content of the ith conversation; n is the number of session contents;a difference value representing the content of the ith session;
acquiring first data in front of a pasting position;
acquiring second data in front of the pasting position of the historical pasting record;
based on the first data and the second data, calculating a second fitness of the matched session content, wherein the calculation formula is as follows:
wherein the content of the first and second substances,the second fitness level is represented as a second fitness level,is the first dataA characteristic value;represents the first dataA weight of the individual feature values;represents the second dataA characteristic value;represents the second dataA characteristicA weight of the value; m represents the number of characteristic values in the first data and the second data;
acquiring third data behind the pasting position;
acquiring fourth data behind the pasting position of the historical pasting record;
based on the third data and the fourth data, calculating a third fitness of the matched session content, wherein the calculation formula is as follows:
wherein the content of the first and second substances,a third fitness measure is indicated which is,the k characteristic value of the third data;a weight representing a kth feature value of the third data;a kth characteristic value representing fourth data;a weight representing a kth feature value of the fourth data; m represents the number of characteristic values in the third data and the fourth data;
based on the session content of the history pasting record, calculating a fourth fitness of the matched session content, wherein the calculation formula is as follows:
wherein the content of the first and second substances,it is indicated that the fourth fitness level,for matching the conformed conversation contentA characteristic value;the second of the matched conversation contentsA weight of the individual feature values;the second of the conversation contents representing the history pasting recordA characteristic value;the second of the conversation contents representing the history pasting recordA weight of the individual feature values;representing the number of the session contents of the history pasting record and the number of the characteristic values in the matched session contents;
calculating the total fitness of the matched session content based on the first fitness, the second fitness, the third fitness and the fourth fitness, wherein the calculation formula is as follows:
wherein the content of the first and second substances,representing the total fitness of the matched session content;respectively corresponding to a first fitness, a second fitness, a third fitness and a fourth fitness;
and sequencing the matched conversation contents according to the sequence of the total fitness from large to small.
The working principle and the beneficial effects of the technical scheme are as follows:
the fitness of the matching situation of the screened conversation content to the target pasting position is determined by combining the fitness of the data content before and after the current target pasting position and the data content before and after the target pasting position in the history pasting record, the fitness of the matching situation of the conversation content after matching and the conversation content in the history pasting record and the fitness determined based on the storage time of the conversation content; the conversation content which is best matched with the target position is virtually displayed at the target pasting position, so that the pasting intention of the user can be judged only according to the environment of the target pasting position, and the pasting efficiency of the user is improved.
The invention provides a session replication device supporting a container cloud platform, which comprises:
the system comprises a replication acquisition unit, a replication processing unit and a replication processing unit, wherein the replication acquisition unit is used for acquiring a session replication request of a first client, a first identifier and session content corresponding to the session replication request;
a storage unit, configured to store the session content in the copy area in association with the first identifier;
the paste request unit is used for acquiring a session paste request of a second client, a second identifier and a target paste position of the session paste request;
and the pasting unit is used for screening out the session content from the copying area based on the second identification and pasting the session content to the target pasting position.
The working principle and the beneficial effects of the technical scheme are as follows:
in order to realize the copy function of the session between the user and the container cloud platform when the user changes the device, the method mainly comprises two stages: the first stage is a storage stage of a copied session, and the main implementation manner may be: after a user carries out conversation with the container cloud platform through a first client, the replication acquisition unit acquires a conversation replication request, a first identifier and conversation contents corresponding to the conversation replication request through the client; the storage unit stores the session content in a copy area in association with the first identifier; the storage function of the conversation of the user on the previous device is realized; the second stage is an application stage of the stored session, and the main implementation manner may be: when the user establishes communication connection with the container cloud platform through the second client, the pasting request unit is only needed to acquire a session pasting request, a second identifier and a target pasting position of the session pasting request of the second client when the user is applied; the pasting unit screens out the session content from the copy area based on the second identifier and pastes the session content to the target pasting position.
In one embodiment, the session replication apparatus supporting the container cloud platform, the first identification includes: the device identification of the first client and/or the user identification of a user logged in by the first client and/or the keywords input by the user;
the second identifier includes: the device identification of the first client and/or the user identification of a user logged in by the first client and/or the keywords input by the user;
the working principle and the beneficial effects of the technical scheme are as follows:
in the project of realizing the copying function of the session between the user and the container cloud platform when the user updates the equipment, how to position the copied session is crucial, and the accuracy and feasibility of the copying operation are related; positioning of session content in the copying process is realized in a mode of matching the first identifier with the second identifier; the identification of the user is adopted for positioning, so that the copy of the session content of the same user among different devices is realized; by adopting the keywords input by the user, the positioning of the target session content among the session contents is realized when the plurality of session contents are stored; the device identification is adopted, so that the copy of the session content of different users on the same device is realized; the requirements of the user on different scenes of the session copying function application are met through the equipment identification, the user identification and the keywords.
In one embodiment, the pasting unit performs operations comprising:
matching the second identifier with the first identifier in the copy area;
when the matching is matched, acquiring the session content associated with the first identifier;
determining a number of session contents;
when the number of the session contents is one, pasting the session contents to the target pasting position;
when the number of the session contents is more than one, sequencing the session contents according to a preset rule to form a pasting list; pasting the paste list to the target paste position and virtually displaying the conversation content of the first bit of the paste list to the target paste position;
receiving a switching instruction of the second client for switching the session content virtually displayed at the target pasting position, wherein the switching instruction comprises an up-turning instruction and a down-turning instruction;
when the switching instruction is up-turning, virtually displaying the session content of the previous position of the currently virtually displayed session content in the pasting list to a target pasting position;
when the switching instruction is downward turning, virtually displaying the next conversation content of the conversation content virtually displayed at present in the pasting list to a target pasting position;
and receiving a session pasting determination instruction of the second client, and pasting the session content virtually displayed at the target pasting position.
The working principle and the beneficial effects of the technical scheme are as follows:
the positioning of the session content in the copying process is realized in a mode of matching the first identifier with the second identifier; when only one piece of the positioned conversation content exists, directly copying the conversation content to a target pasting position; but when more than one piece of session content is located; firstly, sequencing all conversation contents according to a preset rule and pasting the conversation contents to a target pasting position in a pasting list mode; virtually displaying the conversation content ranked at the first position of the paste list on a target paste position; the virtual display can be represented by adding a gray background to the conversation content, can also be represented by flashing display, and can also be represented by a font with a color different from that of the target pasting position; then, the user can adopt a switching instruction to switch the virtually displayed conversation content among the conversation contents in the pasting list, key in a conversation pasting determining instruction after selecting the needed conversation content, and paste the conversation content virtually displayed at the target pasting position; the number of sessions copied and copied by the sessions is increased, and the user is prevented from switching the copying on different devices back and forth; further facilitating the use of the user.
In one embodiment, when pasting the session content to the target pasting position, parsing an environment of the target pasting position and parsing an attribute of the session content, and determining a manner of pasting the session content to the target pasting position based on the environment and the attribute specifically includes:
when the attribute of the conversation content is a multi-party conversation text and the environment of the target pasting position is no data content, the conversation content is directly pasted to the target pasting position;
when the attribute of the conversation content is a multi-party conversation text, the environment of the target pasting position is that data content exists in any one direction of the front and the back, and no data content exists in the other direction, the conversation content is directly pasted to the target pasting position, or a temporary input box suspended in a conversation interface is popped up and the conversation content is pasted into the temporary input box;
when the attribute of the conversation content is a multi-party conversation text, and the environment of the target pasting position is that data content exists in the front and data content exists in the rear, popping up a temporary input box suspended in a conversation interface and pasting the conversation content into the temporary input box;
when the attribute of the conversation content is a single conversation text and the environment of the target pasting position is no data content, directly pasting the conversation content to the target pasting position;
when the attribute of the conversation content is a single conversation text, and the environment of the target pasting position is that no data content exists in the front and data exists in the rear, analyzing the last character of the conversation content and analyzing the first character of the data content in the rear; when the last character of the conversation content and the first character of the rear data content are punctuations, directly pasting the conversation content to a target pasting position and deleting the first character of the rear data content; when the last character of the conversation content and the first character of the data content behind are not punctuations, adding a preset symbol between the conversation content and the data content behind while directly pasting the conversation content to the target pasting position, and replacing the preset symbol with the preset punctuations when sending or storing the data added with the conversation content;
when the attribute of the conversation content is a single conversation text, and the environment of the target pasting position is that data content exists in the front and no data exists in the rear, analyzing the first character of the conversation content and analyzing the last character of the data content in the front; when the first character of the conversation content and the last character of the front data content are punctuations, the first character of the conversation content is deleted while the conversation content is directly pasted to the target pasting position; when the first character of the conversation content and the last character of the preceding data content are not punctuations, adding a preset symbol between the conversation content and the preceding data content while directly pasting the conversation content to a target pasting position, and replacing the preset symbol with the preset punctuations when sending or storing the data added with the conversation content;
when the attribute of the conversation content is a single conversation text, and the environment of the target pasting position is that data content exists in front of the conversation content and data content exists behind the conversation content, analyzing a first character and a last character of the conversation content, analyzing a last character of the data content in front of the conversation content, and analyzing a first character of the data content behind the conversation content; when the first character of the conversation content is a punctuation mark, the last character of the conversation content is not the punctuation mark, the last character of the front data content is the punctuation mark, and the first character of the rear data content is not the punctuation mark, the last character of the front data content is moved to the front of the first character of the rear data content while the conversation content is directly pasted to the target pasting position; when the first character of the conversation content is not a punctuation mark, the last character of the conversation content is a punctuation mark, the last character of the front data content is not a punctuation mark, and the first character of the rear data content is a punctuation mark, the first character of the rear data content is moved to the rear of the last character of the front data content while the conversation content is directly pasted to the target pasting position; when the first character of the conversation content is not a punctuation mark, the last character of the conversation content is a punctuation mark, the last character of the front data content is not a punctuation mark, and the first character of the rear data content is not a punctuation mark, adding a preset symbol between the conversation content and the front data content while directly pasting the conversation content to a target pasting position, and replacing the preset symbol with the preset punctuation mark when sending or storing the data added with the conversation content; when the first character of the conversation content is a punctuation mark, the last character of the conversation content is not the punctuation mark, the last character of the front data content is not the punctuation mark, and the first character of the rear data content is not the punctuation mark, a preset symbol is added between the conversation content and the rear data content while the conversation content is directly pasted to the target pasting position, and the preset symbol is replaced by the preset punctuation mark when the data added with the conversation content is sent or stored.
The working principle and the beneficial effects of the technical scheme are as follows:
the conversation content includes multi-party conversation text and single item conversation text. Wherein the multi-party conversation text comprises: the client sends out a request and data responded by the container cloud platform; the single session text includes data requested by a single client or is a part of the requested data.
When the multi-party conversation text is pasted, firstly, the environment of the pasting position is determined, and when the environment has data content, the suspended temporary input box can be adopted for pasting, so that convenience is brought to a user for confirming the pasted conversation content on one hand, and the user for modifying the pasted conversation content on the other hand.
When a single session text is pasted, the environment of the pasting position is also determined, and the situation of double punctuations can not occur after pasting through the judgment of punctuations before and after the pasting position, so that the intellectualization of pasting is realized.
In one embodiment, the session replication apparatus supporting the container cloud platform further includes:
and the adjusting unit is used for receiving a moving instruction of the second client for the session content and moving the session content according to the moving instruction.
The working principle and the beneficial effects of the technical scheme are as follows:
the main application scenarios of the adjusting unit are as follows: when the situation that the position of the conversation content needs to be adjusted occurs after the user pastes the conversation content to the target pasting position, the adjusting unit receives a moving instruction input by the user and moves the pasted conversation content according to the moving instruction.
In one embodiment, the sequencing of the session contents according to a preset rule to form a pasting list specifically includes:
acquiring the storage time from the storage of the session content to the copying area;
determining a difference value between the storage time and the request time corresponding to the session pasting request;
sequencing the matched conversation contents according to the sequence of the difference values from small to large;
or the like, or, alternatively,
based on the difference, calculating a first fitness of the matched session content, wherein the calculation formula is as follows:
wherein the content of the first and second substances,is shown asA first fitness of the piece of conversation content;the number of session contents;is shown asDifference in the content of the bar session;
acquiring first data in front of a pasting position;
acquiring second data in front of the pasting position of the historical pasting record;
based on the first data and the second data, calculating a second fitness of the matched session content, wherein the calculation formula is as follows:
wherein the content of the first and second substances,the second fitness level is represented as a second fitness level,is the first dataA characteristic value;represents the first dataA weight of the individual feature values;represents the second dataCharacteristic value;Represents the second dataA weight of the individual feature values; m represents the number of characteristic values in the first data and the second data;
acquiring third data behind the pasting position;
acquiring fourth data behind the pasting position of the historical pasting record;
based on the third data and the fourth data, calculating a third fitness of the matched session content, wherein the calculation formula is as follows:
wherein the content of the first and second substances,a third fitness measure is indicated which is,is the third dataA characteristic value;represents the third dataA weight of the individual feature values;represents the fourth dataA characteristic value;represents the fourth dataA weight of the individual feature values;representing the number of the characteristic values in the third data and the fourth data;
based on the session content of the history pasting record, calculating a fourth fitness of the matched session content, wherein the calculation formula is as follows:
wherein the content of the first and second substances,it is indicated that the fourth fitness level,for matching the conformed conversation contentA characteristic value;the second of the matched conversation contentsA weight of the individual feature values;the second of the conversation contents representing the history pasting recordA characteristic value;the second of the conversation contents representing the history pasting recordA weight of the individual feature values;representing the number of the session contents of the history pasting record and the number of the characteristic values in the matched session contents;
calculating the total fitness of the matched session content based on the first fitness, the second fitness, the third fitness and the fourth fitness, wherein the calculation formula is as follows:
wherein the content of the first and second substances,representing the total fitness of the matched session content;respectively corresponding to a first fitness, a second fitness, a third fitness and a fourth fitness;
and sequencing the matched conversation contents according to the sequence of the total fitness from large to small.
The working principle and the beneficial effects of the technical scheme are as follows:
the fitness of the matching situation of the screened conversation content to the target pasting position is determined by combining the fitness of the data content before and after the current target pasting position and the data content before and after the target pasting position in the history pasting record, the fitness of the matching situation of the conversation content after matching and the conversation content in the history pasting record and the fitness determined based on the storage time of the conversation content; the conversation content which is best matched with the target position is virtually displayed at the target pasting position, so that the pasting intention of the user can be judged only according to the environment of the target pasting position, and the pasting efficiency of the user is improved.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.
Claims (8)
1. A session replication method supporting a container cloud platform is characterized by comprising the following steps:
step S1: acquiring a session replication request, a first identifier and session content corresponding to the session replication request of a first client;
step S2: storing the session content in a copy area in association with the first identifier;
step S3: acquiring a session pasting request, a second identifier and a target pasting position of the session pasting request of a second client;
step S4: screening out the session content from the copy area based on the second identification, and pasting the session content to the target pasting position;
step S5: and receiving a moving instruction of the second client for the session content, and moving the session content according to the moving instruction.
2. The session replication method supporting a container cloud platform according to claim 1,
the first identification comprises: the device identification of the first client and/or the user identification of a user logged in by the first client and/or keywords input by the user;
the second identification comprises: the device identification of the first client and/or the user identification of a user logged in by the first client and/or keywords input by the user;
the step S4: screening out the session content from the copy area based on the second identification, and pasting the session content to the target pasting position, wherein the process comprises the following steps:
matching the second identifier with the first identifier in the replication area;
when the matching is matched, acquiring the session content associated with the first identifier;
determining a number of the session content;
when the number of the session contents is one, pasting the session contents to the target pasting position;
when the number of the session contents is more than one, sequencing the session contents according to a preset rule to form a pasting list; pasting the pasting list to the target pasting position and virtually displaying the conversation content of the first bit of the pasting list to the target pasting position;
receiving a switching instruction of the second client for switching the session content virtually displayed at the target pasting position, wherein the switching instruction comprises an up-turning instruction and a down-turning instruction;
when the switching instruction is turned up, virtually displaying the session content which is one bit higher than the session content which is virtually displayed currently in the pasting list to the target pasting position;
when the switching instruction is downward turning, virtually displaying the conversation content next to the conversation content which is virtually displayed at present in the pasting list to the target pasting position;
receiving a session pasting determination instruction of the second client, and pasting the session content virtually displayed at the target pasting position.
3. The session replication method supporting the container cloud platform according to claim 1, wherein when the session content is pasted to the target pasting position, an environment of the target pasting position is analyzed, an attribute of the session content is analyzed, and a manner of pasting the session content to the target pasting position is determined based on the environment and the attribute, specifically including:
when the attribute of the session content is a multi-party session text and the environment of the target pasting position is no data content, directly pasting the session content to the target pasting position;
when the attribute of the conversation content is a multi-party conversation text, the environment of the target pasting position is that data content exists in any one direction of the front and the back, and no data content exists in the other direction, the conversation content is directly pasted to the target pasting position, or a temporary input box suspended on a conversation interface is popped up and the conversation content is pasted into the temporary input box;
when the attribute of the conversation content is a multi-party conversation text, and the environment of the target pasting position is that data content exists in the front and data content exists in the rear, popping up a temporary input box suspended in a conversation interface and pasting the conversation content into the temporary input box;
when the attribute of the session content is a single session text and the environment of the target pasting position is no data content, directly pasting the session content to the target pasting position;
when the attribute of the conversation content is a single conversation text, and the environment of the target pasting position is that no data content exists in the front and data exists in the rear, analyzing the last character of the conversation content and analyzing the first character of the data content in the rear; when the last character of the conversation content and the first character of the rear data content are punctuations, directly pasting the conversation content to the target pasting position and deleting the first character of the rear data content; when the last character of the session content and the first character of the rear data content are not punctuations, adding a preset symbol between the session content and the rear data content while directly pasting the session content to the target pasting position, and replacing the preset symbol with the preset punctuations when sending or storing the data added with the session content;
when the attribute of the conversation content is a single conversation text, and the environment of the target pasting position is that data content exists in the front and no data exists in the rear, analyzing a first character of the conversation content and analyzing a last character of the data content in the front; when the first character of the session content and the last character of the preceding data content are punctuations, directly pasting the session content to the target pasting position and deleting the first character of the session content; when the first character of the session content and the last character of the preceding data content are not punctuations, adding a preset symbol between the session content and the preceding data content while directly pasting the session content to the target pasting position, and replacing the preset symbol with the preset punctuations when transmitting or storing the data to which the session content is added;
when the attribute of the conversation content is a single conversation text, and the environment of the target pasting position is that data content exists in the front and data content exists in the rear, analyzing a first character and a last character of the conversation content, analyzing a last character of the data content in the front and analyzing a first character of the data content in the rear; when the first character of the session content is a punctuation mark, the last character of the session content is not a punctuation mark, the last character of the front data content is a punctuation mark, and the first character of the rear data content is not a punctuation mark, the last character of the front data content is moved to the front of the first character of the rear data content while the session content is directly pasted to the target pasting position; when the first character of the session content is not a punctuation mark, the last character of the session content is a punctuation mark, the last character of the front data content is not a punctuation mark, and the first character of the rear data content is a punctuation mark, moving the first character of the rear data content to the rear of the last character of the front data content while directly pasting the session content to the target pasting position; when the first character of the session content is not a punctuation mark, the last character of the session content is a punctuation mark, the last character of the front data content is not a punctuation mark, and the first character of the rear data content is not a punctuation mark, adding a preset symbol between the session content and the front data content while directly pasting the session content to the target pasting position, and replacing the preset symbol with a preset punctuation mark when transmitting or storing the data to which the session content is added; when the first character of the session content is a punctuation mark, the last character of the session content is not a punctuation mark, the last character of the front data content is not a punctuation mark, and the first character of the rear data content is not a punctuation mark, adding a preset symbol between the session content and the rear data content while directly pasting the session content to the target pasting position, and replacing the preset symbol with a preset punctuation mark when transmitting or storing the data to which the session content is added.
4. The session replication method supporting the container cloud platform according to claim 2, wherein the sorting of the session contents according to a preset rule to form a pasting list specifically comprises:
acquiring the storage time of the session content stored in the copy area;
determining a difference value between the storage time and the request time corresponding to the session pasting request;
sequencing the matched conversation contents according to the sequence of the difference values from small to large;
or the like, or, alternatively,
based on the difference, calculating a first fitness of the matched session content, wherein the calculation formula is as follows:
wherein the content of the first and second substances,is shown asA first fitness of the session content;the number of the session contents is;is shown asThe difference in the session content;
acquiring first data in front of the pasting position;
acquiring second data in front of the pasting position of the historical pasting record;
based on the first data and the second data, calculating a second fitness of the matched session content, wherein the calculation formula is as follows:
wherein the content of the first and second substances,the second fitness level is represented as a second fitness level,is the first dataA characteristic value;represents the first dataA weight of the individual feature values;represents the second dataA characteristic value;represents the second dataA weight of the individual feature values;representing the number of characteristic values in the first data and the second data;
acquiring third data behind the pasting position;
acquiring fourth data behind the pasting position of the historical pasting record;
based on the third data and the fourth data, calculating a third fitness of the matched session content, wherein a calculation formula is as follows:
wherein the content of the first and second substances,a third fitness measure is indicated which is,the k characteristic value of the third data;a weight representing a kth feature value of the third data;a kth feature value representing the fourth data;a weight representing a kth feature value of the fourth data; m represents the number of characteristic values in the third data and the fourth data;
based on the session content of the history pasting record, calculating a fourth fitness of the matched session content, wherein the calculation formula is as follows:
wherein the content of the first and second substances,it is indicated that the fourth fitness level,for matching the matched contents of the sessionA characteristic value;a second unit for representing the session content after matchingA weight of the individual feature values;the second of the session contents representing the history pasting recordA characteristic value;the second of the session contents representing the history pasting recordA weight of the individual feature values;representing the number of the session content of the history pasting record and the number of the characteristic values in the session content matched and matched;
calculating the total fitness of the session content after matching is met based on the first fitness, the second fitness, the third fitness and the fourth fitness, wherein the calculation formula is as follows:
wherein the content of the first and second substances,representing the total fitness of the session content after matching;the first fitness, the second fitness, the third fitness and the fourth fitness correspond to preset relation coefficients respectively;
and sequencing the matched conversation contents according to the sequence of the total fitness from large to small.
5. A session replication apparatus supporting a container cloud platform, comprising:
the system comprises a replication acquisition unit, a replication processing unit and a replication processing unit, wherein the replication acquisition unit is used for acquiring a session replication request of a first client, a first identifier and session content corresponding to the session replication request;
a storage unit, configured to store the session content in a copy area in association with the first identifier;
the system comprises a pasting request unit, a pasting unit and a display unit, wherein the pasting request unit is used for acquiring a session pasting request of a second client, a second identifier and a target pasting position of the session pasting request;
a pasting unit, configured to screen the session content from the copy area based on the second identifier, and paste the session content to the target pasting position;
and the adjusting unit is used for receiving a moving instruction of the second client for the session content and moving the session content according to the moving instruction.
6. The session replication apparatus supporting a container cloud platform according to claim 5,
the first identification comprises: the device identification of the first client and/or the user identification of a user logged in by the first client and/or keywords input by the user;
the second identification comprises: the device identification of the first client and/or the user identification of a user logged in by the first client and/or keywords input by the user;
the pasting unit executes the following operations:
matching the second identifier with the first identifier in the replication area;
when the matching is matched, acquiring the session content associated with the first identifier;
determining a number of the session content;
when the number of the session contents is one, pasting the session contents to the target pasting position;
when the number of the session contents is more than one, sequencing the session contents according to a preset rule to form a pasting list; pasting the pasting list to the target pasting position and virtually displaying the conversation content of the first bit of the pasting list to the target pasting position;
receiving a switching instruction of the second client for switching the session content virtually displayed at the target pasting position, wherein the switching instruction comprises an up-turning instruction and a down-turning instruction;
when the switching instruction is turned up, virtually displaying the session content which is one bit higher than the session content which is virtually displayed currently in the pasting list to the target pasting position;
when the switching instruction is downward turning, virtually displaying the conversation content next to the conversation content which is virtually displayed at present in the pasting list to the target pasting position;
receiving a session pasting determination instruction of the second client, and pasting the session content virtually displayed at the target pasting position.
7. The session replication device supporting the container cloud platform according to claim 5, wherein when pasting the session content to the target pasting location, parsing an environment of the target pasting location and parsing an attribute of the session content, and determining a manner in which the session content is pasted to the target pasting location based on the environment and the attribute specifically includes:
when the attribute of the session content is a multi-party session text and the environment of the target pasting position is no data content, directly pasting the session content to the target pasting position;
when the attribute of the conversation content is a multi-party conversation text, the environment of the target pasting position is that data content exists in any one direction of the front and the back, and no data content exists in the other direction, the conversation content is directly pasted to the target pasting position, or a temporary input box suspended on a conversation interface is popped up and the conversation content is pasted into the temporary input box;
when the attribute of the conversation content is a multi-party conversation text, and the environment of the target pasting position is that data content exists in the front and data content exists in the rear, popping up a temporary input box suspended in a conversation interface and pasting the conversation content into the temporary input box;
when the attribute of the session content is a single session text and the environment of the target pasting position is no data content, directly pasting the session content to the target pasting position;
when the attribute of the conversation content is a single conversation text, and the environment of the target pasting position is that no data content exists in the front and data exists in the rear, analyzing the last character of the conversation content and analyzing the first character of the data content in the rear; when the last character of the conversation content and the first character of the rear data content are punctuations, directly pasting the conversation content to the target pasting position and deleting the first character of the rear data content; when the last character of the session content and the first character of the rear data content are not punctuations, adding a preset symbol between the session content and the rear data content while directly pasting the session content to the target pasting position, and replacing the preset symbol with the preset punctuations when sending or storing the data added with the session content;
when the attribute of the conversation content is a single conversation text, and the environment of the target pasting position is that data content exists in the front and no data exists in the rear, analyzing a first character of the conversation content and analyzing a last character of the data content in the front; when the first character of the session content and the last character of the preceding data content are punctuations, directly pasting the session content to the target pasting position and deleting the first character of the session content; when the first character of the session content and the last character of the preceding data content are not punctuations, adding a preset symbol between the session content and the preceding data content while directly pasting the session content to the target pasting position, and replacing the preset symbol with the preset punctuations when transmitting or storing the data to which the session content is added;
when the attribute of the conversation content is a single conversation text, and the environment of the target pasting position is that data content exists in the front and data content exists in the rear, analyzing a first character and a last character of the conversation content, analyzing a last character of the data content in the front and analyzing a first character of the data content in the rear; when the first character of the session content is a punctuation mark, the last character of the session content is not a punctuation mark, the last character of the front data content is a punctuation mark, and the first character of the rear data content is not a punctuation mark, the last character of the front data content is moved to the front of the first character of the rear data content while the session content is directly pasted to the target pasting position; when the first character of the session content is not a punctuation mark, the last character of the session content is a punctuation mark, the last character of the front data content is not a punctuation mark, and the first character of the rear data content is a punctuation mark, moving the first character of the rear data content to the rear of the last character of the front data content while directly pasting the session content to the target pasting position; when the first character of the session content is not a punctuation mark, the last character of the session content is a punctuation mark, the last character of the front data content is not a punctuation mark, and the first character of the rear data content is not a punctuation mark, adding a preset symbol between the session content and the front data content while directly pasting the session content to the target pasting position, and replacing the preset symbol with a preset punctuation mark when transmitting or storing the data to which the session content is added; when the first character of the session content is a punctuation mark, the last character of the session content is not a punctuation mark, the last character of the front data content is not a punctuation mark, and the first character of the rear data content is not a punctuation mark, adding a preset symbol between the session content and the rear data content while directly pasting the session content to the target pasting position, and replacing the preset symbol with a preset punctuation mark when transmitting or storing the data to which the session content is added.
8. The session replication device supporting the container cloud platform according to claim 6, wherein the sorting of the session contents according to a preset rule to form a pasting list specifically includes:
acquiring the storage time of the session content stored in the copy area;
determining a difference value between the storage time and the request time corresponding to the session pasting request;
sequencing the matched conversation contents according to the sequence of the difference values from small to large;
or the like, or, alternatively,
based on the difference, calculating a first fitness of the matched session content, wherein the calculation formula is as follows:
wherein the content of the first and second substances,is shown asA first fitness of the session content;the number of the session contents is;is shown asThe difference in the session content;
acquiring first data in front of the pasting position;
acquiring second data in front of the pasting position of the historical pasting record;
based on the first data and the second data, calculating a second fitness of the matched session content, wherein the calculation formula is as follows:
wherein the content of the first and second substances,the second fitness level is represented as a second fitness level,is the first dataA characteristic value;represents the first dataA weight of the individual feature values;represents the second dataA characteristic value;represents the second dataA weight of the individual feature values;representing the number of characteristic values in the first data and the second data;
acquiring third data behind the pasting position;
acquiring fourth data behind the pasting position of the historical pasting record;
based on the third data and the fourth data, calculating a third fitness of the matched session content, wherein a calculation formula is as follows:
wherein the content of the first and second substances,a third fitness measure is indicated which is,is the third dataA characteristic value;represents the third dataA weight of the individual feature values;represents the fourth dataA characteristic value;represents the fourth dataA weight of the individual feature values;representing the number of characteristic values in the third data and the fourth data;
based on the session content of the history pasting record, calculating a fourth fitness of the matched session content, wherein the calculation formula is as follows:
wherein the content of the first and second substances,it is indicated that the fourth fitness level,for matching the matched contents of the sessionA characteristic value;a second unit for representing the session content after matchingA weight of the individual feature values;the second of the session contents representing the history pasting recordA characteristic value;the second of the session contents representing the history pasting recordA weight of the individual feature values;representing the number of the session content of the history pasting record and the number of the characteristic values in the session content matched and matched;
calculating the total fitness of the session content after matching is met based on the first fitness, the second fitness, the third fitness and the fourth fitness, wherein the calculation formula is as follows:
wherein the content of the first and second substances,representing the total fitness of the session content after matching;the first fitness, the second fitness, the third fitness and the fourth fitness correspond to preset relation coefficients respectively;
and sequencing the matched conversation contents according to the sequence of the total fitness from large to small.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011110542.6A CN112364608B (en) | 2020-07-31 | 2020-07-31 | Session replication method and device supporting container cloud platform |
CN202010754218.1A CN111651967B (en) | 2020-07-31 | 2020-07-31 | Session replication method and device supporting container cloud platform |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010754218.1A CN111651967B (en) | 2020-07-31 | 2020-07-31 | Session replication method and device supporting container cloud platform |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011110542.6A Division CN112364608B (en) | 2020-07-31 | 2020-07-31 | Session replication method and device supporting container cloud platform |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111651967A true CN111651967A (en) | 2020-09-11 |
CN111651967B CN111651967B (en) | 2020-11-24 |
Family
ID=72348664
Family Applications (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010754218.1A Active CN111651967B (en) | 2020-07-31 | 2020-07-31 | Session replication method and device supporting container cloud platform |
CN202011110542.6A Active CN112364608B (en) | 2020-07-31 | 2020-07-31 | Session replication method and device supporting container cloud platform |
Family Applications After (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011110542.6A Active CN112364608B (en) | 2020-07-31 | 2020-07-31 | Session replication method and device supporting container cloud platform |
Country Status (1)
Country | Link |
---|---|
CN (2) | CN111651967B (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120110470A1 (en) * | 2010-11-01 | 2012-05-03 | Massachusetts Institute Of Technology | Touch-based system for transferring data |
CN103139244A (en) * | 2011-11-24 | 2013-06-05 | 腾讯科技(深圳)有限公司 | Cloud copying and pasting method and system |
CN107948278A (en) * | 2017-11-22 | 2018-04-20 | 维沃移动通信有限公司 | A kind of information transferring method, terminal device and system |
CN108241612A (en) * | 2016-12-27 | 2018-07-03 | 北京国双科技有限公司 | Punctuation mark treating method and apparatus |
CN109343980A (en) * | 2018-09-29 | 2019-02-15 | 广州视源电子科技股份有限公司 | Cloud copy/paste method, apparatus, system and equipment and storage medium |
CN109726028A (en) * | 2019-01-17 | 2019-05-07 | 江苏保旺达软件技术有限公司 | A kind of intermediate storage method |
US20190147031A1 (en) * | 2017-11-15 | 2019-05-16 | Adaptam Inc. | Methods And Systems For Connecting A Spreadsheet To External Data Sources With Ordered Formulaic Use of Data Retrieved |
-
2020
- 2020-07-31 CN CN202010754218.1A patent/CN111651967B/en active Active
- 2020-07-31 CN CN202011110542.6A patent/CN112364608B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120110470A1 (en) * | 2010-11-01 | 2012-05-03 | Massachusetts Institute Of Technology | Touch-based system for transferring data |
CN103139244A (en) * | 2011-11-24 | 2013-06-05 | 腾讯科技(深圳)有限公司 | Cloud copying and pasting method and system |
CN108241612A (en) * | 2016-12-27 | 2018-07-03 | 北京国双科技有限公司 | Punctuation mark treating method and apparatus |
US20190147031A1 (en) * | 2017-11-15 | 2019-05-16 | Adaptam Inc. | Methods And Systems For Connecting A Spreadsheet To External Data Sources With Ordered Formulaic Use of Data Retrieved |
CN107948278A (en) * | 2017-11-22 | 2018-04-20 | 维沃移动通信有限公司 | A kind of information transferring method, terminal device and system |
CN109343980A (en) * | 2018-09-29 | 2019-02-15 | 广州视源电子科技股份有限公司 | Cloud copy/paste method, apparatus, system and equipment and storage medium |
CN109726028A (en) * | 2019-01-17 | 2019-05-07 | 江苏保旺达软件技术有限公司 | A kind of intermediate storage method |
Also Published As
Publication number | Publication date |
---|---|
CN111651967B (en) | 2020-11-24 |
CN112364608B (en) | 2021-08-24 |
CN112364608A (en) | 2021-02-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103248684B (en) | Resource acquiring method and device in a kind of the Internet | |
CN102982178B (en) | A kind of image searching method, device and system | |
CN108664651A (en) | A kind of pattern recommends method, apparatus and storage medium | |
CN110378434A (en) | Training method, recommended method, device and the electronic equipment of clicking rate prediction model | |
CN101193074A (en) | A method and system for display image on instant communication demonstration frame | |
US11120512B1 (en) | System and method for detecting and mapping data fields for forms in a financial management system | |
CN112565842A (en) | Information processing method, device and storage medium | |
CN111694530B (en) | Screen adaptation method and device, electronic equipment and storage medium | |
CN115344341A (en) | Interaction method and device based on bundled session group and computer equipment | |
CN106408409A (en) | Business handling system and method | |
CN109934631B (en) | Question and answer information processing method and device and computer equipment | |
CN115022304A (en) | Cross-platform file processing method, device and system for realizing IA (IA) based on RPA (resilient packet Access) and AI (Artificial Intelligence architecture) | |
CN106549853A (en) | A kind of email processing method and device | |
CN110109594A (en) | A kind of draw data sharing method, device, storage medium and equipment | |
CN113094287B (en) | Page compatibility detection method, device, equipment and storage medium | |
CN105868399A (en) | Method and device of managing photo album folders | |
CN111651967B (en) | Session replication method and device supporting container cloud platform | |
CN114244896A (en) | Message pushing method and device, electronic equipment and storage medium | |
CN107526619B (en) | The loading method of format data stream file | |
CN113256473B (en) | Three-dimensional model format conversion method and device, electronic equipment and system | |
CN110287304B (en) | Question and answer information processing method and device and computer equipment | |
CN109523377B (en) | Transaction method, device, equipment and storage medium of digital currency | |
CN110221891A (en) | A kind of draw data acquisition methods, device, storage medium and terminal | |
CN111326035A (en) | Task synchronization method and remote teaching system | |
CN111240562A (en) | Data processing method and device, terminal equipment and computer storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |