Information processing method, device and electronic device
By updating the latest publishing time of read publishers and filtering target publishers, the problem of large information processing volume in read diffusion is solved, the page turning speed is improved, and service timeout and buffer overflow are avoided.
Patent Information
- Application Number
- CN202111337267.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-12
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2041-11-12
AI Technical Summary
In read diffusion, as the number of pages browsed by users increases, the amount of information processing and the amount of locally cached information increases in a power series, causing the read diffusion speed to slow down and the page turning service to time out.
By obtaining the target publishing time and read publisher of the read information displayed on the page, update the latest publishing time of the read publisher, combined with the latest publishing time of the unread publisher, filter out the read and unread publishers Target publisher, and only obtain unread information published by the target publisher before the target publishing time, reducing the amount of information processed and cached.
Improves the speed of read flooding, avoids paging service timeouts, and reduces the risk of cached information exceeding the local cache size.
Smart Images

Figure CN114117178B
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to an information processing method, device and electronic device. Background Art
[0002] With the development of science and technology, the application of the Internet is becoming more and more extensive. At present, Internet information is mainly pushed to users in the form of read diffusion and write diffusion.
[0003] In the read diffusion method, when the user turns the page, the publishing information is obtained based on the latest publishing time of the publishers followed by the user, resulting in the inability to determine the publishers that need to be displayed after turning the page. The only option is to pull the publishers and publishing information displayed on the previous page again and pull the publishers that were not displayed on the previous page followed by the user. That is, at this time, publishers that do not need to be displayed on the page after turning the page are also pulled, and then the publishing information of these publishers is pulled. As the number of pages browsed by the user increases, the amount of information pulled increases exponentially, that is, the amount of information processing and the amount of locally cached information increases exponentially, which reduces the speed of read diffusion and causes the page turning service to time out. Summary of the invention
[0004] The embodiments of the present application provide an information processing method, device and electronic device, which can solve the technical problem of large amount of information processing in read diffusion.
[0005] An information processing method, comprising:
[0006] Get the target publishing time and publisher of the read information displayed on the page;
[0007] Based on the target publishing time and the read publisher, the latest publishing time of the read publisher is updated to obtain the updated latest publishing time of the read publisher;
[0008] When a page turning instruction is received, the latest publishing time of unread publishers is obtained, where the unread publishers are publishers in the attention list other than the read publishers;
[0009] According to the latest published time after the update and the latest published time, the target publisher is filtered out from the read publishers and the unread publishers;
[0010] Obtain the unread information published by the target publisher before the target publishing time, sort and display each of the unread information.
[0011] Optionally, the updating of the latest publishing time of the read publisher based on the target publishing time and the read publisher to obtain the updated latest publishing time of the read publisher includes:
[0012] Get the last publishing time of the published information last published by the above-mentioned publisher before the above-mentioned target publishing time;
[0013] The above last published time shall be regarded as the updated latest published time of the above read publisher.
[0014] Optionally, the updating of the latest publishing time of the read publisher based on the target publishing time and the read publisher to obtain the updated latest publishing time of the read publisher includes:
[0015] Get preset constants;
[0016] An addition operation or a subtraction operation is performed on the target publishing time and the preset constant to obtain the updated latest publishing time of the read publisher, and the updated latest publishing time is before the target publishing time.
[0017] Optionally, the step of obtaining the unread information published by the target publisher before the target publishing time includes:
[0018] Filter out the latest release time from each of the above target release times;
[0019] Get the unread messages published by each target publisher before the latest publishing time.
[0020] Optionally, the step of obtaining the unread information published by the target publisher before the target publishing time includes:
[0021] Send a request to the information index server;
[0022] Receiving the identifier and initial publishing time of the unread information published by the target publisher before the target publishing time, which are returned by the information index server based on the acquisition request;
[0023] The identifiers of the unread messages are sorted according to the initial release time of the unread messages to obtain the identifiers of a preset number of unread messages;
[0024] The unread information corresponding to the identifiers of the pre-set number of unread information is obtained from the information server.
[0025] Optionally, when a page turning instruction is received, obtaining the latest publishing time of the unread publisher includes:
[0026] When a page turning instruction is received, a request is sent to the cache server to obtain the latest publishing time of the above unread publisher;
[0027] Receive the latest publishing time of the unread publisher returned by the cache server based on the request.
[0028] Optionally, the above-mentioned sorting and displaying of each of the above-mentioned unread information includes:
[0029] The unread information is sorted and displayed based on the initial release time of each of the unread information.
[0030] Optionally, the above-mentioned sorting and displaying of each of the above-mentioned unread information includes:
[0031] Obtain at least one of the number of broadcasts and the number of likes for each of the unread messages;
[0032] Based on at least one of the number of plays and the number of likes, the unread information is sorted and displayed.
[0033] Accordingly, an embodiment of the present application provides an information processing device, including:
[0034] The first acquisition module is used to acquire the target publishing time and the publisher of the read information displayed in the page;
[0035] An updating module, configured to update the latest publishing time of the above-read publisher based on the above-mentioned target publishing time and the above-mentioned publisher, and obtain the updated latest publishing time of the above-mentioned publisher;
[0036] The second acquisition module is used to acquire the latest publishing time of the unread publishers when receiving the page turning instruction, where the unread publishers are publishers other than the read publishers in the attention list;
[0037] A screening module, used for screening out a target publisher from the read publishers and the unread publishers according to the latest publishing time after the update and the latest publishing time;
[0038] The third acquisition module is used to acquire the unread information published by the target publisher before the target publishing time, and sort and display each of the unread information.
[0039] In addition, an embodiment of the present application also provides an electronic device, including a processor and a memory, wherein the memory stores a computer program, and the processor is used to run the computer program in the memory to implement the information processing method provided in the embodiment of the present application.
[0040] In addition, an embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. The computer program is suitable for loading by a processor to execute any information processing method provided in the embodiment of the present application.
[0041] In addition, an embodiment of the present application also provides a computer program product, including a computer program, and when the computer program is executed by a processor, any information processing method provided in the embodiment of the present application is implemented.
[0042] In an embodiment of the present application, the target publishing time and the read publisher of the read information displayed in the page are first obtained. Then, based on the target publishing time and the read publisher, the latest publishing time of the read publisher is updated to obtain the updated latest publishing time of the read publisher. Then, when a page turning instruction is received, the latest publishing time of the unread publisher is obtained, and the unread publisher is the publisher other than the read publisher in the follow list. Then, based on the updated latest publishing time and the latest publishing time, the target publisher is filtered out from the read publisher and the unread publisher. Finally, the unread information published by the target publisher before the target publishing time is obtained, and each unread information is sorted and displayed.
[0043] In an embodiment of the present application, since the latest publishing time of the read publisher is updated to obtain the updated latest publishing time of the read publisher, the target publisher can be filtered out from the read publisher according to the updated latest publishing time of the read publisher and the latest publishing time of the unread publisher. That is, at this time, the target publisher that needs to be displayed in the page after turning the page can be determined, and then only the unread information published by the target publisher before the target publishing time is obtained, and there is no need to obtain the publishing information corresponding to the publisher that does not need to be displayed, thereby greatly reducing the amount of information that needs to be processed, and then improving the speed of read diffusion, so that the page turning service will not time out. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0045] Figure 1 It is a flowchart of the information processing method provided in the embodiment of the present application;
[0046] Figure 2 It is a schematic diagram of the read information, publishing time, and read publisher provided by the embodiment of the present application;
[0047] Figure 3 It is a schematic diagram of the latest release time provided in the embodiment of the present application;
[0048] Figure 4 It is a schematic diagram of the relationship between the terminal, server, cache server, information index server and information server provided in the embodiment of the present application;
[0049] Figure 5 It is a flowchart of another information processing method provided by an embodiment of the present application;
[0050] Figure 6 is a schematic diagram of the information processing process provided by the embodiment of the present application;
[0051] Figure 7 is a schematic diagram of the structure of an information processing device provided in an embodiment of the present application;
[0052] Figure 8 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0053] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0054] The embodiments of the present application provide an information processing method, device and electronic device, wherein the information processing device can be integrated in an electronic device, and the electronic device can be a server, a terminal or other device.
[0055] Among them, the server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, network acceleration services (Content Delivery Network, CDN), as well as big data and artificial intelligence platforms.
[0056] Furthermore, multiple servers may form a blockchain, and the servers are nodes on the blockchain.
[0057] The terminal may be a smart phone, tablet computer, laptop computer, desktop computer, smart speaker, smart watch, smart home appliance, vehicle-mounted terminal, etc., but is not limited thereto. The terminal and the server may be directly or indirectly connected via wired or wireless communication, and this application does not limit this.
[0058] The embodiments of the present application can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, smart transportation, assisted driving, and scenarios for sorting information (the information may be videos, texts, pictures, number of fans, live broadcast status, etc.).
[0059] In addition, the term "plurality" in the embodiments of the present application refers to two or more than two. The terms "first" and "second" in the embodiments of the present application are used to distinguish descriptions and should not be understood as implying relative importance.
[0060] It should be noted that the description order of the following embodiments is not intended to limit the preferred order of the embodiments.
[0061] Read diffusion refers to the technology of presenting the published information of all publishers followed by the user to the user. Write diffusion refers to the technology of pushing the published information of the publisher to the fans.
[0062] In read diffusion, the process of presenting information to users is as follows: obtain the user's follower list, which includes publishers followed by the user and the latest publishing time of these publishers. Sort the latest publishing time and get the top K publishers (K is the number of published information displayed on the page, that is, the number of publishers displayed on the page).
[0063] After determining K publishers, obtain the published information published by these publishers within a specific time period (if the latest publishing time of the first publisher among the K publishers is T1, and the latest publishing time of the last publisher among the K publishers is TK, then the specific time period can be (TK-T1)), then filter out the published information that the user has browsed within the specific time period, and then sort and display the filtered published information.
[0064] Since the follow list only includes the latest publishing time of the publisher, it is impossible to determine the publisher to be displayed after turning the page based on the latest publishing time. At this time, it is necessary to obtain n*K publishers (n means turning to the nth page), and then obtain the publishing information within the (T(n*K)-T1) time period, and finally sort these publishing information based on the publishing time, so as to obtain the K publishing information and publishers to be displayed after turning the page.
[0065] For example, if the number of published information displayed on a page is 5, when receiving the instruction to turn to the second page, 10 publishers need to be obtained at this time, and the 5 publishers to be displayed on the second page cannot be determined yet, and then the published information of these 10 publishers within a specific time period is obtained, and finally 5 published information and publishers corresponding to the 5 published information are filtered out based on the publishing time of the published information. That is, the published information of publishers that do not need to be displayed on the second page is also obtained at this time.
[0066] In this scheme, as the number of pages browsed by users increases, the number of publishers and published information that need to be obtained increases exponentially, resulting in an exponential increase in the amount of information to be processed, which reduces the speed of read diffusion and causes the page turning service to time out. In addition, due to the large amount of information to be processed, the amount of information to be cached is also large, resulting in the amount of information to be cached may exceed the size of the local cache.
[0067] In order to solve the above-mentioned technical problems, the present application provides an information processing method, in which, in an embodiment of the present application, the target publishing time and the read publisher of the read information displayed in the page are first obtained. Then, based on the target publishing time and the read publisher, the latest publishing time of the read publisher is updated to obtain the updated latest publishing time of the read publisher. Then, when a page turning instruction is received, the latest publishing time of the unread publisher is obtained, and the unread publisher is the publisher other than the read publisher in the follow-up list. Then, based on the updated latest publishing time and the latest publishing time, the target publisher is filtered out from the read publishers and the unread publishers. Finally, the unread information published by the target publisher before the target publishing time is obtained.
[0068] In the embodiment of the present application, since the latest publishing time of the read publisher is updated to obtain the updated latest publishing time of the read publisher, the target publisher can be screened out from the read publisher according to the updated latest publishing time of the read publisher and the latest publishing time of the unread publisher, that is, at this time, the target publisher to be displayed in the page after turning the page can be determined, that is, only K publishers can be obtained, without obtaining n*K publishers, and then only the unread information published by the target publisher before the target publishing time is obtained, and there is no need to obtain the publishing information corresponding to the publisher that does not need to be displayed (for example, the number of publishing information displayed on one page is 5, then when the instruction to turn to the second page is received, only the 5 publishers to be displayed on the second page and the publishing information corresponding to these 5 publishers can be obtained at this time), thereby greatly reducing the amount of information that needs to be processed and cached, and then improving the speed of read diffusion, so that the page turning service will not time out and the amount of cached information will not exceed the size of the local cache.
[0069] In this embodiment, the description will be made from the perspective of an information processing device. The information processing device can be specifically integrated into a device such as a server or a terminal. In order to facilitate the description of the information processing method of the present application, the following will be described in detail with the information processing device integrated in the terminal, that is, with the terminal as the execution subject.
[0070] See also Figure 1 , Figure 1 : is a flowchart of an information processing method provided by an embodiment of the present application. The information processing method may include:
[0071] S101, obtaining the target publishing time and the publisher of the read information displayed in the page.
[0072] When it is detected that the read information is displayed in the page, the terminal can obtain the target publishing time and the publisher of the read information displayed in the page.
[0073] Alternatively, after receiving the page turning instruction, the terminal may obtain the target publishing time and the publisher of the read information displayed in the page.
[0074] The page turning command refers to the command generated by the terminal after the user performs a page turning operation on the page. The page turning operation refers to the operation in which the information displayed on the page changes after the terminal executes the page turning command. The page turning operation includes but is not limited to clicking, sliding, and long pressing.
[0075] Read information refers to the information displayed on the page, such as Figure 2 As shown in , the read information refers to the text and pictures posted by user A, the text and pictures posted by user B, or the text and pictures posted by user C. The target publishing time refers to the time when the read publisher posts the read information, and the read publisher refers to the user who posts the read information. For example, Figure 2 As shown, the target publishing time refers to T1, T2 or T3. The read publisher refers to user A, user B or user C.
[0076] It should be noted that the page may refer to the current page or to multiple pages that have been displayed. In addition, the target publishing time of the read information and the publisher of the read information may be associated and stored in the timetable.
[0077] S102: Based on the target publishing time and the read publisher, the latest publishing time of the read publisher is updated to obtain the updated latest publishing time of the read publisher.
[0078] After the read information is displayed on the page, that is, after the read information corresponding to the latest publishing time of the read publisher has been browsed by the user, when turning the page, the read publishers can no longer be sorted directly based on the latest publishing time.
[0079] For example, Figure 3 As shown, on the first page, the posting time of user A is T1, that is, the latest posting time of user A is T1, and the posting time of user C is T3, that is, the latest posting time of user C is T3. Since the posting information corresponding to T1 and the posting information corresponding to T3 have been displayed, when turning to the second page, user A and user C can no longer be sorted based on T1 and T3.
[0080] Therefore, after obtaining the target publishing time and the read publisher of the read information, the terminal needs to update the latest publishing time of the read publisher based on the target publishing time and the read publisher, and obtain the updated latest publishing time of the read publisher, so that the read publisher can be sorted based on the updated latest publishing time later.
[0081] The latest publishing time refers to the publishing time of the latest published information published by the read publisher.
[0082] Wherein, based on the target publishing time and the read publisher, the latest publishing time of the read publisher is updated, and the process of obtaining the updated latest publishing time of the read publisher can be:
[0083] Get the last publishing time of the published information that was last published by the read publisher before the target publishing time, and use the last publishing time as the latest updated publishing time of the read publisher.
[0084] For example, the publisher A published information 1 at time T1, published information 2 at time T2, and published information 3 at time T3. T2 is before T1, and T3 is before T2. The page displays published information 1, and the target publishing time of the read information is T1. The last published information before the target publishing time T1 is published information 2, and the publishing time of published information 2 is T2. At this time, time T2 is used as the latest updated publishing time of the publisher.
[0085] Alternatively, based on the target publishing time and the read publisher, the latest publishing time of the read publisher is updated, and the process of obtaining the updated latest publishing time of the read publisher can also be:
[0086] Get a preset constant; perform addition or subtraction operation on the target publishing time and the preset constant to obtain the latest updated publishing time of the read publisher, and the latest updated publishing time is before the target publishing time.
[0087] After obtaining the target publishing time and the publisher who has read the message, the terminal can obtain a preset constant. If the preset constant is a positive number, the target publishing time is subtracted from the preset constant to obtain the latest updated publishing time. If the preset constant is a negative number, the target publishing time is added with the preset constant to obtain the latest updated publishing time.
[0088] The preset constant can be set according to actual conditions. For example, the preset constant can be set to 1 second or 5 seconds, which is not limited in this application.
[0089] S103: When a page turning instruction is received, the latest publishing time of unread publishers is obtained, where the unread publishers are publishers other than the read publishers in the attention list.
[0090] The watchlist includes publishers followed by the user and their latest publishing times. Since the updated latest publishing time of the read publishers has been determined, it is possible to obtain only the latest publishing time of the unread publishers in the watchlist, without obtaining the latest publishing time of the read publishers in the watchlist.
[0091] It should be understood that the latest publishing time may be present in the watch list in the form of a timestamp.
[0092] In addition, if the terminal obtains the publishing time of the read information displayed in the page and the read publisher after detecting that the read information is displayed in the page, then after determining the latest updated publishing time of the read publisher, the latest updated publishing time of the read publisher can be stored in the memory. Then, after receiving the page turning instruction, the latest publishing time of the unread publisher is obtained and the latest updated publishing time of the read publisher is obtained from the memory.
[0093] Optionally, in order to reduce the occupied memory, the updated latest publishing time of the read publisher may be compressed before being stored.
[0094] If the terminal obtains the target publishing time and the read publisher of the read information displayed on the page after receiving the page turning instruction, then after obtaining the updated latest publishing time of the read publisher, the latest publishing time of the unread publisher can be directly obtained, without the need to obtain the latest publishing time of the unread publisher after receiving the page turning instruction.
[0095] In some embodiments, the terminal may send a request to the cache server to obtain the latest publishing time of the unread publisher. After receiving the request, the cache server returns the latest publishing time of the unread publisher to the terminal based on the request, so that the terminal obtains the latest publishing time of the unread publisher.
[0096] Among them, after determining the latest updated publishing time of the read publisher, the terminal can obtain a follower list from the local cache or the server. The follower list includes publishers followed by the user. The terminal then filters out unread publishers from the follow list based on the read publishers, and then sends a request to the cache server to obtain the latest publishing time of the unread publishers.
[0097] Or, if Figure 4 As shown, the terminal sends the schedule to the server, and the server then filters out the unread publishers that are not included in the schedule but included in the follower list based on the schedule and the follower list. Then the server sends a request to the cache server to obtain the latest publishing time of the unread publishers.
[0098] In this embodiment, since the updated latest publishing time of the read publisher has been determined, there is no need to obtain the updated latest publishing time of the read publisher from the cache server. Only the latest publishing time of the unread publisher needs to be obtained from the cache server. Therefore, the number of requests to the cache server can be reduced, reducing the pressure on the cache server to read the latest update time.
[0099] S104: Filter out target publishers from read publishers and unread publishers according to the updated latest publishing time and the latest publishing time.
[0100] After obtaining the latest published time after update and the latest published time, the terminal can sort the latest published time after update and the latest published time, and then obtain the publishers corresponding to the first K (K is the number of published information displayed on the page) times as target publishers.
[0101] For example, after the update, the latest publishing times are Ta, Tb and Tc, and the latest publishing times are Td, Te and Tf, and K is 3. After sorting, we get Tb, Td, Tf, Ta, Te and Ta. Then we take the publishers corresponding to the first three times Tb, Td and Tf as the target publishers.
[0102] S105: Obtain unread information published by the target publisher before the target publishing time, sort and display each unread information.
[0103] After determining the target publisher, the terminal obtains the unread information published by the target publisher before the target publishing time.
[0104] Optionally, since there are multiple read information displayed on the page, the target publishing times corresponding to the read information also include multiple, in order to further reduce the number of unread information obtained, the latest publishing time can be filtered out from each target publishing time, and then the unread information published by each target publisher before the latest time can be obtained.
[0105] For example, Figure 2 As shown, the first page includes three publishing times T1, T2 and T3. The first page sorts the read information based on the latest publishing time, that is, T2 is before T1, and T3 is before T2. The latest publishing time is T3, and the unread information published by the target publisher before T3 is obtained.
[0106] It should be noted that the terminal can send a request to obtain information to the information index server. After receiving the request, the information index server returns the identifier and initial release time of the unread information published by the target publisher before the target release time to the terminal, so that the terminal obtains the identifier and initial release time of the unread information published by the target publisher before the target release time. Then, the terminal sorts the identifiers of each unread information according to the initial release time of each unread information to obtain the identifiers of the previously preset number of unread information. Finally, the terminal obtains the unread information corresponding to the identifiers of the previously preset number of unread information from the information server.
[0107] The request includes the target publisher and the target publishing time. The preset number is the number of information displayed on the page. In addition, the number of identifiers and initial publishing times of the unread information published by the target publisher before the target publishing time can be set. That is, the identifiers and initial publishing times of the target number of unread information published by the target publisher before the target publishing time can be obtained. This reduces the identifiers and initial publishing times of the unread information obtained, speeding up the acquisition.
[0108] Or, if Figure 4 As shown, the terminal can send the target publisher and the target publishing time to the server, and the server then sends an acquisition request to the information index server based on the target publisher and the target publishing time. After receiving the acquisition request, the information index server returns the identifier and initial publishing time of the unread information published by the target publisher before the target publishing time to the server, and the server then forwards it to the terminal, so that the terminal obtains the identifier and initial publishing time of the unread information published by the target publisher before the target publishing time.
[0109] Then, the terminal sorts the identifiers of the unread messages according to the initial release time of the unread messages to obtain the identifiers of the first preset number of unread messages. Finally, the terminal obtains the unread messages corresponding to the identifiers of the first preset number of unread messages from the information server.
[0110] Since the amount of information obtained from the information index server each time is limited, the more the number of unread information identifiers and initial release times that need to be obtained, the more times the information is requested from the information index server. In this embodiment, only the identifiers and initial release times of the target publisher's unread information need to be obtained from the information index server, and the identifiers and initial release times of the unread information of the publishers that do not need to be displayed do not need to be obtained. Therefore, the number of requests to the information index server can be reduced, and the pressure on the information index server to read the identifiers and initial release times of the unread information can be reduced.
[0111] For example, the follow list includes 1,000 publishers, and the number of information displayed on each page is 10. When turning to page N, in the related art, the number of requests to the cache server and the information index server is:
[0112]
[0113] In this embodiment, the maximum number of requests to the cache server and the information index server is 1010N, and the minimum number is:
[0114]
[0115] From the above formula, it can be seen that the number of requests to the cache server and the information index server in this embodiment is less than the number of requests to the cache server and the information index server in the related art. In addition, it can be seen that as the number of pages browsed by the user increases, the number of requests to the cache server and the information index server in the related art also increases, while the number of requests to the cache server and the information index server in this embodiment decreases instead.
[0116] After obtaining the unread information published by the target publisher before the target publishing time, the unread information is sorted and displayed.
[0117] After each unread message is displayed, the process returns to S101.
[0118] The process of sorting the unread information may include: sorting the unread information based on the release time of the unread information.
[0119] Alternatively, the process of sorting the unread messages may also include: obtaining at least one of the broadcast count and the like count of each unread message, and then sorting the unread messages based on at least one of the broadcast count and the like count.
[0120] In this embodiment, since only the unread information published by the target publisher before the publishing time is sorted, there is no need to sort the information published by the publisher who does not need to be displayed on the page after turning the page, so the amount of calculation for sorting can be greatly reduced. Therefore, even in a high-concurrency scenario where users follow many publishers, the page turning service will not time out.
[0121] For example, if a user follows 1,000 publishers and the number of pieces of information displayed on each page is 10, when turning to page N, in the related art, for page N, it is necessary to pull the latest update time of 1,000 publishers and 10*N pieces of information 10*N times, that is, the number of pieces of information that need to be sorted is 100N. 2 (10*N*10*N=100N 2) Then the total computational amount required for sorting the first N pages is as follows:
[0122]
[0123] In this embodiment, for the Nth page, only the latest update time of the publisher is pulled M times (1010 - 10*N < M < 1000) and 10 pieces of information are pulled 10 times, that is, the number of pieces of information to be sorted is 100. Then the total computational amount required for sorting the first N pages is as follows:
[0124] 1000×N + 100log(100)×N = 1200N
[0125] It can be seen from the above formula that the total computational amount required for sorting in this embodiment is much smaller than the total computational amount of sorting in the related art.
[0126] As can be seen from the above, in the embodiment of the present application, first, the target release time and the read publishers of the read information displayed in the page are obtained. Then, based on the target release time and the read publishers, the latest release time of the read publishers is updated to obtain the updated latest release time of the read publishers. Next, the latest release time of the unread publishers is obtained, and the unread publishers are the publishers other than the read publishers in the follow-up list. Then, based on the updated latest release time and the latest release time, the target publishers are screened out from the read publishers and the unread publishers. Finally, the unread information published by the target publishers before the target release time is obtained.
[0127] In the embodiment of the present application, since the latest release time of the read publishers is updated to obtain the updated latest release time of the read publishers, therefore, the target publishers can be screened out from the read publishers based on the updated latest release time of the read publishers and the latest release time of the unread publishers, that is, at this time, the target publishers to be displayed in the page after paging can be determined, that is, only K publishers need to be obtained, and there is no need to obtain n*K publishers. Then, only the unread information published by the target publishers before the target release time is obtained, and there is no need to obtain the release information corresponding to the publishers that do not need to be displayed, thereby greatly reducing the number of pieces of information to be processed, and further improving the speed of read diffusion, so that the paging service will not time out.
[0128] According to the method described in the above embodiment, the following will give a further detailed description by way of examples.
[0129] In this embodiment, it is assumed that the information processing device is integrated in the server. Please refer to Figure 5 , Figure 5 which is a schematic flowchart of the information processing method provided by the embodiment of the present application. The information processing method process may include:
[0130] S501. The server obtains a schedule, which includes a target publishing time and a publisher of the read information displayed in the current page.
[0131] The current page refers to the page of the terminal. After the terminal detects that the read information is displayed in the current page, it obtains the target release time and the publisher of the read information displayed in the current page. The target release time of the read information and the publisher of the read information are associated and stored in the schedule, and the schedule is sent to the server.
[0132] Read information refers to the information displayed on the current page, such as Figure 2 As shown in , the read information refers to the text and pictures posted by user A, the text and pictures posted by user B, or the text and pictures posted by user C. The target publishing time refers to the time when the read publisher posts the read information, and the read publisher refers to the user who posts the read information. For example, Figure 2 As shown, the target publishing time refers to T1, T2 or T3. The read publisher refers to user A, user B or user C.
[0133] S502: The server obtains the read publisher and the target publishing time from the schedule, and obtains the last publishing time of the published information last published by the read publisher before the target publishing time, and uses the last publishing time as the updated latest publishing time of the read publisher.
[0134] For example, the publisher A published information 1 at time T1, published information 2 at time T2, and published information 3 at time T3. T2 is before T1, and T3 is before T2. The current page displays information 1, and the target publishing time of the read information is T1. The last published information before the target publishing time T1 is information 2, and the publishing time of information 2 is T2. At this time, time T2 is used as the latest updated publishing time of the publisher.
[0135] S503, the server obtains a preset constant and obtains the read publisher and the target publishing time from the schedule, and performs addition or subtraction operation on the target publishing time and the preset constant to obtain the updated latest publishing time of the read publisher, and the updated latest publishing time is before the target publishing time.
[0136] After obtaining the target publishing time and the publisher who has read the message, the server can obtain a preset constant. If the preset constant is a positive number, the target publishing time is subtracted from the preset constant to obtain the latest publishing time after the update. If the preset constant is a negative number, the target publishing time is added with the preset constant to obtain the latest publishing time after the update.
[0137] The preset constant can be set according to actual conditions. For example, the preset constant can be set to 5 seconds, which is not limited in this application.
[0138] S504: When receiving a page turning instruction, the server filters out unread publishers based on the schedule and the follower list.
[0139] The page turning command refers to the command generated by the terminal after the user performs a page turning operation on the page. The page turning operation refers to the operation in which the information displayed on the page changes after the terminal executes the page turning command. The page turning operation includes but is not limited to clicking, sliding, and long pressing.
[0140] The terminal sends the page turning instruction to the server, and the server receives the page turning instruction.
[0141] After receiving the page turning instruction, the server screens out unread publishers that are not included in the schedule but included in the follower list based on the schedule and the follower list.
[0142] For example, Figure 6 As shown, based on the schedule and the follower list on page i-1, the server filters out unread publishers that are not included in the schedule but included in the follower list.
[0143] S505: The server sends a request to the cache server to obtain the latest publishing time of the unread publisher, and receives the latest publishing time of the unread publisher returned by the cache server based on the request.
[0144] Since the updated latest publishing time of the read publisher has been determined, only the latest publishing time of the unread publisher needs to be obtained from the cache server. Therefore, the number of requests to the cache server can be reduced, reducing the pressure on the cache server to read the latest update time.
[0145] S506: The server selects a target publisher from the read publishers and the unread publishers according to the updated latest publishing time and the latest publishing time.
[0146] For example, Figure 6 As shown, after obtaining the latest publishing time after update and the latest publishing time, the server can sort the latest publishing time after update and the latest publishing time, and then obtain the publishers corresponding to the first K (K is the number of publishing information displayed on the page) times of the sort as target publishers.
[0147] For example, after the update, the latest publishing times are Ta, Tb and Tc, and the latest publishing times are Td, Te and Tf, and K is 3. After sorting, we get Tb, Td, Tf, Ta, Te and Ta. Then we take the publishers corresponding to the first three times Tb, Td and Tf as the target publishers.
[0148] S507: The server sends an acquisition request to the information index server, and receives the identifiers and initial publishing time of the target number of unread information before the target ranking that are published by the target publisher before the target publishing time and returned by the information index server based on the acquisition request.
[0149] For example, Figure 6 As shown, the target number is set to Q, and the information index server returns the identifiers and initial publishing time of the first Q unread messages of each publisher. At this time, each publisher refers to the first K publishers, that is, the target publishers.
[0150] The request includes the target publisher and the target publishing time. The number of targets can be set according to the actual situation, and this application does not limit it here.
[0151] Since only the identifier of the target publisher's unread information and the initial publishing time need to be obtained from the information index server, and there is no need to obtain the identifier of the unread information and the initial publishing time of the unread information of the publisher that does not need to be displayed, the number of requests to the information index server can be reduced, reducing the pressure on the information index server to read the identifier and publishing time of the unread information.
[0152] S508: The server sorts the identifiers of the unread messages based on the initial release time of the unread messages to obtain the identifiers of a preset number of unread messages.
[0153] The preset number is the amount of information displayed on the page. For example, the preset number is set to K.
[0154] S509: The server obtains unread information corresponding to the identifiers of a preset number of unread information from the information server.
[0155] S5010: The server sends the unread information corresponding to the identifiers of the preset number of unread information to the terminal for display, so that the terminal updates the schedule based on the displayed information, and returns to execute S501.
[0156] For example, Figure 6 As shown, the server sends the first K unread messages to the terminal for display, and the terminal updates the i-1th page schedule to obtain the i-th page schedule, and returns the i-th page schedule to the server.
[0157] In an embodiment of the present application, since the latest publishing time of the read publisher is updated to obtain the updated latest publishing time of the read publisher, the target publisher can be filtered out from the read publisher according to the updated latest publishing time of the read publisher and the latest publishing time of the unread publisher. That is, at this time, the target publisher that needs to be displayed on the page after turning the page can be determined, and then only the unread information published by the target publisher before the publishing time is obtained, and there is no need to obtain the publishing information corresponding to the publisher that does not need to be displayed, thereby greatly reducing the amount of information that needs to be sorted, and then improving the speed of read diffusion.
[0158] In order to better implement the information processing method provided in the embodiment of the present application, the embodiment of the present application also provides a device based on the above information processing method. The meanings of the terms are the same as those in the above information processing method, and the specific implementation details can refer to the description in the method embodiment.
[0159] For example, Figure 7 As shown, the image processing device may include:
[0160] The first acquisition module 701 is used to acquire the target publishing time and the publisher of the read information displayed in the page.
[0161] The updating module 702 is used to update the latest publishing time of the read publisher based on the target publishing time and the read publisher, and obtain the updated latest publishing time of the read publisher.
[0162] The second acquisition module 703 is used to acquire the latest publishing time of unread publishers, where unread publishers are publishers other than read publishers in the attention list.
[0163] The screening module 704 is used to screen out target publishers from the read publishers and the unread publishers according to the updated latest publishing time and the latest publishing time.
[0164] The third acquisition module 705 is used to acquire the unread information published by the target publisher before the target publishing time, sort and display each unread information.
[0165] Optionally, the updating module 702 is specifically configured to execute:
[0166] Get the last publishing time of the published information that was last published by the read publisher before the target publishing time;
[0167] Use the last published time as the updated latest published time of the read publisher.
[0168] Optionally, the updating module 702 is specifically configured to execute:
[0169] Get preset constants;
[0170] An addition operation or a subtraction operation is performed on the target publishing time and a preset constant to obtain the updated latest publishing time of the read publisher, and the updated latest publishing time is before the target publishing time.
[0171] Optionally, the information processing device further includes:
[0172] The filtering submodule is used to filter out the latest publishing time from each target publishing time, and obtain the unread information published by each target publisher before the latest publishing time.
[0173] Optionally, the third acquisition module 705 is specifically configured to execute:
[0174] Send a request to the information index server;
[0175] Receiving the identifier and initial publishing time of the unread information published by the target publisher before the target publishing time returned by the information index server based on the acquisition request;
[0176] Sorting the identifiers of the unread messages according to the initial release time of the unread messages to obtain the identifiers of a preset number of unread messages;
[0177] The unread messages corresponding to the identifiers of the previously preset number of unread messages are obtained from the message server.
[0178] Optionally, the second acquisition module 703 is specifically configured to execute:
[0179] When receiving a page turning instruction, a request is sent to the cache server to obtain the latest publishing time of the unread publisher;
[0180] The receiving cache server returns the latest publishing time of the unread publisher based on the request.
[0181] Optionally, the third acquisition module 705 is specifically configured to execute:
[0182] The unread messages are sorted and displayed based on their initial release time.
[0183] Optionally, the third acquisition module 705 is specifically configured to execute:
[0184] Obtain at least one of the number of broadcasts and the number of likes for each unread message;
[0185] Based on at least one of the number of plays and the number of likes, each unread message is sorted and displayed.
[0186] In specific implementation, the above modules can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation methods and corresponding beneficial effects of the above modules can be found in the previous method embodiments, which will not be repeated here.
[0187] The present application also provides an electronic device, which may be a server or a terminal, etc. Figure 8 As shown, it shows a schematic diagram of the structure of the electronic device involved in the embodiment of the present application, specifically:
[0188] The electronic device may include components such as a processor 801 with one or more processing cores, a memory 802 with one or more computer-readable storage media, a power supply 803, and an input unit 804. Those skilled in the art will appreciate that Figure 8 The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0189] The processor 801 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. By running or executing computer programs and / or modules stored in the memory 802, and calling data stored in the memory 802, it performs various functions of the electronic device and processes data, thereby monitoring the electronic device as a whole. Optionally, the processor 801 may include one or more processing cores; preferably, the processor 801 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 801.
[0190] The memory 802 can be used to store computer programs and modules. The processor 801 executes various functional applications and data processing by running the computer programs and modules stored in the memory 802. The memory 802 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, a computer program required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 802 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 802 may also include a memory controller to provide the processor 801 with access to the memory 802.
[0191] The electronic device also includes a power supply 803 for supplying power to each component. Preferably, the power supply 803 can be logically connected to the processor 801 through a power management system, so as to manage charging, discharging, power consumption and other functions through the power management system. The power supply 803 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators and other arbitrary components.
[0192] The electronic device may further include an input unit 804, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0193] Although not shown, the electronic device may further include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 801 in the electronic device will load the executable files corresponding to the processes of one or more computer programs into the memory 802 according to the following instructions, and the processor 801 will run the computer programs stored in the memory 802, thereby realizing various functions, such as:
[0194] Get the target publishing time and publisher of the read information displayed on the page;
[0195] Based on the target publishing time and the read publisher, the latest publishing time of the read publisher is updated to obtain the updated latest publishing time of the read publisher;
[0196] When a page turning instruction is received, the latest publishing time of unread publishers is obtained, and the unread publishers are publishers other than the read publishers in the follow list;
[0197] Filter target publishers from read publishers and unread publishers according to the latest published time after update and the latest published time;
[0198] Get the unread messages published by the target publisher before the target publishing time, sort and display each unread message.
[0199] The specific implementation methods and corresponding beneficial effects of the above operations can be found in the detailed description of the image processing method above, which will not be elaborated here.
[0200] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by a computer program, or by controlling related hardware through a computer program. The computer program may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0201] To this end, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored, and the computer program can be loaded by a processor to execute the steps in any image processing method provided in the embodiment of the present application. For example, the computer program can execute the following steps:
[0202] Get the target publishing time and publisher of the read information displayed on the page;
[0203] Based on the target publishing time and the read publisher, the latest publishing time of the read publisher is updated to obtain the updated latest publishing time of the read publisher;
[0204] When a page turning instruction is received, the latest publishing time of unread publishers is obtained, and the unread publishers are publishers other than the read publishers in the follow list;
[0205] Filter target publishers from read publishers and unread publishers according to the latest published time after update and the latest published time;
[0206] Get the unread messages published by the target publisher before the target publishing time, sort and display each unread message.
[0207] The specific implementation methods and corresponding beneficial effects of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0208] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.
[0209] Since the computer program stored in the computer-readable storage medium can execute the steps in any information processing method provided in the embodiments of the present application, the beneficial effects that can be achieved by any information processing method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0210] According to one aspect of the present application, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the above-mentioned information processing method.
[0211] The above is a detailed introduction to an information processing method, device, electronic device and computer-readable storage medium provided in the embodiments of the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. An information processing method, It is characterized in that include: Get the target publishing time and publisher of the read information displayed on the page; Based on the target publishing time and the read publisher, updating the latest publishing time of the read publisher to obtain the updated latest publishing time of the read publisher; When a page turning instruction is received, the latest publishing time of unread publishers is obtained, where the unread publishers are publishers in the attention list except the read publishers; Filtering a target publisher from the read publishers and the unread publishers according to the updated latest publishing time and the latest publishing time; The unread information published by the target publisher before the target publishing time is obtained, and each of the unread information is sorted and displayed.
2. The information processing method according to claim 1, It is characterized in that The updating of the latest publishing time of the read publisher based on the target publishing time and the read publisher to obtain the updated latest publishing time of the read publisher includes: Obtain the last publishing time of the published information last published by the read publisher before the target publishing time; The last publishing time is used as the updated latest publishing time of the read publisher.
3. The information processing method according to claim 1, It is characterized in that The updating of the latest publishing time of the read publisher based on the target publishing time and the read publisher to obtain the updated latest publishing time of the read publisher includes: Get preset constants; An addition operation or a subtraction operation is performed on the target publishing time and the preset constant to obtain the updated latest publishing time of the read publisher, where the updated latest publishing time is before the target publishing time.
4. The information processing method according to claim 1, It is characterized in that The obtaining of unread information published by the target publisher before the target publishing time includes: Filter out the latest release time from each of the target release times; Get the unread information published by each target publisher before the latest publishing time.
5. The information processing method according to claim 1, It is characterized in that The obtaining of unread information published by the target publisher before the target publishing time includes: Send a request to the information index server; Receiving the identifier and initial publishing time of the unread information published by the target publisher before the target publishing time, which are returned by the information index server based on the acquisition request; Sorting the identifiers of the unread messages according to the initial release time of the unread messages to obtain the identifiers of a preset number of unread messages; The unread messages corresponding to the identifiers of the previously preset number of unread messages are obtained from the message server.
6. The information processing method according to claim 1, It is characterized in that When a page turning instruction is received, obtaining the latest publishing time of the unread publisher includes: When a page turning instruction is received, a request is sent to the cache server to obtain the latest publishing time of the unread publisher; Receive the latest publishing time of the unread publisher returned by the cache server based on the request.
7. The information processing method according to claim 1, It is characterized in that The sorting and displaying of each of the unread messages includes: The unread information is sorted and displayed based on the initial release time of each unread information.
8. The information processing method according to claim 1, It is characterized in that The sorting and displaying of each of the unread messages includes: Obtain at least one of the number of plays and the number of likes for each of the unread messages; Based on at least one of the number of plays and the number of likes, each of the unread information is sorted and displayed.
9. An information processing device, It is characterized in that include: The first acquisition module is used to acquire the target publishing time and the publisher of the read information displayed in the page; An updating module, configured to update the latest publishing time of the read publisher based on the target publishing time and the read publisher, and obtain the updated latest publishing time of the read publisher; A second acquisition module is used to acquire the latest publishing time of unread publishers when receiving a page turning instruction, wherein the unread publishers are publishers other than the read publishers in the attention list; A screening module, configured to screen out a target publisher from the read publishers and the unread publishers according to the latest publishing time after the update and the latest publishing time; The third acquisition module is used to acquire the unread information published by the target publisher before the target publishing time, and sort and display each of the unread information.
10. An electronic device, It is characterized in that The invention comprises a processor and a memory, wherein the memory stores a computer program, and the processor is used to run the computer program in the memory to execute the information processing method according to any one of claims 1 to 8.
