Resource acquisition method and device, equipment and medium
By matching the signal strength change information of the network signal and the template signal characteristics, predicting the resource acquisition time period and obtaining resources in advance, the user experience decline caused by instability of the network signal is solved, and timely loading of resources and smooth display of content is achieved.
Patent Information
- Application Number
- CN202410046580.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-11
- Publication Date
- 2025-07-11
AI Technical Summary
In the case of poor or unstable network signals, the client cannot obtain resources in time, resulting in a decline in user experience.
By obtaining the signal strength change information of the network signal within the preset time period and matching it with the signal strength change characteristics of the preset template signal, it predicts the time period in which resources may not be available in the network signal in a time period, and obtains the resources that the client needs to load before this time period.
It effectively solves the problem of resource acquisition delay caused by poor network connection, improves the user experience, and ensures timely loading of resources and smooth display of content.
Smart Images

Figure CN120301950A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Internet technologies, and in particular, to a resource acquisition method, apparatus, device, and medium. Background Art
[0002] During the process of a user using a client, it is usually necessary for the client to obtain resources from a connected server and load the resources to present the content included in the resources to the user. The acquisition of resources by the client from the server is affected by the network connection status between the client and the server. In the case of poor network signals or unstable network connections, the client cannot obtain resources in a timely manner, and the time required to present content to the user is relatively long, affecting the user experience. Summary of the Invention
[0003] In view of this, this application provides a resource acquisition method, apparatus, device, and medium, which can acquire resources before the time period when resources need to be acquired, facilitate the client to load resources in a timely manner, and improve the user experience.
[0004] Based on this, the technical solutions provided in this application are as follows:
[0005] In a first aspect, this application provides a resource acquisition method, and the method includes:
[0006] Obtain the signal strength change information of the network signal within a preset time period;
[0007] Match the signal strength change information with the signal strength change characteristics of a preset template signal, where the template signal is a signal with periodically strong and weak signal strength changes;
[0008] If it is determined that the signal strength change information matches the signal strength change characteristics successfully, determine the first target time period that meets the acquisition conditions in the template signal;
[0009] Determine the second target time period that is later than the current time and corresponds to the first target time period in the network signal;
[0010] Before the second target time period, acquire the resources that the client needs to load within the second target time period.
[0011] In a possible implementation manner, the signal strength change information includes multiple first times and the first signal strength corresponding to the first time, the signal strength change characteristics are represented by a template signal strength image, and the template signal strength image is used to describe the correspondence between the second time and the second signal strength. The matching of the signal strength change information with the signal strength change characteristics of the preset template signal includes:
[0012] Generate a signal strength image to be matched based on the multiple first moments and the first signal strengths corresponding to the first moments;
[0013] Determine the similarity between the signal strength image to be matched and the template signal strength image;
[0014] The determination that the signal strength change information matches the signal strength change feature successfully includes:
[0015] Determine that the similarity is greater than the similarity threshold.
[0016] In a possible implementation, the signal strength change feature includes a signal strength change condition. The matching of the signal strength change information with the signal strength change feature of the preset template signal includes:
[0017] Judge whether the signal strength change information meets the signal strength change condition;
[0018] The determination that the signal strength change information matches the signal strength change feature successfully includes:
[0019] Determine that the signal strength change information meets the signal strength change condition.
[0020] In a possible implementation, the determination of the second target time period in the network signal that corresponds to the first target time period and is later than the current moment includes:
[0021] Determine the first reference moment of the template signal, and determine the second reference moment in the network signal that matches the first reference moment;
[0022] According to the first relative relationship between the first target time period and the first reference moment, determine the candidate time period in the network signal that satisfies the first relative relationship with the second reference moment;
[0023] Determine the candidate time period later than the current moment as the second target time period.
[0024] In a possible implementation, the determination of the second target time period in the network signal that corresponds to the first target time period and is later than the current moment includes:
[0025] Determine the second relative relationship between the first target time period and the period to which the first target time period belongs;
[0026] According to the second relative relationship and the period of the network signal, determine the candidate time period;
[0027] Determine the candidate time period later than the current moment as the second target time period.
[0028] In a possible implementation, the acquisition condition is that the signal strength within a time period is less than a first strength threshold.
[0029] In a possible implementation, before the second target time period, acquiring the resources that the client needs to load within the second target time period includes:
[0030] Before the second target time period, and within a time period when the signal strength is greater than a second strength threshold, acquiring the resources that the client needs to load within the second target time period, where the second strength threshold is greater than or equal to the first strength threshold.
[0031] In a second aspect, the present application provides a resource acquisition device, and the device includes:
[0032] A first acquisition unit, configured to acquire signal strength change information of a network signal within a preset time period;
[0033] A matching unit, configured to match the signal strength change information with the signal strength change characteristics of a preset template signal, where the template signal is a signal with periodically strong and weak signal strength changes;
[0034] A first determination unit, configured to, if it is determined that the signal strength change information matches the signal strength change characteristics successfully, determine a first target time period in the template signal that satisfies the acquisition condition;
[0035] A second determination unit, configured to determine a second target time period in the network signal that corresponds to the first target time period and is later than the current moment;
[0036] A second acquisition unit, configured to acquire the resources that the client needs to load within the second target time period before the second target time period.
[0037] In a possible implementation, the signal strength change information includes a plurality of first moments and the first signal strength corresponding to the first moment, the signal strength change characteristics are represented by a template signal strength image, the template signal strength image is used to describe the correspondence between a second moment and a second signal strength, and the matching unit is specifically configured to generate a to-be-matched signal strength image based on the plurality of first moments and the first signal strength corresponding to the first moment; determine the similarity between the to-be-matched signal strength image and the template signal strength image;
[0038] Determining that the signal strength change information matches the signal strength change characteristics successfully includes:
[0039] Determining that the similarity is greater than a similarity threshold.
[0040] In a possible implementation, the signal strength change feature includes a signal strength change condition, and the matching unit is specifically configured to determine whether the signal strength change information satisfies the signal strength change condition;
[0041] Determining that the signal strength change information matches the signal strength change feature successfully includes:
[0042] Determining that the signal strength change information satisfies the signal strength change condition.
[0043] In a possible implementation, the second determination unit is specifically configured to determine a first reference moment of the template signal, and determine a second reference moment in the network signal that matches the first reference moment; according to a first relative relationship between the first target time period and the first reference moment, determine a candidate time period in the network signal that satisfies the first relative relationship with the second reference moment; and determine the candidate time period later than the current moment as the second target time period.
[0044] In a possible implementation, the second determination unit is specifically configured to determine a second relative relationship between the first target time period and the period to which the first target time period belongs; according to the second relative relationship and the period of the network signal, determine a candidate time period; and determine the candidate time period later than the current moment as the second target time period.
[0045] In a possible implementation, the acquisition condition is that the signal strength within the time period is less than a first strength threshold.
[0046] In a possible implementation, the second acquisition unit is specifically configured to acquire, within a time period before the second target time period and with a signal strength greater than a second strength threshold, the resources that the client needs to load within the second target time period, where the second strength threshold is greater than or equal to the first strength threshold.
[0047] In a third aspect, the present application provides an electronic device, including:
[0048] One or more processors;
[0049] A storage device storing one or more programs thereon,
[0050] When the one or more programs are executed by the one or more processors, the one or more processors implement the method described in the first aspect and any implementation manner in the first aspect.
[0051] Fourthly, the present application provides a computer-readable medium, on which a computer program is stored, and when the program is executed by a processor, the method described in the first aspect and any implementation manner of the first aspect is implemented.
[0052] Fifthly, the present application provides a computer program product, and when the computer program product runs on a device, the device is enabled to execute the method described in the first aspect and any implementation manner of the first aspect.
[0053] Thus, the present application has the following beneficial effects:
[0054] A resource acquisition method, device, equipment and medium provided by the present application. In this method, the signal strength change information of the network signal within a preset time period is acquired, and the signal strength change information is matched with the signal strength change characteristics of a preset template signal, where the template signal is a signal with periodic strong and weak signal strength changes; if it is determined that the signal strength change information matches the signal strength change characteristics successfully, the first target time period that meets the acquisition condition in the template signal is determined; the second target time period later than the current moment corresponding to the first target time period in the network signal is determined; before the second target time period, the resources that the client needs to load within the second target time period are acquired. By using the template signal with periodic strong and weak signal strength changes matched by the network signal, the time period in the network signal when resources may not be acquired in time, that is, the second target time period, is determined in advance, and the resources that the client needs to load subsequently are cached in advance before the second target time period, so that the client can load resources in time. In this way, the problem that the client cannot acquire resources in time due to poor network connection can be effectively solved, and the user experience is improved. Description of the Drawings
[0055] Figure 1 It is a schematic diagram of an application scenario provided by an embodiment of the present application;
[0056] Figure 2 It is a schematic flowchart of the resource acquisition method provided by an embodiment of the present application;
[0057] Figure 3 It is a schematic structural diagram of a resource acquisition device provided by an embodiment of the present application;
[0058] Figure 4 It is a schematic diagram of the basic structure of an electronic device provided by an embodiment of the present application. Detailed Embodiments
[0059] To facilitate the understanding and explanation of the technical solutions provided by the embodiments of the present application, the background technology of the present application will be described first.
[0060] During the operation of the client, problems such as network signal interruption or poor network signal between the client and the server may occur. In the case of network signal interruption or poor network signal, the client cannot obtain the required resources from the server in a timely manner, resulting in the inability to load resources and present content to the user in a timely manner. Users need to wait for a certain period of time to view the content, and the experience of using the client is poor. For example, in the case of video playback scenarios, the client needs to obtain video resources from the server. In the case of network signal interruption or poor network signal, the client cannot obtain and load video resources in a timely manner, resulting in the inability of the client to continue playing the video or the poor quality of the played video, such as reducing the video clarity, which affects the user experience of watching the video.
[0061] Based on this, the embodiments of the present application provide a resource acquisition method, device, equipment and medium. In this method, the signal strength change information of the network signal within a preset time period is obtained, and the signal strength change information is matched with the signal strength change characteristics of a preset template signal, where the template signal is a signal with periodic strong and weak signal strength changes; if it is determined that the signal strength change information matches the signal strength change characteristics successfully, the first target time period that meets the acquisition condition in the template signal is determined; the second target time period later than the current moment corresponding to the first target time period in the network signal is determined; before the second target time period, the resources that the client needs to load within the second target time period are obtained. By using the template signal with periodic strong and weak signal strength changes matched by the network signal, the time period in which resources may not be obtained in a timely manner in the network signal is determined, and the resources that the client needs to load later within the second target time period are pre-obtained before the second target time period, so that the client can load resources in the second target time period in a timely manner. In this way, the problem that the client cannot obtain resources in a timely manner due to poor network connection can be effectively solved, and the user experience can be improved.
[0062] The following describes a resource acquisition method provided by the embodiments of the present application in conjunction with the accompanying drawings. The following describes in conjunction with Figure 1 the following scenario example. Refer to Figure 1 As shown, this figure is a schematic diagram of an exemplary application scenario provided by the embodiments of the present application.
[0063] Those skilled in the art can understand that Figure 1 the schematic diagram shown is only an example in which the embodiments of the present application can be implemented. The scope of application of the embodiments of the present application is not limited by any aspect of this framework.
[0064] Refer to Figure 1As shown in the figure, the resource acquisition method provided by the embodiments of the present application can be applied to a client. The client is, for example, a client installed on a mobile terminal for playing videos. The client is connected to a server. The server is, for example, a cloud server. The server pre-generates a template signal and the signal strength change characteristics of the template signal. The server sends the template signal and the signal strength change characteristics of the template signal to the client. The signal prediction interface of the client obtains the signal strength change information of the network signal within a preset time period, and matches the signal strength change information with the signal strength change characteristics of the template signal. If the match is successful, it means that the network information matches the template signal. The signal prediction interface of the client determines the first target time period that meets the acquisition conditions in the template signal, and determines the second target time period in the network signal that is later than the current moment and corresponds to the first target time period. Before the second target time period, the client obtains the video resources that the client needs to load within the second target time period. In this way, the client can load the video resources in a timely manner within the second target time period, avoiding problems such as video playback interruption or video playback quality degradation caused by poor network signals, and improving the user experience.
[0065] To facilitate understanding of the technical solution provided by the embodiments of the present application, the resource acquisition method provided by the embodiments of the present application will be described below with reference to the accompanying drawings.
[0066] See Figure 2 As shown in the figure, this figure is a schematic flowchart of the resource acquisition method provided by the embodiments of the present application. As Figure 2 shown, the method may include S201-S205:
[0067] S201: Obtain the signal strength change information of the network signal within a preset time period.
[0068] The network signal is the signal of the network to which the client is connected to the server.
[0069] The preset time period is a time period for obtaining the signal strength change information of the network signal that is set in advance. The embodiments of the present application do not limit the setting method of the preset time period. In one possible implementation, the signal strength change information of the network signal is obtained in real time, and the current moment is used as the end moment of the preset time period. In another possible implementation, the time difference between the end moment of the preset time period and the current moment is less than the difference threshold. In this way, it can be ensured that the signal strength change information of the network signal obtained within the preset time period can effectively describe the current network signal, and the effectiveness of the matching result with the template signal is improved. It should be noted that the signal strength change information of the network signal is information that the user has pre-authorized to obtain. The signal strength change information of the network signal is only used to match the signal strength change characteristics of the template signal to determine the resource acquisition method.
[0070] The embodiments of the present application do not limit the time length of the preset time period. As an example, a minimum threshold is set in advance. The time length of the preset time period needs to be greater than or equal to the minimum threshold. The minimum threshold is, for example, the time length of one cycle of the template signal. By setting the minimum threshold of the time length of the preset time period, the signal strength change information of the network signal within a preset time period with a longer time length can be obtained, improving the accuracy of matching the network signal with the template signal.
[0071] The signal strength change information of the network signal is used to describe the signal strength change situation of the network signal. The embodiments of the present application do not limit the specific content included in the signal strength change information of the network signal. In a possible implementation manner, the signal strength change information of the network signal includes multiple moments within the preset time period, and the signal strength of the network signal corresponding to each moment. The corresponding relationship between the moment and the signal strength can be stored in a table. In another possible implementation manner, the signal strength change information of the network signal includes the time period when the network signal is interrupted or the time period when the network signal is stuck within the preset time period.
[0072] S202: Match the signal strength change information with the signal strength change characteristics of a preset template signal, where the template signal is a signal with periodic strong and weak changes in signal strength.
[0073] The template signal is a signal with periodic strong and weak changes in signal strength set in advance. In a possible implementation manner, the template signal is generated by the server and sent by the server to the client.
[0074] The embodiments of the present application do not limit the generation method of the template signal. As an example, in a specific scenario, the network signal of the client has the characteristic of periodic strong and weak changes in signal strength. The server obtains the signal information of the network signals of multiple clients in the specific scenario. The server generates a template signal by processing the obtained multiple signal information.
[0075] The preset template signal can include one type of template signal or multiple types of template signals, and the embodiments of the present application do not limit this. The signal strength change methods of different types of template signals may be different. For example, parameters such as the time length of the cycle and the signal strength may be different. As an example, for different scenarios, the server generates different types of template signals. For example, for the subway scenario, the server generates a subway template signal. For the high-speed railway scenario, the server generates a high-speed railway template signal. For the elevator scenario, the server generates an elevator template signal.
[0076] The signal strength change characteristics of the template signal are used to represent the characteristics of the signal strength change of the template signal. The embodiments of the present application do not limit the specific content of the signal strength change characteristics of the template signal. In one possible implementation, the signal strength change characteristics are represented by a template signal strength image. The template signal strength image is used to describe the correspondence between the second moment and the second signal strength. As an example, the template signal strength image is, for example, a waveform diagram. The abscissa represents time, and the ordinate represents signal strength. In another possible implementation, the signal strength change characteristics include signal strength change conditions. The signal strength change conditions are the conditions that need to be satisfied for matching with the template signal. The signal strength change conditions can reflect the signal strength change characteristics of the template signal.
[0077] As an example, for the subway template signal, the signal strength change condition is that the network disconnection frequency is greater than the first frequency threshold. For the high-speed railway template signal, the signal strength change condition is that the freezing frequency is less than the second frequency threshold and the duration of a single freeze is greater than the first duration.
[0078] Match the signal strength change information with the signal strength change characteristics of the template signal. In the case where there are multiple template signals in the preset template signals, the signal strength change information is respectively matched with the signal strength change characteristics of the template signals.
[0079] The embodiments of the present application do not limit the manner of matching the signal strength change information with the signal strength change characteristics of the template signal. Two possible implementation manners of matching the signal strength change information with the signal strength change characteristics of the template signal are introduced below. Please refer to the following text.
[0080] If the signal strength change information matches successfully with the signal strength change characteristics of the template signal, it indicates that the change situation of the signal strength of the network signal is similar to the change situation of the signal strength of the template signal. The network signal matches the template signal. In this way, the future signal strength change situation of the network signal can be predicted by using the signal strength change situation of the template signal.
[0081] If the signal strength change information does not match successfully with the signal strength change characteristics of the template signal, it indicates that the change situation of the signal strength of the network signal is different from the change situation of the signal strength of the template signal.
[0082] S203: If it is determined that the signal strength change information matches successfully with the signal strength change characteristics, determine the first target time period that meets the acquisition conditions in the template signal.
[0083] In the case where it is determined that the signal strength change information matches successfully with the signal strength change characteristics, the future signal strength change situation of the network signal can be predicted by using the signal strength change situation of the template signal.
[0084] There is a first target time period in the template signal whose signal strength meets the acquisition condition.
[0085] As an example, the acquisition condition is that the signal strength within the time period is less than the first strength threshold. The first strength threshold is the maximum signal strength that supports the client to acquire resources. The embodiments of the present application do not limit the implementation manner of determining that the signal strength within the time period is less than the first strength threshold. In a possible implementation manner, the acquisition condition is that the signal strength corresponding to each moment within the time period is less than the first strength threshold. In another possible implementation manner, the acquisition condition is that the average signal strength within the time period is less than the first strength threshold.
[0086] As another example, the acquisition condition is the time period of network disconnection. In this way, it is possible to determine the time period in the template signal where the signal strength does not support resource acquisition, that is, the time period with weak or poor network signals.
[0087] S204: Determine, in the network signal, a second target time period that corresponds to the first target time period and is later than the current moment.
[0088] The template signal matches the network signal. After determining the first target time period in the template signal that does not support resource acquisition, determine, in the network signal, a second target time period that corresponds to the first target time period and is later than the current moment.
[0089] The embodiments of the present application do not limit the possible implementation manners of determining the second target time period corresponding to the first target time period. The following introduces two possible implementation manners of determining, in the network signal, a second target time period that corresponds to the first target time period and is later than the current moment.
[0090] The first one: Determine the second target time period by using a reference moment.
[0091] Determine the first reference moment of the template signal. The first reference moment can be any moment in the template signal. As an example, the first reference moment is the starting moment of a certain cycle, or the ending moment of a certain cycle, or a moment other than the starting moment or the ending moment included in a certain cycle.
[0092] Determine the second reference moment in the network signal that matches the first reference moment. The second reference moment can be determined according to the matching relationship between the network signal and the template signal.
[0093] As an example, the second reference moment can be the moment in the network signal where the signal strength is the same or similar to the signal strength of the first reference moment, and the signal strength change trend is the same or similar to the signal strength change trend of the first reference moment.
[0094] As another example, the second reference time can be determined based on the relative relationship between the first reference time and the period to which it belongs. For example, if the first reference time is the start time of the period of the template signal, then the second reference time is the start time of the period of the network signal. If the first reference time is the 1st second within the period of the template signal, then the second reference time is the 1st second within the period of the network signal.
[0095] The network signal that matches the template signal also has a periodic characteristic. At least one second reference time can be determined within each period of the network signal. There can be multiple second reference times included in the network signal.
[0096] After determining the first reference time and the second reference time, according to the first relative relationship between the first target time period and the first reference time, determine the candidate time period in the network signal that satisfies the first relative relationship with the second reference time.
[0097] The first relative relationship between the first target time period and the first reference time can be represented by using the time length of the interval between the first target time period and the first reference time and the relationship of time sequence. For example, the first relative relationship between the first target time period and the first reference time is that the first target time period is the time period from the 2nd second to the 4th second after the first reference time. Another example, there may be multiple first target time periods. The first relative relationship between the first target time period and the first reference time is that the first target time period is the time period from the 2nd second to the 3rd second after the first reference time, and the time period from the 5th second to the 6th second after the first reference time.
[0098] Take the time period in the network signal that satisfies the first relative relationship with the second reference time as the candidate time period. Taking the above example, take the time period from the 2nd second to the 4th second after the second reference time as the candidate time period.
[0099] There can be multiple candidate time periods included in the network signal. The candidate time periods earlier than the current time can no longer obtain resources in advance. Determine the candidate time periods later than the current time as the second target time periods. The candidate time periods later than the current time are the candidate time periods whose start times are later than the current time.
[0100] The second method: Determine the second target time period by using the period.
[0101] Both the template signal and the network signal that matches the template signal include multiple periods. Determine the second relative relationship between the first target time period and the period to which the first target time period belongs. The second relative relationship between the first target time period and the period to which the first target time period belongs can be represented by using the time length of the interval between the first target time period and the start time of the period. For example, the first target time period is the time period from the 2nd second to the 3rd second within the period.
[0102] Determine the candidate time periods included in the network signal according to the second relative relationship and the period of the network signal. Taking the above second relative relationship as an example, the time period from the 2nd second to the 3rd second within each period of the network signal is used as the candidate time period.
[0103] There can be multiple candidate time periods included in the network signal. The candidate time periods earlier than the current moment can no longer obtain resources in advance. Determine the candidate time periods later than the current moment as the second target time periods. The candidate time periods later than the current moment are those with start times later than the current moment.
[0104] S205: Before the second target time period, obtain the resources that the client needs to load within the second target time period.
[0105] The embodiments of this application do not limit the type of resources. As an example, the resources can be video resources or page resources. The resources that the client needs to load subsequently can be determined based on the running status of the client. For example, before reaching the second target time period, if the client is playing video A, then the resources that the client needs to load within the second target time period are, for example, the video resources of video A. Before reaching the second target time period, if the client is displaying page B, then the resources that the client needs to load within the second target time period are, for example, the page resources of page C. Page C is a page that can be jumped to from page B.
[0106] Before reaching the second target time period, obtain the resources that the client needs to load subsequently, that is, the resources that need to be loaded within the second target time period. As an example, the client can send a resource acquisition request to the server. Based on the acquired resource acquisition request, the server sends resources to the client. The acquired resources can be cached in the device installed by the client for subsequent loading by the client.
[0107] The embodiments of this application do not limit the time when the client obtains the resources that need to be loaded within the second target time period before the second target time period. In a possible implementation, before the second target time period and within the time period when the signal strength is greater than the second strength threshold, obtain the resources that the client needs to load within the second target time period. The second strength threshold is greater than or equal to the first strength threshold. The second strength threshold is the minimum signal strength that supports the client to obtain resources. In this way, the resources that the client needs to load within the second target time period can be obtained when the signal strength is strong, improving the success probability of obtaining resources.
[0108] Based on the relevant content of S201 - S205 above, it can be known that by using a template signal that matches the network signal, it is possible to relatively accurately predict the second target time period when resources cannot be obtained in a timely manner. In this way, before the second target time period, the resources that the client needs to load during the second target time period can be pre - obtained, facilitating the client to load resources in a timely manner, smoothly display content, reducing the situation where the content displayed by the client freezes due to the inability to obtain resources in a timely manner, and improving the user experience.
[0109] As an example, the following introduces two possible implementation methods for matching the signal strength change information with the signal strength change characteristics of the template signal.
[0110] The method of matching the signal strength change information with the signal strength change characteristics can be determined based on the content types of the signal strength change information and the signal strength change characteristics.
[0111] First: The signal strength change information includes multiple first moments and the first signal strength corresponding to the first moment. The signal strength change characteristics are represented by a template signal strength image. The template signal strength image is used to describe the correspondence between the second moment and the second signal strength.
[0112] An embodiment of the present application provides a possible implementation method for matching the signal strength change information with the signal strength change characteristics of the template signal, including the following steps:
[0113] A1: Based on multiple first moments and the first signal strength corresponding to the first moment, generate a signal strength image to be matched.
[0114] Using the multiple first moments and the first signal strength corresponding to the first moment included in the signal strength change information, generate a signal strength image to be matched. The generation method of the signal strength image to be matched is the same as that of the template signal strength image. The generated signal strength image to be matched and the template signal strength image belong to the same type of image.
[0115] As an example, the template signal strength image is a waveform graph. Using the multiple first moments and the first signal strength corresponding to the first moment included in the signal strength change information, generate a waveform graph with the moment on the abscissa and the signal strength on the ordinate, that is, the signal strength image to be matched.
[0116] A2: Determine the similarity between the signal strength image to be matched and the template signal strength image.
[0117] The similarity can reflect the degree of similarity between the signal strength image to be matched and the template signal strength image.
[0118] The embodiments of the present application do not limit the method for calculating the similarity between the signal strength image to be matched and the template signal strength image. In one possible implementation, the similarity is obtained by calculating the overlapping degree between the signal strength image to be matched and the template signal strength image. In another possible implementation, the difference between the signal strength in the signal strength image to be matched and the signal strength in the template signal strength image at corresponding moments is calculated to determine the similarity. The corresponding moments are, for example, the moments with the same time length from the start moment of the period within the period.
[0119] Correspondingly, the embodiments of the present application provide a possible implementation for determining that the signal strength change information matches the signal strength change feature, including:
[0120] Determine that the similarity is greater than the similarity threshold.
[0121] The similarity threshold can be a preset threshold. If the similarity is greater than the similarity threshold, it indicates that the matching degree between the signal strength change information and the signal strength change feature is relatively high, and it is determined that the signal strength change information matches the signal strength change feature. If the similarity is less than or equal to the similarity threshold, it indicates that the matching degree between the signal strength change information and the signal strength change feature is relatively low, and the signal strength change information does not match the signal strength change feature.
[0122] The second type: The signal strength change feature includes a signal strength change condition.
[0123] The embodiments of the present application provide a possible implementation for matching the signal strength change information with the signal strength change feature of the template signal, including the following steps:
[0124] Judge whether the signal strength change information meets the signal strength change condition.
[0125] In one possible implementation, the signal strength change information can be directly used to judge whether the signal strength change information meets the signal strength change condition. As an example, the signal strength change condition is that the network disconnection frequency is greater than the first frequency threshold. The signal strength change information includes the network disconnection frequency. Judge whether the network disconnection frequency included in the signal strength change information is greater than the first frequency threshold.
[0126] In another possible implementation, according to the signal strength change condition, the signal strength change information is processed. Then judge whether the information obtained after processing the signal strength change information meets the signal strength change condition. As an example, the signal strength change condition is that the network disconnection frequency is greater than the first frequency threshold. The signal strength change information includes multiple moments and the signal strength corresponding to each moment. According to the multiple moments and the signal strength corresponding to each moment, first calculate the network disconnection frequency. Judge whether the calculated network disconnection frequency is greater than the first frequency threshold.
[0127] Correspondingly, an embodiment of the present application provides a possible implementation manner for determining that the signal strength change information matches the signal strength change feature, including:
[0128] Determine that the signal strength change information meets the signal strength change condition.
[0129] If the signal strength change information meets the signal strength change condition, it indicates that the matching degree between the signal strength change information and the signal strength change feature is relatively high, and it is determined that the signal strength change information matches the signal strength change feature. If the signal strength change information does not meet the signal strength change condition, it indicates that the matching degree between the signal strength change information and the signal strength change feature is relatively low, and the signal strength change information does not match the signal strength change feature.
[0130] The above are two possible implementation manners provided by the embodiments of the present application for matching the signal strength change information with the signal strength change feature of the template signal, which are not intended to be limiting. For another example, the signal strength change feature of the template signal is represented by a first function expression. A second function expression is obtained by fitting according to the signal strength change information. It is determined whether the signal strength change information matches the signal strength change feature by comparing the first function expression and the second function expression.
[0131] Based on a resource acquisition method provided by the above method embodiments, an embodiment of the present application further provides a resource acquisition device, which will be described below with reference to the accompanying drawings.
[0132] See Figure 3 As shown, this figure is a schematic structural diagram of a resource acquisition device provided by an embodiment of the present application. As Figure 3 shown, the resource acquisition device includes:
[0133] A first acquisition unit 301, configured to acquire signal strength change information of a network signal within a preset time period;
[0134] A matching unit 302, configured to match the signal strength change information with the signal strength change feature of a preset template signal, where the template signal is a signal with periodically strong and weak signal strength changes;
[0135] A first determination unit 303, configured to determine a first target time period that meets the acquisition condition in the template signal if it is determined that the signal strength change information matches the signal strength change feature successfully;
[0136] A second determination unit 304, configured to determine a second target time period in the network signal that is later than the current moment and corresponds to the first target time period;
[0137] A second acquisition unit 305, configured to acquire, before the second target time period, resources that the client needs to load during the second target time period.
[0138] In a possible implementation, the signal strength change information includes a plurality of first moments and first signal strengths corresponding to the first moments. The signal strength change feature is represented by a template signal strength image, and the template signal strength image is used to describe the correspondence between a second moment and a second signal strength. The matching unit 302 is specifically configured to generate a signal strength image to be matched based on the plurality of first moments and the first signal strengths corresponding to the first moments; determine the similarity between the signal strength image to be matched and the template signal strength image.
[0139] Determining that the signal strength change information matches the signal strength change feature successfully includes:
[0140] Determining that the similarity is greater than a similarity threshold.
[0141] In a possible implementation, the signal strength change feature includes a signal strength change condition. The matching unit 302 is specifically configured to determine whether the signal strength change information meets the signal strength change condition.
[0142] Determining that the signal strength change information matches the signal strength change feature successfully includes:
[0143] Determining that the signal strength change information meets the signal strength change condition.
[0144] In a possible implementation, the second determination unit 304 is specifically configured to determine a first reference moment of the template signal, and determine a second reference moment in the network signal that matches the first reference moment; according to a first relative relationship between the first target time period and the first reference moment, determine a candidate time period in the network signal that satisfies the first relative relationship with the second reference moment; determine a candidate time period later than the current moment as the second target time period.
[0145] In a possible implementation, the second determination unit 304 is specifically configured to determine a second relative relationship between the first target time period and a cycle to which the first target time period belongs; according to the second relative relationship and the cycle of the network signal, determine a candidate time period; determine a candidate time period later than the current moment as the second target time period.
[0146] In a possible implementation, the acquisition condition is that the signal strength within a time period is less than a first strength threshold.
[0147] In a possible implementation, the second obtaining unit 305 is specifically configured to obtain, within a time period before the second target time period and with a signal strength greater than a second strength threshold, resources that the client needs to load during the second target time period, where the second strength threshold is greater than or equal to the first strength threshold.
[0148] Based on a resource obtaining method provided in the foregoing method embodiment, the present application further provides an electronic device, including: one or more processors; a storage device storing one or more programs thereon, where when the one or more programs are executed by the one or more processors, the one or more processors implement the resource obtaining method as described in any of the foregoing embodiments.
[0149] Next, with reference to Figure 4 , there is shown a schematic structural diagram of an electronic device 400 suitable for implementing the embodiments of the present application. The terminal device in the embodiments of the present application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (portable android devices, tablet computers), PMPs (Portable Media Players), in-vehicle terminals (such as in-vehicle navigation terminals), etc., and fixed terminals such as digital TVs (televisions), desktop computers, etc. Figure 4 The electronic device shown is merely an example and should not impose any limitation on the functions and usage scope of the embodiments of the present application.
[0150] As Figure 4 shown, the electronic device 400 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 401, which may perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage device 408 into a random access memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the electronic device 400 are also stored. The processing device 401, the ROM 402, and the RAM 403 are connected to each other through a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.
[0151] Typically, the following devices can be connected to the I / O interface 405: an input device 408 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 407 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 408 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 409. The communication device 409 can allow the electronic device 400 to communicate with other devices wirelessly or wiredly to exchange data. Although Figure 4 the electronic device 400 with various devices is shown, it should be understood that it is not required to implement or have all the shown devices. Instead, more or fewer devices can be implemented or had.
[0152] In particular, according to an embodiment of the present application, the processes described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes program codes for executing the methods shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication device 409, or installed from the storage device 408, or installed from the ROM 402. When the computer program is executed by the processing device 401, the above functions defined in the methods of the embodiments of the present application are executed.
[0153] The electronic device provided by the embodiment of the present application and the resource acquisition method provided by the above embodiment belong to the same inventive concept. Technical details not described in detail in this embodiment can be seen in the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
[0154] Based on a resource acquisition method provided by the above method embodiment, an embodiment of the present application provides a computer storage medium, on which a computer program is stored, wherein the program, when executed by a processor, implements the resource acquisition method as described in any of the above embodiments.
[0155] It should be noted that the above-mentioned computer-readable medium in this application can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of a computer-readable storage medium can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this application, a computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or in combination with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, and this computer-readable signal medium can send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. The program code contained on a computer-readable medium can be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0156] In some embodiments, the client and the server can communicate using any currently known or future-developed network protocol such as HTTP (Hyper Text Transfer Protocol), and can be interconnected with digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet), and end-to-end networks (e.g., ad hoc end-to-end networks), as well as any currently known or future-developed networks.
[0157] The above-mentioned computer-readable medium can be included in the above-mentioned electronic device; or it can exist separately without being assembled into the electronic device.
[0158] The above-mentioned computer-readable medium carries one or more programs, and when the one or more programs are executed by the electronic device, the electronic device is caused to execute the above-mentioned resource acquisition method.
[0159] Computer program code for performing the operations of this application can be written in one or more programming languages or combinations thereof. The above-mentioned programming languages include, but are not limited to, object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, executed as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., by using an Internet service provider to connect through the Internet).
[0160] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code that contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0161] The units involved in the embodiments described in this application can be implemented in software or in hardware. Among them, the name of the unit / module does not, in some cases, constitute a limitation on the unit itself. For example, the voice data acquisition module can also be described as the "data acquisition module".
[0162] The functions described above herein can be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that can be used include: field programmable gate arrays (FPGA), application specific integrated circuits (ASIC), application specific standard products (ASSP), system on a chip (SOC), complex programmable logic devices (CPLD), and so on.
[0163] In the context of the present application, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include electrical connections based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0164] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. For the same or similar parts among the various embodiments, reference can be made to each other. For the systems or apparatuses disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and reference can be made to the description in the method part for relevant parts.
[0165] It should be understood that in the present application, "at least one (item)" means one or more, and "a plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships can exist. For example, "A and / or B" can mean: only A exists, only B exists, and both A and B exist simultaneously. Here, A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. "At least one (one) of the following" or its similar expression refers to any combination of these items, including any combination of single item (one) or plural items (ones). For example, at least one (one) of a, b, or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0166] It should also be noted that in this text, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the element.
[0167] The foregoing description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A resource acquisition method, characterized in that, The method includes: Obtaining the signal strength change information of the network signal within a preset time period; Matching the signal strength change information with the signal strength change characteristics of a preset template signal, where the template signal is a signal with periodic strong and weak signal strength changes; If it is determined that the signal strength change information matches the signal strength change characteristics successfully, determining a first target time period that meets the acquisition condition in the template signal; Determining a second target time period in the network signal that corresponds to the first target time period and is later than the current moment; Before the second target time period, obtaining the resources that the client needs to load within the second target time period.
2. The method according to claim 1, characterized in that, The signal strength change information includes a plurality of first moments and the first signal strength corresponding to the first moment. The signal strength change characteristics are represented by a template signal strength image, and the template signal strength image is used to describe the correspondence between the second moment and the second signal strength. The matching of the signal strength change information with the signal strength change characteristics of the preset template signal includes: Generating a signal strength image to be matched based on the plurality of first moments and the first signal strength corresponding to the first moment; Determining the similarity between the signal strength image to be matched and the template signal strength image; The determination that the signal strength change information matches the signal strength change characteristics successfully includes: Determining that the similarity is greater than the similarity threshold.
3. The method according to claim 1, characterized in that, The signal strength change characteristics include signal strength change conditions. The matching of the signal strength change information with the signal strength change characteristics of the preset template signal includes: Judging whether the signal strength change information meets the signal strength change conditions; The determination that the signal strength change information matches the signal strength change characteristics successfully includes: Determining that the signal strength change information meets the signal strength change conditions.
4. The method according to any one of claims 1 to 3, characterized in that, The determination of the second target time period in the network signal that corresponds to the first target time period and is later than the current moment includes: Determining a first reference moment of the template signal and determining a second reference moment in the network signal that matches the first reference moment; According to the first relative relationship between the first target time period and the first reference moment, determining a candidate time period in the network signal that satisfies the first relative relationship with the second reference moment; Determining the candidate time period that is later than the current moment as the second target time period.
5. The method according to any one of claims 1 to 3, characterized in that The determination of the second target time period in the network signal that corresponds to the first target time period and is later than the current moment includes: Determining a second relative relationship between the first target time period and the period to which the first target time period belongs; Determining a candidate time period according to the second relative relationship and the period of the network signal; Determining the candidate time period that is later than the current moment as the second target time period.
6. The method according to any one of claims 1 to 3, characterized in that, The acquisition condition is that the signal strength within the time period is less than a first strength threshold.
7. The method according to any one of claims 1 to 3, characterized in that The obtaining of the resources that the client needs to load within the second target time period before the second target time period includes: Before the second target time period and within a time period when the signal strength is greater than a second strength threshold, which is greater than or equal to the first strength threshold, obtain the resources that the client needs to load during the second target time period.
8. A resource acquisition device, characterized in that, The device includes: A first acquisition unit, configured to acquire signal strength change information of a network signal within a preset time period; A matching unit, configured to match the signal strength change information with signal strength change characteristics of a preset template signal, where the template signal is a signal with periodically strong and weak signal strength changes; A first determination unit, configured to, if it is determined that the signal strength change information matches the signal strength change characteristics successfully, determine a first target time period in the template signal that meets the acquisition conditions; A second determination unit, configured to determine a second target time period in the network signal that corresponds to the first target time period and is later than the current time; A second acquisition unit, configured to, before the second target time period, acquire the resources that the client needs to load during the second target time period.
9. An electronic device, characterized in that, Comprising: One or more processors; A storage device, on which one or more programs are stored. When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1-7.
10. A computer-readable medium, characterized in that, On which a computer program is stored, where the program, when executed by a processor, implements the method according to any one of claims 1-7.
Citation Information
Patent Citations
Method for displaying pre-loaded content and terminal equipment
CN108282236A
Resource loading method and device, server and storage medium
CN112040490A
Data preloading enhancement method and device and mobile terminal
CN113835771A
Network resource preloading method and device and storage medium
CN114201706A
Data caching method and device, electronic equipment and storage medium
CN115514660A