CN114675909A - Method and device for changing chat record display position - Google Patents
Method and device for changing chat record display position Download PDFInfo
- Publication number
- CN114675909A CN114675909A CN202011543465.3A CN202011543465A CN114675909A CN 114675909 A CN114675909 A CN 114675909A CN 202011543465 A CN202011543465 A CN 202011543465A CN 114675909 A CN114675909 A CN 114675909A
- Authority
- CN
- China
- Prior art keywords
- chat
- target
- chat record
- display position
- user
- 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
- 238000000034 method Methods 0.000 title claims abstract description 72
- 238000012545 processing Methods 0.000 claims description 15
- 238000004590 computer program Methods 0.000 claims description 11
- 101150054987 ChAT gene Proteins 0.000 description 464
- 101100203187 Mus musculus Sh2d3c gene Proteins 0.000 description 464
- 238000010586 diagram Methods 0.000 description 16
- 230000001133 acceleration Effects 0.000 description 10
- 238000004891 communication Methods 0.000 description 7
- 230000006870 function Effects 0.000 description 7
- 230000008859 change Effects 0.000 description 6
- 230000005484 gravity Effects 0.000 description 5
- 230000003287 optical effect Effects 0.000 description 4
- 230000004048 modification Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 230000009471 action Effects 0.000 description 2
- 230000008901 benefit Effects 0.000 description 2
- 239000000835 fiber Substances 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 238000004422 calculation algorithm Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000003203 everyday effect Effects 0.000 description 1
- 239000012634 fragment Substances 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000006698 induction Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012806 monitoring device Methods 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000012552 review Methods 0.000 description 1
- 238000012163 sequencing technique Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 239000011800 void material Substances 0.000 description 1
Images
Classifications
-
- 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/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- User Interface Of Digital Computer (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses a method and a device for changing a chat record display position, and relates to the technical field of computers. One embodiment of the method comprises: the method and the device can obtain the chat records to be changed selected by the user, receive the operation instruction for changing the display position of the chat records input by the user, and move the chat records to the target display position (for example, the tail position of the chat record list) according to the target display position contained in the operation instruction, thereby overcoming the problem that one or more chat records displayed at the front position cannot be moved to the rear position of the chat record list when the user uses the instant messaging application, improving the flexibility of managing the chat records by the user, and improving the experience of the user using the instant messaging application.
Description
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for changing a chat record display position.
Background
With the rapid development and popularization of the internet technology, the internet-based instant messaging application becomes an indispensable tool in the life and work of people due to the characteristics of the internet-based instant messaging application, such as a comprehensive function and suitability for various scenes; with the popularization of smart phones, the instant communication software for individual users becomes the software that people rely on for communication, social contact, work, even shopping and entertainment in life.
In the existing instant messaging application (such as WeChat and QQ), a user refers to information sent by a single contact or a plurality of contacts in a group chat through chat records, one user often joins in a plurality of group chats according to life or work needs, and when a large number of group chats exist, the display sequence of the chat records is generally sorted from near to far according to the time of receiving a new message; however, the displayed position of the chat log concerned by the user often is inconsistent with the chat log displayed according to the time, and although the user can display the concerned chat log in front by means of a method of putting the concerned chat log at the top, a method of moving the chat log displayed in the front to a rear position is lacked, so that the flexibility of the user in managing the chat log is reduced, and especially when a plurality of chat logs which are not concerned temporarily are displayed in the front for a long time, the user experience is influenced.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for changing a display position of a chat log, which can obtain a chat log to be changed selected by a user, receive an operation instruction for changing the display position of the chat log input by the user, and move the chat log to a target display position (for example, a tail position of a chat log list) according to a target display position included in the operation instruction, so as to overcome a problem that one or more chat logs displayed at a front position cannot be moved to a position behind the chat log list when the user uses an instant messaging application, improve flexibility of managing the chat logs by the user, and improve experience of the user using the instant messaging application.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a method for changing a display position of a chat log, including: according to a user identifier using an instant messaging application, acquiring a chat record list corresponding to the user identifier and displaying the chat record list; marking the chat records selected by the user from the chat record list as target chat records; receiving an operation instruction which is input by a user and used for changing the display position of the target chat record, wherein the operation instruction comprises the target display position corresponding to the target chat record; and changing the display sequence of the chat record list to form a target chat record list according to the target chat record and the target display position, so that the target chat record included in the displayed target chat list is displayed at the target display position.
Optionally, the method of changing the display position of the chat log, wherein,
the target chat records are any one of contact chat records and multi-person chat records.
Optionally, the method for changing the display position of the chat log is characterized in that,
receiving an operation instruction for changing the display position of the target chat record, which is input by a user, wherein the operation instruction comprises the following steps: and receiving an operation instruction input by the user aiming at the target chat record, wherein the input method comprises any one or more of text input, gesture event execution and equipment motion event execution, and the target display position of the target chat record is set according to the operation instruction.
Optionally, the method for changing the display position of the chat log is characterized in that,
the target display position comprises any one of the tail position, the middle position and a set position from the middle position to the tail position of the chat record list.
Optionally, the method of changing the display position of the chat log, wherein,
changing the display sequence of the chat record list according to the target chat record and the target display position to form a target chat record list, comprising: the number of the chat records in the chat record list is obtained, the target sequence of the target chat records in the chat record list is calculated according to the target display position, and the display sequence of the chat records covering the range from the current sequence to the target sequence in the chat record list is changed based on the target sequence and the current sequence of the target chat records, so that the target chat record list is formed.
Optionally, the method of changing the display position of the chat log, wherein,
when detecting that a user performs any one or more of operations of adding chat records and deleting chat records in the target chat record list, re-acquiring the number of the chat records in the chat record list, re-calculating the target sequence of the target chat records in the target chat record list according to the target display position, and changing the display sequence of the chat records covering the range from the current sequence to the target sequence in the chat record list based on the target sequence to form the target chat record list.
Optionally, the method of changing the display position of the chat log, wherein,
and after receiving an operation instruction for canceling the setting of the display position of the target chat record input by a user, determining the display position of the target chat record in the current chat record list according to a set strategy.
Preferably, the codes developed based on the method for changing the display position of the chat record can be integrated into the existing instant messaging application (such as WeChat and QQ) in a file or plug-in mode, so that the operation of displaying the chat record from front to back is increased on the basis of the existing operation of the chat record, the flexibility of managing the chat record by a user is realized, and the use experience of the user is improved.
In order to achieve the above object, according to a second aspect of an embodiment of the present invention, there is provided an apparatus for changing a display position of a chat log, including: the system comprises a chat recording module, an operation instruction processing module and a chat recording sequence changing module; wherein,
the chat record acquisition module is used for acquiring a chat record list corresponding to a user identifier according to the user identifier using the instant messaging application and displaying the chat record list;
the processing operation instruction module is used for marking the chat records selected by the user from the chat record list as target chat records; receiving an operation instruction which is input by a user and used for changing the display position of the target chat record, wherein the operation instruction comprises the target display position corresponding to the target chat record;
and the chat record sequence changing module is used for changing the display sequence of the chat record list according to the target chat record and the target display position to form a target chat record list so as to display the target chat record in the displayed target chat list at the target display position.
Optionally, the apparatus for changing the display position of the chat log is characterized in that,
the processing operation instruction module is used for receiving an operation instruction which is input by a user and used for changing the display position of the target chat record, and comprises the following steps: and receiving an operation instruction input by the user aiming at the target chat record, wherein the input method comprises any one or more of text input, gesture event execution and equipment motion event execution, and the target display position of the target chat record is set according to the operation instruction.
Optionally, the apparatus for changing the display position of the chat log is characterized in that,
the target display position comprises any one of the tail position, the middle position and a set position from the middle position to the tail position of the chat record list.
Optionally, the apparatus for changing the display position of the chat log is characterized in that,
the chat record sequence changing module is configured to change a display sequence of the chat record list according to the target chat record and the target display position to form a target chat record list, and includes: the number of the chat records in the chat record list is obtained, the target sequence of the target chat records in the chat record list is calculated according to the target display position, and the display sequence of the chat records covering the range from the current sequence to the target sequence in the chat record list is changed based on the target sequence and the current sequence of the target chat records, so that the target chat record list is formed.
Optionally, the apparatus for changing the display position of the chat log is characterized in that,
the chat record sequence changing module is used for re-acquiring the number of the chat records in the chat record list when detecting that any one or more of operations of adding the chat records and deleting the chat records to the target chat record list are executed by the user, re-calculating the target sequence of the target chat records in the target chat record list according to the target display position, and changing the display sequence of the chat records covered from the current sequence to the target sequence in the chat record list based on the target sequence to form the target chat record list.
Optionally, the apparatus for changing the display position of the chat log is characterized in that,
and the operation instruction processing module is further configured to determine, according to a set policy, a display position of the target chat record in the current chat record list after receiving an operation instruction for canceling the setting of the display position of the target chat record, which is input by the user.
To achieve the above object, according to a third aspect of the embodiments of the present invention, there is provided an electronic device for changing a display position of a chat log, comprising: one or more processors; a storage device for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the method as set forth in any of the above methods of altering chat log display locations.
To achieve the above object, according to a fourth aspect of the embodiments of the present invention, there is provided a computer-readable medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method as set forth in any one of the above methods of changing a display position of a chat log.
One embodiment of the above invention has the following advantages or benefits: the problem that one or more chat records displayed in the front position cannot be moved to the rear position of the chat record list when a user uses the instant messaging application can be solved, the flexibility of managing the chat records by the user is improved, and the experience of using the instant messaging application by the user is improved.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
fig. 1 is a flowchart illustrating a method for changing a display position of a chat log according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a client interface of a chat log according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a client interface for changing a display position of a chat log according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an apparatus for changing a display position of a chat log according to an embodiment of the present invention;
FIG. 5 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 6 is a schematic block diagram of a computer system suitable for use in implementing a terminal device or server of an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
As shown in fig. 1, an embodiment of the present invention provides a method for changing a display position of a chat log, where the method may include the following steps:
step S101: and acquiring a chat record list corresponding to the user identification according to the user identification using the instant messaging application and displaying the chat record list.
Specifically, after a user starts an instant messaging application running on a client device (such as a smart phone, a tablet personal computer, etc.) and logs in successfully, a user identifier (such as a user's WeChat account number and a QQ number) of the user is obtained, a chat record list corresponding to the user identifier is obtained based on the user identifier, the chat record list is displayed on a page and displayed to the user, so that the user can view information of each chat record, wherein the chat record list comprises chat records of the user and a contact person (namely contact person chat records, namely one-to-one chat records), or chat records of group chatting in which the user is located (namely multi-person chat records); when a user selects a chat record, the chat record is marked as a target chat record, namely the target chat record is any one of a contact chat record and a multi-person chat record.
Further, users often save chat logs (i.e., do not actively delete chat logs) in order to review information contained in the chat logs, wherein the information includes files, text, pictures, video, audio, links, etc. sent by contacts or sent by multiple contacts contained in a group chat. Currently, one rule for determining the order in which chat logs are displayed in a chat log list is: determined according to the time point of the latest information sent by the contact (i.e. the last information in the chat log), for example: as in the example of "chat log interface 1" shown in fig. 2, if contact a in "group chat log 1" is at "11: 50 ", and contact Z of" group chat log 9 "is in a" 10: 30 ", the chat logs are sorted based on the time sequence, and the time point corresponding to the group chat log 1 is closest to the current time and is arranged on the top, and similarly, the personal chat log 5, the group chat log 9 and the like are arranged in sequence; it will be appreciated that the order of the chat logs is dynamically variable, for example: still taking "chat log interface 1" as an example, if contact Y included in "group chat log 9" continuously sends a large amount of information every day, then "group chat log 9" may be continuously displayed on the top of the chat log list based on the time sequence; if a plurality of chat records similar to the group chat record 9 are continuously displayed in front of the chat list, and the chat records are not concerned by the user for a period of time, the use experience of the user is influenced; although the user may set one or more chat logs of interest to "top" (i.e., fixedly displaying the chat log at the forefront of the list of chat logs); however, the "top-up" setting a small number of chat records still cannot overcome the above problem, and if a plurality of chat records (for example, the number of group chat records displayed on more than one interface) are "top-up", and because the concerned chat records are dynamically changed, the "top-up" needs to be cancelled or set correspondingly frequently according to the change, so that the convenience of viewing the chat records by the user is reduced, and the user experience is affected.
Step S102: marking the chat records selected by the user from the chat record list as target chat records; and receiving an operation instruction which is input by a user and used for changing the display position of the target chat record, wherein the operation instruction comprises the target display position corresponding to the target chat record.
Specifically, when a user selects a target display position at which a target chat record needs to be set from a chat list, marking the chat record selected by the user from the chat record list as the target chat record; further, receiving an operation instruction for changing the display position of the target chat record, wherein the operation instruction comprises the target display position corresponding to the target chat record; the target display position comprises any one of the tail position, the middle position and a set position from the middle position to the tail position of the chat record list. It will be appreciated that the user can more easily focus on the chat history that is of interest for display at a forward location by setting one or more target chat histories (that are not of interest for the time being) to a location after the middle location of the list of chat histories, including the tail location; further, each chat record included in the chat record list may include a unique identifier to distinguish, and the identifier of the chat record may be generated according to a set rule when creating the chat, for example: the method comprises the steps of randomly generating a character string with a set length according to one or more letters, numbers, characters and the like to serve as an identifier of the chat record, storing the identifier of each chat record at a client or a server in a relational database, a non-relational database, a file and the like.
Further, receiving an operation instruction for changing the display position of the target chat record, which is input by a user; specifically, receiving an operation instruction for changing the display position of the target chat record, which is input by a user, includes: and receiving an operation instruction input by the user aiming at the target chat record, wherein the input method comprises any one or more of text input, gesture event execution, equipment motion event execution and voice sending, and the target display position of the target chat record is set according to the operation instruction. For example: the user inputs an operation instruction by executing a 'get-and-get' device motion event, wherein the operation instruction indicates that 'the target chat record is set as the tail position in the chat record list', namely, the operation instruction comprises the target display position set by the target chat record.
Specifically, the method for enabling the user to input the operation instruction may be implemented as follows:
the first method comprises the following steps: after a user selects a target chat record and enters a detailed interface of the target chat record, receiving an operation instruction for changing the display position of the target chat record, which is input by the user, and specifically describing as follows:
1) after a user selects a target chat record, entering a detail interface of the target chat record, wherein the detail interface comprises information (including texts, pictures, videos, voice, links and the like) sent by each contact in the target chat record; as shown in the schematic diagram of fig. 2, the target chat record selected by the user is "group chat record 2", after selection, the chat detail interface corresponding to "group chat record 2" is displayed as the interface including "group chat record 2 (490) as shown in fig. 2, where 490 is an example of the number of contacts included in the group chat, and fig. 2 further includes a schematic diagram of information sent by" contact 1, contact 2, and contact 3 ".
2) Receiving an operation instruction input by a user on a detail interface corresponding to the target chat record, for example, the following operation instruction is received:
a: receiving an operation instruction input by a user by using a method for executing a device motion event, wherein the device motion event executed by the user is received by using an event sensed by gravity of a monitoring device, such as: shaking the mobile phone, including throwing the mobile phone, throwing a mobile phone, shaking a mobile phone, rotating the mobile phone, etc., the invention does not limit the concrete event of the adopted equipment motion event, specifically, take the android system as an example, judge whether the set equipment motion event happens by monitoring the acceleration of gravity, the magnetic induction event, the direction sensor, etc., take "shake a" as an example below, wherein the acceleration of gravity sensor (sensor. type _ accerometer) detected by using the onsorchanged method changes, the example code segments are as follows:
public void onSensorChanged(SensorEvent sensorEvent){
if(sensorEvent.sensor.getType()==
Sensor.TYPE_ACCELEROMETER)
further, data (X, Y, Z) of the gravity acceleration X-axis, Y-axis, Z-axis are acquired at each time interval (timeInterval); calculating the difference (X1, Y1, Z1) between the current data of the X-axis, Y-axis, and Z-axis and the data of the X-axis, Y-axis, and Z-axis of the gravity acceleration (indicated as lastX, lastY, and lastZ) detected at the previous time point, an example code segment is as follows:
if(timeInterval>200){
long diffTime=(curTime-lastUpdate);
lastUpdate=curTime;
x=sensorEvent.values[0];
y=sensorEvent.values[1];
z=sensorEvent.values[2];
x1=x-lastX;
y1=y-lastY;
z1=z-lastZ;
further, calculating an acceleration vector difference value according to the difference value of the data of the axes in each direction, wherein the acceleration vector difference value method can calculate the difference value of each axis, summing after squaring respectively, and squaring to obtain an acceleration vector difference value speed; (the difference between the current X-axis data, the current Y-axis data, and the current Z-axis data and the set threshold may also be calculated to obtain the acceleration vector difference), the example code segments are as follows:
speed=Math.sqrt(x1*x1+y1*y1+z1*z1)/timeInterval*10000;
further, comparing the acceleration vector difference value with a set THRESHOLD (THRESHOLD), and judging whether the acceleration vector difference value is an expected equipment action event or not by combining the time difference of the two times of acquired data; example code fragments for performing corresponding operations (altering the target chat record to the target display location, UpdateList ()) after determining a device-action event as expected are as follows:
if(speed>THRESHOLD)UpdateList();}
b: receiving an operation instruction input by a user by using a method for executing a gesture event, wherein the gesture event comprises the following specific steps: click, long press, double click, double finger zoom, double finger rotate, single finger zoom, single finger rotate, slide, drag, etc., for example: one implementation example is: and displaying a menu after receiving the click of the user, wherein the menu comprises setting options (for example, moving to the tail part, moving to the middle part and the like), and executing corresponding operation after the user selects the options (for example, moving to the tail part) through a gesture event (for example, double-click).
C: receiving an operation instruction of a user for executing a gesture event by combining with the input text, wherein the description of the gesture event is consistent with that in the description B, and is not repeated herein; further, an operation instruction input by a method of inputting a text by a user may be received, for example: one implementation example is that a menu is displayed after clicking of a user, the menu comprises a selection type of 'input target display position', and after clicking the selection type, input texts 'move to the middle part, move to the tail part, move to the front 3 of the tail part and the like' are taken as target display positions; namely, the target display position comprises any one of the tail position, the middle position and a set position from the middle position to the tail position of the chat record list; further, after the input text is received, the target display position is obtained by analyzing the text. The second method comprises the following steps: after the user selects the target chat record, receiving an operation instruction corresponding to the gesture event of the user, for example: and receiving a long-time pressing and dragging gesture event of the target chat record (for example, setting the dragged gesture event to correspond to setting the chat record to the tail position of the chat record list) of the user as an operation instruction.
D: receiving an operation instruction input by a user by using a method of sending voice, specifically, for example: one implementation example is: receiving a display menu clicked by a user, wherein the menu comprises a voice sending command, the user generates voice indicating an operation instruction of moving to the tail part and moving to the middle part after selecting the voice sending command, and the client identifies the corresponding operation instruction as a target display position according to the voice; the method of recognizing the voice instruction may use a voice recognition module, for example: the android system may implement speech recognition by invoking an interface in the android.
The second method comprises the following steps: after the user selects the target chat record, an operation instruction is input based on the target chat record (i.e. the detail interface of the target chat record is not entered), for example: after the user selects the target chat record, the display position of the target chat record is changed through the target display position (for example, the tail position) contained in the operation instruction, such as executing a gesture event (long-press and drag-and-drop), or combining the gesture event with a device motion event (long-press and drag-and-drop), or combining the gesture event with input voice (long-press and send voice instruction). The detailed description of the operation instruction is the same as that in the first method, and is not repeated here.
The above two methods are described as follows: and receiving an operation instruction input by the user aiming at the target chat record, wherein the input method comprises any one or more of text input, gesture event execution, equipment motion event execution and voice sending, and the target display position of the target chat record is set according to the operation instruction. It is understood that the above-described operation commands can be combined in various combinations to enable users to send operation commands in a more flexible way, and the present invention is not limited to the specific input method or the combination of input methods.
Step S103: and changing the display sequence of the chat record list to form a target chat record list according to the target chat record and the target display position so as to display the target chat record included in the displayed target chat list at the target display position.
Specifically, changing the display order of the chat record list according to the target chat record and the target display position to form a target chat record list includes: the number of the chat records in the chat record list is obtained, the target sequence of the target chat records in the chat record list is calculated according to the target display position, and the display sequence of the chat records covering the range from the current sequence to the target sequence in the chat record list is changed based on the target sequence and the current sequence of the target chat records, so that the target chat record list is formed. Wherein, the number of the chat records of the chat record list is obtained, for example: the number of the obtained chat records in the chat record list is 100, and the longer the instant tool software is used, the larger the number of the general chats contained in the accumulated chat list is, although the user can quit part of the group chat, most of the chat records are usually kept based on the information that the contact information or the contact information in the group chat needs to be saved or the chat records need to be viewed in the future time.
Further, according to the target display position, calculating a target sequence of the target chat records in the chat record list, for example: if the target display position is the tail position, 1) obtaining the number of the chat lists as Value1 through GetListNumber (); 2) determining the target sequence of the target chat records as Value1, so that the display sequence of the target chat records is positioned at the tail position in the chat record list; for another example: for example, if the target display position is the middle position: 1) obtaining the number of the chat lists as Value1 through GetListNumber (); 2) based on the rounded Value of Value1/2, the target order of the target chat log is determined based on the Value such that the display order of the target chat log is centered on the list of chat logs.
Further, changing the display sequence of the chat record list to form a target chat record list, specifically, changing the display sequence of the chat records in the chat record list, which is covered from the current sequence to the target sequence, based on the target sequence and the current sequence of the target chat records; preferably, the chat record list is ordered, and a sequence number (for example, the sequence number is a number) can be generated based on the chat record list; taking the target display position as the tail position as an example, if the current sequence of the target chat records is 2 and the target sequence is 100 (obtained by the above calculation), the display sequence of the chat records (i.e. from 2 to 100 in the current chat record list) covering the range from the current sequence (e.g. 2) to the target sequence (e.g. 100) in the chat record list needs to be changed; the change mode can be realized by firstly changing the labels of the corresponding chat records from 3 to 100, reducing the labels of the corresponding chat records by one by using codes (formats such as C, Java, Phython and the like) for realizing a loop algorithm, then changing the current sequence (2) into the target sequence (100) to change the display sequence of the target chat records from 2 to 100, storing the target chat records in the data source, and when reading the chat record data of the data source, sequencing by using sequence numbers to obtain a target chat record list with the changed display sequence. For example: using a SELECT id FROM List ORDER BY num command to obtain an ordered target chat record List (sorted based on a sequence number num), wherein id is a chat record identification example, a client can be displayed on an interface according to a chat record name corresponding to the chat record identification, and List is a chat record List example; num is an example sequence number.
Further, when detecting that the user performs any one or more of operations of adding chat records and deleting chat records in the target chat record list, re-acquiring the number of the chat records in the chat record list, re-calculating the target sequence of the target chat records in the target chat record list according to the target display position, and changing the display sequence of the chat records covered from the current sequence to the target sequence in the chat record list based on the target sequence to form the target chat record list. It will be appreciated that the target chat log is arranged in a relatively fixed display position in the chat log list by recalculating the target order, for example: when the chat log list includes 100 chat logs, "group chat log 2" is set to be displayed at the tail position, and when the chat log list includes 150 chat logs, "group chat log 2" is still displayed at the tail position. Preferably, when a user sets a plurality of chat records to a target display position (for example, a middle position and a tail position), setting a last selected target chat record (for example, group chat information 3) to a corresponding target display position, moving a last chat record (for example, group chat information 2) set to the target display position upwards to be a previous chat record adjacent to the group chat information 3, and so on, wherein the target chat records set by the user are all arranged at a front position adjacent to the target display position (for example, when the user sets 5 chat records to the tail position, the chat list is the 5 chat records set by the user according to the last 5 chat records in the sequence); further, when the number of chat logs in the target chat log list remains unchanged but the sequence of chat logs changes, it is determined whether the chat sequence that changes is associated with the display sequence of the target chat log, for example: when the display sequence of the target chat records is the last (tail position), the display sequence is not related to the sequence of other chat records; when the display sequence of the target chat records is the middle position, and the chat records with the display position behind the middle position are changed to the front of the middle position (for example, the display position of the chat records is changed due to the contact information), the display sequence of the target chat records needs to be recalculated.
Further, the user may cancel the setting by inputting an instruction to cancel the setting of the display position of the target chat record, and the input method used is the same as the set input method, which is not described herein again. And after receiving an operation instruction for canceling the setting of the display position of the target chat record input by a user, determining the display position of the target chat record in the current chat record list according to a set strategy. For example: taking "group chat log 2" in fig. 3 as an example, after the setting of "move to tail" is cancelled, the information is displayed in the chat log list according to a set policy (for example, the set policy is arranged according to the time sequence of the received information), for example: if the message sent by the contact of group chat log 2 is the most recent message, then group chat log 2 is displayed first.
As shown in fig. 2, an embodiment of the present invention provides a method for displaying a chat log client interface, where the method may include the following steps:
step S201: and marking the chat records selected by the user from the chat record list as target chat records, and displaying a chat record detail page of the target chat records.
Specifically, according to a user identifier using an instant messaging application, a chat record list corresponding to the user identifier is obtained and displayed; for example: the obtained chat history list is shown as "chat history page 1" in the schematic diagram of fig. 2; further, according to the fact that the chat history selected by the user is marked as the target chat history, as shown in the schematic diagram of fig. 2, the chat history selected by the user is "group chat history 2", the "group chat history 2" is marked as the target chat history, and a detail interface corresponding to the target chat history is displayed, such as the schematic diagram of "group chat history 2(490 people)" in fig. 2; the specific description of the target chat log and the chat log list is consistent with the description of step S101 and step S102, and is not repeated here.
As shown in fig. 3, an embodiment of the present invention provides a method for displaying a client interface for changing a display position of a chat log, where the method may include the following steps:
step S301: and changing the display sequence of the chat record list to form a target chat record list, so that when the target chat list is displayed, the target chat record is displayed at the target display position.
Specifically, an operation instruction for changing the display position of the target chat record, which is input by a user, is received, and the operation instruction includes the target display position set by the target chat record. The manner of the user inputting the operation instruction is consistent with the description of step S102, and is not described herein again; the method comprises the steps of inputting any one or more of text, gesture event execution and equipment motion event execution, and changing the display position of the target chat record according to the operation instruction. Further, the description about the target display position is consistent with that of step S102, and is not repeated herein.
Further, assuming that a target display position of a "group chat log 2" in a received operation instruction input by a user is a "tail position", acquiring the number of chat logs in the chat log list, calculating a target sequence of the target chat log in the chat log list according to the target display position, and changing a display sequence of the chat logs covered from the current sequence to the target sequence in the chat log list based on the target sequence and the current sequence of the target chat log to form the target chat log list; the detailed description of changing the display order of the target chat log and the target chat log list is consistent with step S103, and is not repeated here. As shown in the interface diagram of fig. 3, after the target display position of the "group chat history 2" is set to "tail position", the "group chat history 2" in the "updated chat history page 1" of the displayed interface is changed to the tail position of the "last page of chat history", and the update time is "13: 50 ", it is understood that" group chat 2 "may be displayed in the first position of the first page according to a set policy (e.g., according to a contact sending message time ordering) without setting the target display position of" group chat 2 "as the" tail position ". Therefore, by the method, when the group chat is not concerned, the flexibility of managing the chat records by the user is improved and the user experience is improved by setting the target display position of the target chat record under the condition of not quitting the group chat.
As shown in fig. 4, an embodiment of the present invention provides an apparatus 400 for changing a display position of a chat log, including: a chat record obtaining module 401, an operation instruction processing module 402 and a chat record sequence changing module 403; wherein,
the chat record obtaining module 401 is configured to obtain, according to a user identifier using an instant messaging tool, a chat record list corresponding to the user identifier and display the chat record list;
the processing operation instruction module 402 is configured to mark a chat record selected by a user from the chat record list as a target chat record; receiving an operation instruction which is input by a user and used for changing the display position of the target chat record, wherein the operation instruction comprises the target display position corresponding to the target chat record;
the chat record order changing module 403 is configured to change a display order of the chat record list according to the target chat record and the target display position to form a target chat record list, so that the target chat record included in the displayed target chat list is displayed at the target display position.
Optionally, the processing operation instruction module 402 is configured to receive an operation instruction for changing the display position of the target chat record, where the operation instruction is input by a user, and includes: and receiving an operation instruction input by the user aiming at the target chat record, wherein the input method comprises any one or more of text input, gesture event execution and equipment motion event execution, and the target display position of the target chat record is set according to the operation instruction.
Optionally, the processing operation instruction module 402 includes: the target display position comprises any one of the tail position, the middle position and a set position from the middle position to the tail position of the chat record list.
Optionally, the module 403 for changing the display order of the chat record list according to the target chat record and the target display position to form a target chat record list includes: the number of the chat records in the chat record list is obtained, the target sequence of the target chat records in the chat record list is calculated according to the target display position, and the display sequence of the chat records covering the range from the current sequence to the target sequence in the chat record list is changed based on the target sequence and the current sequence of the target chat records, so that the target chat record list is formed.
Optionally, the chat record order changing module 403 is configured to, when detecting that the user performs any one or more of adding a chat record to the target chat record list and deleting a chat record, re-obtain the number of chat records in the chat record list, re-calculate the target order of the target chat record in the target chat record list according to the target display position, and change, based on the target order, the display order of the chat records in the chat record list, which is covered from the current order to the target order, to form the target chat record list.
Optionally, the processing operation instruction module 402 is further configured to, after receiving an operation instruction for canceling setting of a display position of a target chat record input by a user, determine, according to a set policy, a display position of the target chat record in the current chat record list.
An embodiment of the present invention further provides an electronic device for changing a display position of a chat log, including: one or more processors; the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors are enabled to realize the method provided by any one of the above embodiments.
Embodiments of the present invention further provide a computer-readable medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method provided in any of the above embodiments.
Fig. 5 illustrates an exemplary system architecture 500 of a method of changing a chat log display location or an apparatus for changing a chat log display location to which embodiments of the invention may be applied.
As shown in fig. 5, the system architecture 500 may include terminal devices 501, 502, 503, a network 504, and a server 505. The network 504 is the medium used to provide communication links between terminal devices 501, 502, 503 and the server 505. Network 504 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 501, 502, 503 to interact with a server 505 over a network 504 to receive or send messages or the like. Various client applications, such as instant messaging tools, etc., may be installed on the terminal devices 501, 502, 503.
The terminal devices 501, 502, 503 may be various electronic devices having display screens and supporting various client applications, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 505 may be a server providing various services, such as a background management server providing support for client applications used by users with the terminal devices 501, 502, 503. The background management server can process the received request sent by the instant messaging application client and feed back corresponding response data to the terminal equipment.
It should be noted that the method for changing the display position of the chat log provided in the embodiment of the present invention is generally executed by the terminal devices 501, 502, and 503, and accordingly, the device for changing the display position of the chat log is generally disposed in the terminal devices 501, 502, and 503 or in the server 505.
It should be understood that the number of terminal devices, networks, and servers in fig. 5 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 6, a block diagram of a computer system 600 suitable for use with a terminal device implementing an embodiment of the invention is shown. The terminal device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 6, the computer system 600 includes a Central Processing Unit (CPU)601 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the system 600 are also stored. The CPU 601, ROM 602, and RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted in the storage section 608 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 601.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules and/or units described in the embodiments of the present invention may be implemented by software, and may also be implemented by hardware. The described modules and/or units may also be provided in a processor, and may be described as: a processor comprises a module for obtaining chat records, a module for processing operation instructions and a module for changing the sequence of the chat records. The names of these modules do not in some cases form a limitation on the module itself, for example, the module for obtaining chat records may also be described as a "module for obtaining and displaying a list of chat records corresponding to the user identifier".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: according to a user identifier using an instant messaging application, acquiring a chat record list corresponding to the user identifier and displaying the chat record list; marking the chat records selected by the user from the chat record list as target chat records; receiving an operation instruction which is input by a user and used for changing the display position of the target chat record, wherein the operation instruction comprises the target display position corresponding to the target chat record; and changing the display sequence of the chat record list to form a target chat record list according to the target chat record and the target display position so as to display the target chat record included in the displayed target chat list at the target display position.
Therefore, the embodiment of the invention can overcome the problem that one or more chat records displayed at the front position cannot be moved to the position behind the chat record list when the user uses the instant messaging application containing a large number of group chats, thereby improving the flexibility of managing the chat records by the user and improving the user experience.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (10)
1. A method for changing a display position of a chat log, comprising:
according to a user identifier using an instant messaging application, acquiring a chat record list corresponding to the user identifier and displaying the chat record list;
marking the chat records selected by the user from the chat record list as target chat records; receiving an operation instruction which is input by a user and used for changing the display position of the target chat record, wherein the operation instruction comprises the target display position corresponding to the target chat record;
and changing the display sequence of the chat record list to form a target chat record list according to the target chat record and the target display position so as to display the target chat record included in the displayed target chat list at the target display position.
2. The method of claim 1,
the target chat records are any one of contact chat records and multi-person chat records.
3. The method of claim 1,
receiving an operation instruction for changing the display position of the target chat record, which is input by a user, wherein the operation instruction comprises the following steps:
and receiving an operation instruction input by the user aiming at the target chat record, wherein the input method comprises any one or more of text input, gesture event execution, equipment motion event execution and voice sending, and the target display position of the target chat record is set according to the operation instruction.
4. The method of claim 1,
the target display position comprises any one of the tail position, the middle position and a set position from the middle position to the tail position of the chat record list.
5. The method of claim 1,
changing the display sequence of the chat record list according to the target chat record and the target display position to form a target chat record list, comprising:
obtaining the number of the chat records in the chat record list, calculating a target sequence of the target chat records in the chat record list according to the target display position, and changing the display sequence of the chat records covered from the current sequence to the target sequence in the chat record list based on the target sequence and the current sequence of the target chat records to form the target chat record list.
6. The method of claim 5,
when detecting that a user performs any one or more of operations of adding chat records and deleting chat records in the target chat record list, re-acquiring the number of the chat records in the chat record list, re-calculating the target sequence of the target chat records in the target chat record list according to the target display position, and changing the display sequence of the chat records covering the range from the current sequence to the target sequence in the chat record list based on the target sequence to form the target chat record list.
7. The method according to any one of claims 1 to 6,
and after receiving an operation instruction for canceling the setting of the display position of the target chat record input by a user, determining the display position of the target chat record in the current chat record list according to a set strategy.
8. An apparatus for changing a display position of a chat log, comprising: the system comprises a chat recording module, an operation instruction processing module and a chat recording sequence changing module; wherein,
the chat record acquisition module is used for acquiring a chat record list corresponding to a user identifier according to the user identifier using the instant messaging application and displaying the chat record list;
the processing operation instruction module is used for marking the chat records selected by the user from the chat record list as target chat records; receiving an operation instruction which is input by a user and used for changing the display position of the target chat record, wherein the operation instruction comprises the target display position corresponding to the target chat record;
and the chat record sequence changing module is used for changing the display sequence of the chat record list according to the target chat record and the target display position to form a target chat record list so as to display the target chat record in the displayed target chat list at the target display position.
9. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method recited in any of claims 1-7.
10. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011543465.3A CN114675909B (en) | 2020-12-24 | 2020-12-24 | Method and device for changing chat record display position |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011543465.3A CN114675909B (en) | 2020-12-24 | 2020-12-24 | Method and device for changing chat record display position |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114675909A true CN114675909A (en) | 2022-06-28 |
CN114675909B CN114675909B (en) | 2024-10-29 |
Family
ID=82070313
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011543465.3A Active CN114675909B (en) | 2020-12-24 | 2020-12-24 | Method and device for changing chat record display position |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114675909B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105553826A (en) * | 2015-12-18 | 2016-05-04 | 阿里巴巴集团控股有限公司 | Message display method and device |
CN109039873A (en) * | 2018-09-13 | 2018-12-18 | 广州达美智能科技有限公司 | Chat record display methods, device and computer readable storage medium |
CN110113489A (en) * | 2019-04-30 | 2019-08-09 | 上海掌门科技有限公司 | Message group sort method, device, electronic equipment and medium |
CN110266505A (en) * | 2019-04-29 | 2019-09-20 | 上海连尚网络科技有限公司 | A kind of method and apparatus managing session group |
CN110855549A (en) * | 2019-10-28 | 2020-02-28 | 维沃移动通信有限公司 | Message display method and terminal equipment |
CN111131004A (en) * | 2019-12-31 | 2020-05-08 | 北京明略软件系统有限公司 | Chat record management method, device and related equipment |
-
2020
- 2020-12-24 CN CN202011543465.3A patent/CN114675909B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105553826A (en) * | 2015-12-18 | 2016-05-04 | 阿里巴巴集团控股有限公司 | Message display method and device |
CN109039873A (en) * | 2018-09-13 | 2018-12-18 | 广州达美智能科技有限公司 | Chat record display methods, device and computer readable storage medium |
CN110266505A (en) * | 2019-04-29 | 2019-09-20 | 上海连尚网络科技有限公司 | A kind of method and apparatus managing session group |
CN110113489A (en) * | 2019-04-30 | 2019-08-09 | 上海掌门科技有限公司 | Message group sort method, device, electronic equipment and medium |
CN110855549A (en) * | 2019-10-28 | 2020-02-28 | 维沃移动通信有限公司 | Message display method and terminal equipment |
CN111131004A (en) * | 2019-12-31 | 2020-05-08 | 北京明略软件系统有限公司 | Chat record management method, device and related equipment |
Also Published As
Publication number | Publication date |
---|---|
CN114675909B (en) | 2024-10-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109725975B (en) | Method and device for prompting read state of message and electronic equipment | |
US20200120051A1 (en) | Apparatus and method for message reference management | |
EP2699029B1 (en) | Method and device for providing a message function | |
CN113300938B (en) | Message sending method and device and electronic equipment | |
US11004042B2 (en) | Device for mechanized automation of diagnostics and upgrades for portable multifunction devices | |
CN113591439B (en) | Information interaction method and device, electronic equipment and storage medium | |
CN112764612A (en) | Interaction method, interaction device, electronic equipment and storage medium | |
CN112040330B (en) | Video file processing method and device, electronic equipment and computer storage medium | |
CN113285868B (en) | Task generation method, device and computer readable medium | |
CN114615220B (en) | Message sending control method and device | |
CN110658960A (en) | Message processing method and device and electronic equipment | |
JP7553172B2 (en) | Method, system, and non-transitory computer-readable medium for providing reminder messages - Patents.com | |
CN114363686B (en) | Method, device, equipment and medium for publishing multimedia content | |
KR20200043659A (en) | Method, system, and non-transitory computer readable record medium for collecting unreplied message | |
CN115022272B (en) | Information processing method, apparatus, electronic device and storage medium | |
CN111596995A (en) | Display method and device and electronic equipment | |
CN110806834A (en) | Information processing method and device based on input method, electronic equipment and medium | |
CN110362297B (en) | Element ordering method and device | |
CN111857463A (en) | New message reminding method and device, electronic equipment and medium | |
CN112306224A (en) | Man-machine interaction method and device and electronic equipment | |
CN114675909B (en) | Method and device for changing chat record display position | |
CN110704151A (en) | Information processing method and device and electronic equipment | |
CN112887803B (en) | Session processing method, device, storage medium and electronic equipment | |
CN115174282A (en) | Information interaction method, device, equipment and medium | |
CN111143740B (en) | Information processing method and device and electronic equipment |
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 |