Data processing method and related equipment
By re-acquisitioning and inserting content in the data queue, the problem of low-frequency content affecting user experience is solved, achieving uniform display of content and improving user experience, while reducing server pressure.
Patent Information
- Application Number
- CN202310856038.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-12
- Publication Date
- 2025-01-14
AI Technical Summary
In some cases, a certain type of content appears less frequently in the data queue, resulting in a lower user experience, especially when the content ranked first is a video, it takes more time for the user to see other types of content.
Re-mix the content to improve the user experience by re-acquisitioning the second type of content and inserting it into the data queue when a specific condition is met. The specific steps include: determining whether the trigger condition is met, if it is met, sending a acquisition request to the target server, receiving and inserting the data queue to be processed, and ensuring that the two types of content are displayed evenly on the page.
By re-acquisitioning and inserting content, the display frequency of the second type of content is increased, the user experience is improved, and users can see different types of content in a timely manner, reducing server pressure and traffic costs.
Smart Images

Figure CN119311343A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a data processing method and related equipment. Background Art
[0002] In the related art, in order to increase the interest of an application, different types of content may be displayed simultaneously on a page.
[0003] However, the inventors of the present disclosure have discovered that, in some cases, certain types of content may be relatively small in number, resulting in a lower frequency of appearance, which in turn affects the user experience. Summary of the invention
[0004] The present disclosure proposes a data processing method and related devices to solve or partially solve the above problems.
[0005] In a first aspect, the present disclosure provides a data processing method, comprising:
[0006] In response to satisfying the first trigger condition, determining whether a second trigger condition is satisfied and whether a queue of data to be processed includes a first content, the queue of data to be processed including at least one second content of a type different from that of the first content;
[0007] In response to determining that the second trigger condition is satisfied and the queue of data to be processed does not include the first content, sending a request to a target server to obtain the first content;
[0008] In response to receiving the first content returned by the target server, the first content is inserted into a target position of the to-be-processed data queue.
[0009] In a second aspect of the present disclosure, a data processing device is provided, comprising:
[0010] a determination module configured to: in response to satisfying a first trigger condition, determine whether a second trigger condition is satisfied and whether a queue of data to be processed includes a first content, the queue of data to be processed including at least one second content of a type different from that of the first content;
[0011] a sending module, configured to: in response to determining that the second trigger condition is satisfied and the queue of data to be processed does not include the first content, send a request to a target server to obtain the first content;
[0012] The inserting module is configured to: in response to receiving the first content returned by the target server, insert the first content into a target position of the to-be-processed data queue.
[0013] In a third aspect of the present disclosure, a computer device is provided, comprising one or more processors, a memory; and one or more programs, wherein the one or more programs are stored in the memory and executed by the one or more processors, and the programs include instructions for executing the method described in the first aspect.
[0014] According to a fourth aspect of the present disclosure, a non-volatile computer-readable storage medium containing a computer program is provided. When the computer program is executed by one or more processors, the processors execute the method described in the first aspect.
[0015] In a fifth aspect of the present disclosure, a computer program product is provided, comprising computer program instructions, which, when executed on a computer, cause the computer to execute the method described in the first aspect.
[0016] The data processing method and related devices provided by the embodiments of the present disclosure, when conditions are met, insert the second type of content into the data queue by re-acquiring the second type of content, so that when the second type of content is not included in the data queue, at least two types of content can still be re-mixed, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the present disclosure or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0018] Figure 1A A schematic diagram showing an exemplary system provided by an embodiment of the present disclosure is shown.
[0019] Figure 1B A schematic diagram showing exemplary content data according to an embodiment of the present disclosure.
[0020] Figure 1C A schematic diagram showing an exemplary state of a data queue after a sliding operation according to an embodiment of the present disclosure is shown.
[0021] Figure 2A A schematic diagram of an exemplary method provided by an embodiment of the present disclosure is shown.
[0022] Figure 2B A schematic diagram of an exemplary data queue according to an embodiment of the present disclosure is shown.
[0023] Figure 2CA schematic diagram showing an exemplary data queue after the second type of content is inserted according to an embodiment of the present disclosure.
[0024] Figure 2D A schematic diagram showing another exemplary data queue after the second type of content is inserted according to an embodiment of the present disclosure.
[0025] Figure 3A A schematic diagram of another exemplary data queue according to an embodiment of the present disclosure is shown.
[0026] Figure 3B A schematic diagram showing another exemplary data queue after adjusting the position of the second type of content according to an embodiment of the present disclosure is shown.
[0027] Figure 4 A schematic diagram showing another exemplary method provided by an embodiment of the present disclosure is shown.
[0028] Figure 5 A schematic diagram of the hardware structure of an exemplary computer device provided in an embodiment of the present disclosure is shown.
[0029] Figure 6 A schematic diagram of an exemplary device provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0030] In order to make the objectives, technical solutions and advantages of the present disclosure more clearly understood, the present disclosure is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.
[0031] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present disclosure should be understood by people with ordinary skills in the field to which the present disclosure belongs. The "first", "second" and similar words used in the embodiments of the present disclosure do not indicate any order, quantity or importance, but are only used to distinguish different components. "Including" or "comprising" and similar words mean that the elements or objects appearing before the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0032] It is understandable that before using the technical solutions of each embodiment of the present disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved will be informed to the user in an appropriate manner, and the user's authorization will be obtained.
[0033] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly remind the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can independently choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.
[0034] As an optional but non-limiting implementation, in response to receiving the user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0035] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0036] Figure 1A A schematic diagram of an exemplary system 100 provided by an embodiment of the present disclosure is shown.
[0037] like Figure 1A As shown, the system 100 may include a terminal device 102 and a first server 104. The first server 104 may return required data to the terminal device 102 in response to a request from the terminal device 102. In some embodiments, Figure 1A As shown, the system 100 may further include a second server 106, which may provide services different from those of the first server 104. In some embodiments, the second server 106 may return required data to the first server 104 in response to a request from the first server 104. As an optional embodiment, the second server 106 may directly respond to a request from the terminal device 102 and return required data to the terminal device 102.
[0038] In some embodiments, Figure 1A As shown, the system 100 may further include a first data server 108 and a second database server 110. The first server 104 may use the first data server 108 to store data, and may retrieve corresponding data from the first data server 108 as required. The second server 106 may use the second database server 110 to store data, and may retrieve corresponding data from the second database server 110 as required.
[0039] The terminal device 102, the first server 104, the second server 106, the first data server 108 and the second database server 110 may include a medium (e.g., a network) providing a communication link. The network may include various connection types, such as wired, wireless communication links or optical fiber cables.
[0040] Various applications (APPs) may be installed on the terminal device 102, such as image processing applications, video conferencing applications, reading applications, video applications, social applications, payment applications, web browsers, and instant messaging tools, etc. These applications may all be used to display content.
[0041] The terminal device 102 here can be hardware or software. When the terminal device 102 is hardware, it can be various electronic devices with a display screen, including but not limited to smart phones, tablet computers, e-book readers, MP3 players, laptop computers (Laptops) and desktop computers (PCs), etc. When the terminal device 102 is software, it can be installed in the electronic devices listed above. It can be implemented as multiple software or software modules (for example, to provide distributed services), or it can be implemented as a single software or software module. No specific limitation is made here.
[0042] The first server 104 and the second server 106 may be servers that provide various services, such as background servers that provide support for various applications displayed on the terminal device 102. The first data server 108 and the second database server 110 may also be database servers that provide various services. It can be understood that if the first server 104 and the second server 106 can implement the relevant functions of the first data server 108 and the second database server 110, the first data server 108 and the second database server 110 may not be set in the system 100.
[0043] Here, the first server 104, the second server 106, the first data server 108, and the second database server 110 can also be hardware or software. When they are hardware, they can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When they are software, they can be implemented as multiple software or software modules (for example, for providing distributed services), or as a single software or software module. No specific limitation is made here.
[0044] It should be noted that the data processing method provided in the embodiment of the present disclosure can be executed by the terminal device 102. It should be understood that Figure 1AThe number of terminal devices, users, servers and database servers in the embodiment is only for illustration. Any number of terminal devices, users, servers and database servers may be provided as required.
[0045] The user 112 may use the services provided by the application installed in the terminal device 102. In an exemplary scenario, the user 112 may open any application installed in the terminal device 102, and at this time, the terminal device 102 may generate a content request corresponding to the application. For example, the first server 104 may be a server corresponding to the application, and the terminal device 102 may send the content request to the first server 104. After receiving the content request, the first server 104 may generate content data according to the content request.
[0046] In some embodiments, the content data may be a content sequence in which different types of content are mixed and arranged, which may include multiple contents and content ordering. For example, when the content is various multimedia data (e.g., video, audio, picture, photo, text, etc.), the multiple contents may be mixed and ordered according to a preset mixed ordering algorithm, and then a content sequence is obtained, which includes not only multiple contents but also the ordering corresponding to each content (i.e., content ordering).
[0047] Figure 1B A schematic diagram showing exemplary content data 114 according to an embodiment of the present disclosure is shown.
[0048] like Figure 1B As shown, the content data 114 may include multiple contents 1142 to 1164, and each content is arranged according to the content sorting. In some embodiments, the content data 114 may include at least two types of content, for example, the contents 1142 to 1156, 1160 to 1162 may be the first type of content, and the contents 1158 and 1164 may be the second type of content. The sorting of the two types of content in the content data 114 may be obtained according to a preset hybrid sorting algorithm, and the specific hybrid sorting algorithm is not specifically limited. Among them, the first type and the second type may be different types, for example, the first type may be a video, and the second type may be audio, a picture, a photo or text, etc. By mixing different types of content and providing them to users, the page content can be enriched and the user experience can be improved.
[0049] It should be noted that the division of different types of content described here may not be limited to the type difference division of video, audio, and pictures. In some scenarios, the division criteria of different types of content may also be other criteria. For example, the first type may be dynamic content such as video and audio, and the second type may be static content such as pictures, photos, and text. In some scenarios, different types of content may refer to content of different natures. For example, the first type of content may be content produced by the platform, such as multimedia content such as video and music, and the second type of content may be content produced by users, such as user dynamics, articles, etc. In some special scenarios, the first type of content may be the content corresponding to the current page (or scene) of the application (for example, video, audio, etc.), and the second type of content may be advertising.
[0050] In some embodiments, the first server 104 may be a server that can only provide some types of content, for example, the first server 104 can only provide the first type of content, while the second server 106 can provide the second type of content. Therefore, when generating the content data 114, the first server 104 may send a request to the second server 106 to obtain the second type of content, and after receiving the second type of content, the first type of content and the second type of content are mixed and sorted, and then the content data 114 is generated and returned to the terminal device 102. Optionally, the first server 104 may send the content data 114 in the form of a data stream or a data packet.
[0051] After receiving the content data 114, the terminal device 102 can generate a data queue to be processed (or displayed) according to the plurality of contents 1142-1164 in the content data 114 and their content sorting. The data queue is in a similar form to the content data. Figure 1B shown.
[0052] Then, the terminal device 102 may display the contents of the data queue according to the arrangement order of the contents in the data queue.
[0053] like Figure 1B As shown, the terminal device 102 may have a display area 116, which corresponds to the display screen of the terminal device 102. The contents of the data queue may be displayed in sequence in the display area 116 according to their arrangement order (i.e., the content order of the content data 114). As an optional embodiment, the display may start from the first content in the data queue by default. Figure 1B As shown, the display area 116 displays the first four contents 1142 - 1148 in the data queue.
[0054] The user 112 may perform a sliding operation (eg, sliding a page upward) on the terminal device 102 , thereby sequentially moving subsequent content in the data queue to the display area 116 for display.
[0055] Figure 1C A schematic diagram showing an exemplary state of a data queue after a sliding operation according to an embodiment of the present disclosure is shown.
[0056] like Figure 1C As shown, after a sliding operation, the content 1150 of the data queue is moved to the display area 116 for display, and the content 1142 is moved outside the display area 116 and is no longer displayed. Through such an operation, the user 112 can browse the contents in the content data 114 in sequence.
[0057] In some embodiments, Figure 1C As shown, for example, the content 1146 may be a video, and the user 112 may click on the content 1146 to send a trigger operation to the terminal device 102 for the content 1146, and the terminal device 102 may respond to the trigger operation by playing the video corresponding to the content 1146. Optionally, the terminal device 102 may directly play the video at the current position of the content 1146, or may play the video in a full-screen video playback window, and the specific implementation method is not limited.
[0058] It will be understood that generating a trigger operation by clicking on a video is merely an example, and in some embodiments, for example, in auto-play mode, when the content 1146 is at a specific position (e.g., the middle) of the display area 116, the video may be automatically played, and at this time, a trigger operation is automatically generated when the content 1146 moves to the specific position, without the need for the user to click.
[0059] It should be noted that Figure 1C The content display method shown is only exemplary. In some applications or some sections of applications, the content may be displayed in full screen, that is, only a single content is displayed in the display area 116. This content display method is only a different display method. The data queue can be processed in the manner described in the aforementioned embodiment, which will not be repeated here.
[0060] As mentioned above, in some scenarios, the content data 114 may include at least two types of content, thereby enriching the page display content and improving the user experience.
[0061] The inventors of the present disclosure have discovered that in some scenarios, due to the characteristics of the shuffling algorithm, once the content sorting is generated, the arrangement order of the content in the data queue is fixed. However, such sorting may cause a certain type of content to be ranked in the front, while other types of content are ranked at a relatively backward position. In particular, when the content ranked in the front is video content, it takes users a long time to watch the video, resulting in the content ranked in the back taking a long time to move to the display area, so that the user may not be able to see other types of content for a long time.
[0062] like Figure 1B As shown, for example, contents 1142-1156, 1160-1162 may be first type contents, and contents 1158, 1164 may be second type contents. Since the first contents 1142-1156 are all of the same type, it may take a long time for user 112 to see the second type content 1158, which reduces the user experience.
[0063] In some embodiments, in order to improve the user experience, the problem can be solved by advancing the position of the second type of content if the user has not seen the second type of content for a long time.
[0064] However, the inventors of the present disclosure have discovered that in some scenarios, the data queue may not include the second type of content, resulting in an inability to find the second type of content in the data queue for advance.
[0065] In view of this, in some embodiments of the present disclosure, a data processing method is provided, which, when conditions are met, inserts the second type of content into the data queue by re-acquiring the second type of content, so that even if the second type of content is not included in the data queue, at least two types of content can still be re-mixed, thereby improving the user experience.
[0066] Figure 2A FIG. 2 is a flow chart of an exemplary method 200 provided in an embodiment of the present disclosure. The method 200 may be used to process a data queue. Optionally, the method 200 may be Figure 1A The system 100 is implemented as follows.
[0067] like Figure 2A As shown, the method 200 may further include the following steps.
[0068] The terminal device 102 may send a request 202 for obtaining content data to the server (e.g., the first server 104). The request 202 may be triggered by the user 112 opening an application in the terminal device 102. In some cases, the request 202 may also be triggered by the time to refresh the content, or because the previous content data 114 has been or is about to be reached.
[0069] The server (eg, the first server 104 ) may generate content data 114 in response to the request 2022 , and return the content data 114 to the terminal device 102 .
[0070] The content data 114 may include multiple contents and content sequencing. After receiving the content data 114, the terminal device 102 may generate the to-be-processed data queue 206 according to the multiple contents and the content sequencing.
[0071] Figure 2B A schematic diagram of an exemplary data queue 206 according to an embodiment of the present disclosure is shown.
[0072] like Figure 2B As shown, in some embodiments, the data queue 206 may include a plurality of first type contents 2062, 2066-2084, and may also include a second type content 2064, and the first type and the second type are of different types.
[0073] The terminal device 102 may display the contents of the data queue 206 according to the arrangement order of the contents in the data queue 206. Figure 2B As shown, the current page may display contents 2062 - 2068 , and the user 112 may browse these contents using the terminal device 102 , and may switch the contents presented in the display area 116 by sliding operations.
[0074] When the user 112 uses the terminal device 102 to browse the content, the terminal device 102 may determine the first trigger condition.
[0075] In some embodiments, the first trigger condition includes at least one of the following:
[0076] The user stops sliding.
[0077] The video starts playing or the video ends playing;
[0078] A third time (e.g., 5 minutes, 10 minutes, 20 minutes, half an hour, etc.) has passed since the first trigger condition was last met;
[0079] The current scene switches (for example, the topic page switches, such as switching from the home page to the recommendation page).
[0080] Optionally, when any of the above conditions is met, it can be considered that the first trigger condition is currently met.
[0081] After the first trigger condition is met, it can be further determined whether it is necessary to request the second type of content from the server (eg, the second server 106). As an optional embodiment, after the first trigger condition is met, the terminal device 102 can trigger an algorithm package (eg, SDK) to make such a determination.
[0082] like Figure 2A As shown, after the first trigger condition is met, the algorithm package 1022 of the terminal device 102 can determine whether it is necessary to request the second type of content from the server, and a determination result 212 can be generated after the algorithm package 1022 completes the determination.
[0083] In some embodiments, the algorithm package 1022 may determine whether a second trigger condition is currently satisfied.
[0084] Since the first type of content and the second type of content need to be re-mixed, the algorithm package 1022 can determine whether the time since the second type of content was last displayed exceeds the first time (for example, 30 seconds, 60 seconds, 2 minutes, 5 minutes, 10 minutes, 20 minutes, half an hour, etc.). The actual value of the first time can be selected as needed and is not limited here.
[0085] When it is determined that the time since the second type of content was last displayed has exceeded the first time, it can be determined that the second trigger condition is currently met.
[0086] The algorithm package 1022 may further determine whether the data queue to be processed includes the second type of content. Here, the data queue to be processed may refer to the content of the data queue that has not yet been displayed in the display area 116. Figure 2B As shown, the data queue to be processed may be contents 2070 - 2084 , and the data queue to be processed does not include the second type of content.
[0087] According to whether the aforementioned determination condition is met, the algorithm package 1022 can generate a determination result 212 accordingly, and the terminal device 102 can determine whether it is necessary to send a request to the server to obtain the second type of content according to the determination result 212. For example, when the second trigger condition is met and the queue of data to be processed does not include the second type of content, the determination result can be that it is necessary to send a request to the server to obtain the second type of content; when the second trigger condition is met and the queue of data to be processed includes the second type of content, the determination result can be that it is not necessary to send a request to the server to obtain the second type of content, but the position of the second type of content in the queue of data to be processed can be advanced.
[0088] In some embodiments, the algorithm package 1022 may also calculate the target position 214 where the second type of content needs to be inserted into the data queue. Specifically, the algorithm package 1022 may obtain the target interval, and then determine the target position 214 based on the target interval. The target interval may refer to the number of contents that the target position is separated from the specified position, and the number of contents may vary depending on the specified position and specific requirements.
[0089] As an optional embodiment, the specified position may refer to the position of the content currently being displayed relative to the queue of data to be processed. Figure 2B As shown in the example, the specified location may be the location of the content 2068 .
[0090] Therefore, the algorithm package 1022 can determine the content currently being displayed, and then determine the target position according to the target interval and the content currently being displayed. Figure 2B As shown in the example, the target location may be the current location of the content 2074 .
[0091] After obtaining the determination result 212, the terminal device 102 may further determine whether it needs to send a request to the server to obtain the second type of content.
[0092] In some embodiments, if the determination result 212 is that a request for obtaining the second type of content needs to be sent to the server, such as Figure 2A As shown, the terminal device 102 may send a request 216 to obtain the second type of content to the service end (eg, the second server 106).
[0093] Optionally, if no returned data is received after sending the request 216, the request 216 may be sent again.
[0094] In some cases, if the terminal device 102 continuously sends requests to the server to obtain data, the query rate per second (QPS) of the server will increase, which will lead to too many requests and excessive pressure on the server to process.
[0095] Therefore, in some embodiments, Figure 2A As shown, the determination process of algorithm package 1022 may also include determining a third trigger condition after the second trigger condition is met and the first content is not included in the data queue to be processed, and sending a request to the target server to obtain the second type of content on the premise that the third trigger condition is met, thereby effectively preventing the problem of excessive service pressure caused by an increase in QPS due to excessive requests, reducing the impact of QPS on service pressure, effectively reducing the request frequency, and reducing costs.
[0096] In some embodiments, the third trigger condition may include at least one of the following:
[0097] At least one of the first number (e.g., 3) of content data obtained includes the second type of content; for example, at least one of the content data obtained by requesting the server (e.g., the first server 206) three times in a row includes the second type of content;
[0098] A cooling time (e.g., 10 minutes, 20 minutes, etc.) has passed, wherein the cooling time is triggered after a second number (e.g., 2 times) of the requests 216 are sent continuously and no second type of content returned by the server is received;
[0099] A second time (eg, 5 seconds, 10 seconds, etc.) has passed since the last time the request 216 was sent. In other words, each request is subject to a minimum time interval.
[0100] Optionally, when any of the above conditions is met, it can be considered that the third trigger condition is currently met.
[0101] Therefore, in some embodiments, when the second trigger condition is met and the queue of data to be processed does not include the first content, and the third trigger condition is also met, the determination result 212 may be that a request for obtaining the second type of content needs to be sent to the target server. Figure 2A As shown, a request 216 may be sent to the server.
[0102] The server (eg, the second server 106) may return the second type of content 220 to the terminal device 102 in response to the request 216. The number of the returned second type of content 220 may be one or more.
[0103] After receiving the content 220 returned by the server, the terminal device 102 may insert the content 220 into the target position of the data queue to be processed, such as Figure 2C shown.
[0104] When the number of the returned second type of content 220 is multiple, in some embodiments, these contents 220 may be inserted at equal intervals according to the target interval, such as Figure 2D shown.
[0105] like Figure 2C and Figure 2D As shown, the position where the second type of content 220 is inserted corresponds to the non-display area, so that the user can be unaware of this process, thereby improving the user experience.
[0106] In some embodiments, when it is determined that the second trigger condition is met, if the data queue to be processed includes a second type of content, the judgment result 212 may be that there is no need to send a request to the target server to obtain the second type of content, but instead the second type of content in the data queue to be processed can be moved to the target location 214.
[0107] Figure 3A FIG. 4 is a schematic diagram of another exemplary data queue 300 according to an embodiment of the present disclosure.
[0108] like Figure 3A As shown, the data queue 300 includes first type content 302 , 306 - 318 , 322 - 324 , and second type content 304 , 320 , wherein the data queue to be processed includes the second type content 320 .
[0109] At this time, when it is determined that the first trigger condition and the second trigger condition are met, the content 320 can be moved to the target position 214, such as Figure 3B shown.
[0110] Similarly, the position where the content 320 is inserted corresponds to the non-display area, so that the user can be unaware of this process, thereby improving the user experience.
[0111] It can be seen from the above embodiments that the data processing method provided by the embodiments of the present disclosure can increase the display frequency of the second type of content when the frequency of occurrence is low, and when there is no second type of content that can be pre-placed in the data queue, the second type of content can be re-acquired for pre-placement, thereby ensuring the effect of frequency increase. In some embodiments, by setting the third trigger condition, the QPS can be effectively reduced (by 30% to 40%), reducing server pressure and traffic costs.
[0112] It should be noted that the method of the embodiment of the present disclosure can be performed by a single device, such as a computer or a server. The method of the present embodiment can also be applied in a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present disclosure, and the multiple devices will interact with each other to complete the described method.
[0113] It should be noted that the above describes some embodiments of the present disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the above embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0114] The embodiment of the present disclosure also provides a data processing method.
[0115] Figure 4 A schematic diagram of an exemplary method 400 provided by an embodiment of the present disclosure is shown. The method 400 may be Figure 1A It is implemented by the terminal device 102.
[0116] like Figure 4 As shown, the method 400 may further include the following steps.
[0117] In step 402, in response to satisfying a first trigger condition (eg, Figure 2A The first trigger condition 208) determines whether the second trigger condition (eg, Figure 2A The second trigger condition 210) and whether the queue of data to be processed includes the first content (for example, Figure 2C Content 220 or Figure 3A The data queue to be processed includes at least one second content of a type different from that of the first content (for example, Figure 2C Contents 2062, 2066-2084 or Figure 3A Contents 302, 306~318, 322~324).
[0118] In step 404, in response to determining that the second trigger condition is satisfied and the queue of data to be processed does not include the first content, a target server (eg, Figure 1A The first server 104 or the second server 106 sends a request to obtain the first content (for example, Figure 2A Request 216).
[0119] In step 406, in response to receiving the first content (eg, Figure 2A 220), inserting the first content into the target position of the data queue to be processed, such as Figure 2C or Figure 2D shown.
[0120] In this way, when the conditions are met, the second type of content can be re-acquired and inserted into the data queue, so that when the data queue does not include the second type of content, at least two types of content can still be re-mixed, thereby improving the user experience.
[0121] In some embodiments, in response to satisfying the first trigger condition, before determining whether the second trigger condition is satisfied and whether the queue of data to be processed includes the first content, the method further includes:
[0122] Get content data (for example, Figure 2A content data 114), wherein the content data includes a plurality of contents and content sorting;
[0123] According to the plurality of contents and the content sorting, a data queue is generated (for example, Figure 2A data queue 206);
[0124] Display the contents of the data queue according to the order in which the contents are arranged in the data queue, such as Figure 2B shown.
[0125] In this way, the terminal device 102 can obtain the mixed and sorted content data 114 for display, thereby enriching the displayed content and improving the user experience.
[0126] In some embodiments, the second trigger condition includes the time since the first content was last displayed (eg, Figure 2B The time of the content 2064) is longer than the first time, thereby increasing the frequency of appearance of the second type of content and improving the user experience.
[0127] In some embodiments, before inserting the first content into the target position of the queue of data to be processed, the method further includes:
[0128] Get the target interval;
[0129] Determine what is currently being displayed;
[0130] The target position (e.g., Figure 2A target position 214).
[0131] In this way, the target position is determined according to the target interval and the currently displayed content, and the first content can be inserted into a suitable position to improve the user experience.
[0132] In some embodiments, the method further includes: in response to determining that the second trigger condition is satisfied and the queue of data to be processed includes the first content, moving the first content to the target location, such as Figure 3B In this way, when the first content already exists in the data queue to be processed, the first content is inserted into the target position, thereby eliminating the step of requesting data from the server, improving processing efficiency and reducing service pressure.
[0133] In some embodiments, in response to determining that the second trigger condition is satisfied and the queue of data to be processed does not include the first content, sending a request to a target server to obtain the first content further includes:
[0134] In response to determining that the second trigger condition is satisfied and the queue of data to be processed does not include the first content, determining whether a third trigger condition is satisfied (eg, Figure 2A The third trigger condition 218);
[0135] In response to satisfying the third trigger condition, sending a request to a target server to obtain the first content.
[0136] In this way, a request for obtaining the second type of content is sent to the target server under the premise of meeting the third trigger condition, thereby effectively preventing the problem of excessive service pressure caused by increased QPS due to excessive requests, reducing the impact of QPS on service pressure, effectively reducing the request frequency, and reducing costs.
[0137] In some embodiments, the third trigger condition includes at least one of the following:
[0138] At least one of the first amount of content data obtained includes the first content; for example, at least one of the content data obtained by requesting the server (for example, the first server 206) three times in a row includes the second type of content;
[0139] A cooling time has passed, wherein the cooling time is triggered after a second number of the requests are sent continuously and the first content returned by the target server is not received;
[0140] A second time has passed since the last time the request was sent. In other words, each request is subject to a minimum time interval.
[0141] Optionally, when any of the above conditions is met, it can be considered that the third trigger condition is currently met.
[0142] In some embodiments, displaying the contents of the data queue according to the arrangement order of the contents in the data queue further comprises: in response to receiving a sliding operation of a user, sequentially displaying the contents of the data queue according to the arrangement order of the contents in the data queue;
[0143] The first trigger condition includes the user stopping the sliding operation.
[0144] In some embodiments, the displayed content of the data queue includes a video, and after displaying the content of the data queue according to the arrangement order of the content in the data queue, the method further includes: in response to a trigger operation for the video, playing the video;
[0145] The first trigger condition includes the video starting to play.
[0146] In some embodiments, the first trigger condition includes completion of playback of the video.
[0147] In some embodiments, the first trigger condition includes at least one of the following:
[0148] A third time has passed since the first trigger condition was last met;
[0149] The current scene switches.
[0150] It should be noted that the method of the embodiment of the present disclosure can be performed by a single device, such as a computer or a server. The method of the present embodiment can also be applied in a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present disclosure, and the multiple devices will interact with each other to complete the described method.
[0151] It should be noted that the above describes some embodiments of the present disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the above embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0152] The embodiment of the present disclosure further provides a computer device for implementing the above method 200 or 400. Figure 5 FIG. 5 is a schematic diagram showing the hardware structure of an exemplary computer device 500 provided in an embodiment of the present disclosure. The computer device 500 can be used to implement Figure 1AThe terminal device 102 can also be used to implement Figure 1A The first server 104 and the second server 106. In some scenarios, the computer device 500 can also be used to implement Figure 1A The first database server 108 and the second database server 110 are configured as follows.
[0153] like Figure 5 As shown, the computer device 500 may include: a processor 502, a memory 504, a network module 506, a peripheral interface 508 and a bus 510. The processor 502, the memory 504, the network module 506 and the peripheral interface 508 are connected to each other in communication within the computer device 500 through the bus 510.
[0154] Processor 502 may be a central processing unit (CPU), an image processor, a neural network processor (NPU), a microcontroller (MCU), a programmable logic device, a digital signal processor (DSP), an application specific integrated circuit (ASIC), or one or more integrated circuits. Processor 502 may be used to perform functions related to the technology described in this disclosure. In some embodiments, processor 502 may also include multiple processors integrated into a single logical component. For example, Figure 5 As shown, processor 502 may include a plurality of processors 502a, 502b, and 502c.
[0155] The memory 504 may be configured to store data (eg, instructions, computer code, etc.). Figure 5 As shown, the data stored in the memory 504 may include program instructions (e.g., program instructions for implementing the method 200 or 400 of the embodiment of the present disclosure) and data to be processed (e.g., the memory may store configuration files of other modules, etc.). The processor 502 may also access the program instructions and data stored in the memory 504, and execute the program instructions to operate on the data to be processed. The memory 504 may include a volatile storage device or a non-volatile storage device. In some embodiments, the memory 504 may include a random access memory (RAM), a read-only memory (ROM), an optical disk, a magnetic disk, a hard disk, a solid-state drive (SSD), a flash memory, a memory stick, etc.
[0156] The network interface 506 can be configured to provide the computer device 500 with communication with other external devices via a network. The network can be any wired or wireless network capable of transmitting and receiving data. For example, the network can be a wired network, a local wireless network (e.g., Bluetooth, WiFi, near field communication (NFC)), a cellular network, the Internet, or a combination thereof. It is understood that the type of network is not limited to the above specific examples.
[0157] The peripheral interface 508 can be configured to connect the computer device 500 to one or more peripheral devices to achieve information input and output. For example, the peripheral devices can include input devices such as a keyboard, a mouse, a touch pad, a touch screen, a microphone, and various sensors, and output devices such as a display, a speaker, a vibrator, and an indicator light.
[0158] The bus 510 may be configured to transmit information between various components of the computer device 500 (e.g., the processor 502, the memory 504, the network interface 506, and the peripheral interface 508), such as an internal bus (e.g., a processor-memory bus), an external bus (USB port, PCI-E bus), etc.
[0159] It should be noted that, although the architecture of the above-mentioned computer device 500 only shows the processor 502, the memory 504, the network interface 506, the peripheral interface 508 and the bus 510, in the specific implementation process, the architecture of the computer device 500 may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the architecture of the above-mentioned computer device 500 may also only include the components necessary for implementing the embodiments of the present disclosure, and does not necessarily include all the components shown in the figure.
[0160] The embodiment of the present disclosure also provides a data processing device. Figure 6 FIG. 6 is a schematic diagram of an exemplary device 600 provided by an embodiment of the present disclosure. Figure 6 As shown, the device 600 can be used to implement the method 200 or 400, and can further include the following modules.
[0161] The determination module 602 is configured to: in response to the first trigger condition being met, determine whether the second trigger condition is met and whether the queue of data to be processed includes the first content, and the queue of data to be processed includes at least one second content of a type different from that of the first content;
[0162] The sending module 604 is configured to: in response to determining that the second trigger condition is met and the queue of data to be processed does not include the first content, send a request to a target server to obtain the first content;
[0163] The inserting module 606 is configured to: in response to receiving the first content returned by the target server, insert the first content into a target position of the to-be-processed data queue.
[0164] In some embodiments, the apparatus 600 further includes a display module configured to:
[0165] Acquire content data, wherein the content data includes a plurality of contents and content ranking;
[0166] Generate a data queue according to the plurality of contents and the content sorting;
[0167] The contents of the data queue are displayed according to the arrangement order of the contents in the data queue.
[0168] In some embodiments, the second trigger condition includes that the time since the first content was last displayed exceeds a first time.
[0169] In some embodiments, the determination module 602 is configured to:
[0170] Get the target interval;
[0171] Determine what is currently being displayed;
[0172] The target position is determined according to the target interval and the content currently being displayed.
[0173] In some embodiments, the inserting module 606 is configured to: in response to determining that the second trigger condition is satisfied and the queue of data to be processed includes the first content, move the first content to the target location.
[0174] In some embodiments, the determination module 602 is configured to: in response to determining that the second trigger condition is satisfied and the queue of data to be processed does not include the first content, determine whether a third trigger condition is satisfied;
[0175] The sending module 604 is configured to: in response to satisfying the third trigger condition, send a request to a target server to obtain the first content.
[0176] In some embodiments, the third trigger condition includes at least one of the following:
[0177] At least one content data in the acquired first amount of content data includes the first content;
[0178] A cooling time has passed, wherein the cooling time is triggered after a second number of the requests are sent continuously and the first content returned by the target server is not received;
[0179] A second time has passed since the request was last sent.
[0180] In some embodiments, the display module is configured to: in response to receiving a sliding operation of the user, sequentially display the contents of the data queue according to the arrangement order of the contents in the data queue;
[0181] The first trigger condition includes the user stopping the sliding operation.
[0182] In some embodiments, the content of the displayed data queue includes a video, and the display module is configured to: play the video in response to a trigger operation on the video;
[0183] The first trigger condition includes the video starting to play.
[0184] In some embodiments, the first trigger condition includes completion of playback of the video.
[0185] In some embodiments, the first trigger condition includes at least one of the following:
[0186] A third time has passed since the first trigger condition was last met;
[0187] The current scene switches.
[0188] For the convenience of description, the above device is described by dividing it into various modules according to its functions. Of course, when implementing the present disclosure, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0189] The device of the above embodiment is used to implement the corresponding method 400 in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.
[0190] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the present disclosure also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute method 400 described in any of the above embodiments.
[0191] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0192] The computer instructions stored in the storage medium of the above embodiments are used to enable the computer to execute method 200 or 400 as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0193] Based on the same inventive concept, corresponding to the method 200 or 400 in any of the above embodiments, the present disclosure further provides a computer program product, which includes a computer program. In some embodiments, the computer program is executable by one or more processors so that the processors execute the method 200 or 400. Corresponding to the execution subject corresponding to each step in each embodiment of the method 200 or 400, the processor that executes the corresponding step may belong to the corresponding execution subject.
[0194] The computer program product of the above embodiment is used to enable the processor to execute the method 400 described in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.
[0195] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present disclosure (including the claims) is limited to these examples. Based on the concept of the present disclosure, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present disclosure as described above, which are not provided in detail for the sake of simplicity.
[0196] In addition, to simplify the description and discussion, and in order not to make the embodiments of the present disclosure difficult to understand, the known power / ground connections to the integrated circuit (IC) chips and other components may or may not be shown in the provided figures. In addition, the device can be shown in the form of a block diagram to avoid making the embodiments of the present disclosure difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform on which the embodiments of the present disclosure will be implemented (that is, these details should be fully within the scope of understanding of those skilled in the art). Where specific details (e.g., circuits) are set forth to describe exemplary embodiments of the present disclosure, it is apparent to those skilled in the art that the embodiments of the present disclosure can be implemented without these specific details or with changes in these specific details. Therefore, these descriptions should be considered illustrative rather than restrictive.
[0197] Although the present disclosure has been described in conjunction with specific embodiments of the present disclosure, many replacements, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.
[0198] The embodiments of the present disclosure are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present disclosure should be included in the scope of protection of the present disclosure.
Claims
1. A data processing method, comprising: In response to satisfying the first trigger condition, determining whether a second trigger condition is satisfied and whether a queue of data to be processed includes a first content, the queue of data to be processed including at least one second content of a type different from that of the first content; In response to determining that the second trigger condition is satisfied and the queue of data to be processed does not include the first content, sending a request to a target server to obtain the first content; In response to receiving the first content returned by the target server, the first content is inserted into a target position of the to-be-processed data queue.
2. The method of claim 1, wherein: In response to the first trigger condition being met, before determining whether the second trigger condition is met and whether the queue of data to be processed includes the first content, the method further includes: Acquire content data, wherein the content data includes a plurality of contents and content ranking; Generate a data queue according to the plurality of contents and the content sorting; The contents of the data queue are displayed according to the arrangement order of the contents in the data queue.
3. The method of claim 2, wherein: The second trigger condition includes that the time from the last display of the first content exceeds a first time.
4. The method of claim 2, wherein: Before inserting the first content into the target position of the queue of data to be processed, the method further includes: Get the target interval; Determine what is currently being displayed; The target position is determined according to the target interval and the content currently being displayed.
5. The method of claim 1, wherein: The method further comprises: In response to determining that the second trigger condition is satisfied and the queue of data to be processed includes the first content, the first content is moved to the target location.
6. The method of claim 2, wherein: In response to determining that the second trigger condition is met and the queue of data to be processed does not include the first content, sending a request to a target server to obtain the first content further includes: In response to determining that the second trigger condition is satisfied and the queue of data to be processed does not include the first content, determining whether a third trigger condition is satisfied; In response to satisfying the third trigger condition, sending a request to a target server to obtain the first content.
7. The method of claim 6, wherein: The third trigger condition includes at least one of the following: At least one content data in the acquired first amount of content data includes the first content; A cooling time has passed, wherein the cooling time is triggered after a second number of the requests are sent continuously and the first content returned by the target server is not received; A second time has passed since the request was last sent.
8. The method of claim 2, wherein: Displaying the contents of the data queue according to the arrangement order of the contents in the data queue further comprises: in response to receiving a sliding operation of the user, sequentially displaying the contents of the data queue according to the arrangement order of the contents in the data queue; The first trigger condition includes the user stopping the sliding operation.
9. The method of claim 2, wherein: The displayed content of the data queue includes a video, and after displaying the content of the data queue according to the arrangement order of the content in the data queue, the method further includes: playing the video in response to a trigger operation for the video; The first trigger condition includes the video starting to play.
10. The method of claim 9, wherein: The first trigger condition includes that the video is finished playing.
11. The method of claim 1, wherein: The first trigger condition includes at least one of the following: A third time has passed since the first trigger condition was last met; The current scene switches.
12. A data processing device, comprising: a determination module configured to: in response to satisfying a first trigger condition, determine whether a second trigger condition is satisfied and whether a queue of data to be processed includes a first content, the queue of data to be processed including at least one second content of a type different from that of the first content; a sending module, configured to: in response to determining that the second trigger condition is satisfied and the queue of data to be processed does not include the first content, send a request to a target server to obtain the first content; The inserting module is configured to: in response to receiving the first content returned by the target server, insert the first content into a target position of the to-be-processed data queue.
13. A computer device comprising one or more processors, a memory; and one or more programs, wherein the one or more programs are stored in the memory and executed by the one or more processors, and the programs include instructions for executing the method according to any one of claims 1-11.
14. A non-volatile computer-readable storage medium containing a computer program, which, when executed by one or more processors, causes the processors to perform the method according to any one of claims 1 to 11.
15. A computer program product, comprising computer program instructions, which, when executed on a computer, enable the computer to execute the method according to any one of claims 1 to 11.