Method, apparatus, medium, and device for processing cached data

By determining the importance and deleting unnecessary models when the client caches the scenario model, and obtaining the required models from other clients, the problem of slow client acquisition of models and excessive storage space is solved, reducing server load and ensuring normal use of clients.

CN114491337BActive Publication Date: 2025-06-17NEUSOFT CORP
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111656659.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-30
Publication Date
2025-06-17
Estimated Expiration
2041-12-30

AI Technical Summary

Technical Problem

In 3D scene simulation technology based on B/S architecture, the speed at which the client acquires model data is affected by network quality and server concurrent pressure, resulting in slow scene display speed and excessive client storage space, affecting normal use.

Method used

By determining whether the storage space occupied by the cached scene model by the target client exceeds the threshold, calculate the importance of each scene model, and delete unnecessary scene models based on the importance, obtaining the required models from other clients to reduce server load.

Benefits of technology

It reduces server load and client storage pressure, improves the speed of client acquisition scenario models, avoids excessive storage space, and ensures normal use of client.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114491337B_ABST
    Figure CN114491337B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a method, apparatus, medium, and device for processing cached data. The method includes: determining whether the storage space occupied by the target scenario model cached by the target client is greater than a preset storage space threshold, where the target client obtains the target scenario model from a server or other clients, multiple scenario models for reconstructing the target scenario are stored in the server, and each scenario model is used to reconstruct a part of the target scenario; if the storage space is greater than the storage space threshold, determining the importance of each target scenario model; and deleting at least one target scenario model from the target client according to the importance of the target scenario model. In this way, the load and access pressure on the server can be reduced, the delay in obtaining the scenario model by the target client can be avoided, and the speed of the target client for obtaining the scenario model can be ensured. At the same time, the resources for reconstructing the target scenario are prevented from excessively occupying the target client to ensure the normal use of the target client.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technologies, and in particular, to a method, apparatus, medium, and device for processing cached data. Background Art

[0002] Currently, in 3D (Three Dimensions) scene simulation technology based on the B / S (Browser / Server) architecture, a certain scene is usually simulated or reconstructed as a whole by a model, and the model is stored in a server. Therefore, when a client (i.e., a browser) needs to display a certain scene, the model corresponding to the scene is obtained from the server through the network, and the model data is loaded locally and displayed. On the one hand, since the transmission speed of the model depends on the network quality, when the network quality is poor, the speed at which the client obtains the model becomes slow, resulting in a slow scene display speed of the client. Especially when the amount of data of the model is large, the scene display speed of the client will be further slowed down. On the other hand, in the B / S architecture, a server usually communicates with multiple clients. Therefore, multiple clients may request model data from the server simultaneously within a certain period, resulting in excessive concurrent pressure on the server and the server being unable to respond to the requests of the clients in a timely manner, which will also affect the speed at which the client obtains the model. In addition, after the client obtains the model, it usually needs to cache the model locally. Since the amount of data of the model is usually large, after the client caches the model, the storage space of the client may be overly occupied, resulting in the inability to use the functions of the client normally. Summary of the Invention

[0003] The purpose of the present disclosure is to provide a method, apparatus, medium, and device for processing cached data, which can not only reduce the load and access pressure of the server, ensure the speed at which the target client obtains the scene model, but also avoid excessive occupation of the target client by the resources for reconstructing the target scene, and ensure the normal use of the target client.

[0004] To achieve the above purpose, in a first aspect of the present disclosure, a method for processing cached data is provided, and the method includes:

[0005] Determine whether the storage space occupied by the target scene model cached by the target client is greater than a preset storage space threshold, where the target client obtains the target scene model from a server or other clients, multiple scene models for reconstructing the target scene are stored in the server, and each of the scene models is used to reconstruct a part of the target scene;

[0006] If the storage space is greater than the storage space threshold, determine the importance of each of the target scene models, where the importance is used to reflect the degree of future demand for the target scene model;

[0007] Delete at least one target scene model from the target client according to the importance of the target scene model.

[0008] Optionally, determining the importance of each of the target scene models includes:

[0009] For each of the target scene models, perform the following operations:

[0010] Determine, among the clients associated with the target scene and capable of establishing communication with the target client, the clients that do not store the target scene model as the associated clients of the target scene model;

[0011] Respectively determine the relative distance between the position corresponding to the camera in each associated client of the target scene model in the target scene and the position corresponding to the target scene model in the target scene;

[0012] Determine the network distance between the target client and each of the associated clients of the target scene model;

[0013] Determine the importance of the target scene model according to each of the network distances and each of the relative distances corresponding to the target scene model.

[0014] Optionally, determine the importance Weight of the mth target scene model through the following formula m :

[0015]

[0016] where n is the total number of associated clients of the mth target scene model, Route Ci is the network distance between the ith associated client of the mth target scene model and the target client, and Dist im is the relative distance between the position corresponding to the camera in the ith associated client of the mth target scene model in the target scene and the position corresponding to the mth target scene model in the target scene, α is the first adjustment coefficient, and β is the second adjustment coefficient.

[0017] Optionally, the method further includes:

[0018] Determine the target scene information of the local scene to be loaded into the target client according to the motion information of the camera in the target client in the target scene;

[0019] Determine the target device of the scene model for providing the local scene indicated by the target scene information for the target client according to the target scene information;

[0020] Obtain and load the scene model corresponding to the local scene from the target device.

[0021] Optionally, model cache information is stored in the server, and the model cache information is used to indicate the clients that have cached the scene model and the scene information of the scene models cached by the clients.

[0022] The target device is determined by the following method:

[0023] Determine whether there is an alternative client in the model cache information stored in the server that can match the target scene information.

[0024] When it is determined that there is such an alternative client, determine one of the alternative clients as the target device.

[0025] Optionally, determining one of the alternative clients as the target device includes:

[0026] Respectively determine the network distance between each alternative client and the target client.

[0027] Determine the alternative client with the smallest network distance as the target device.

[0028] Optionally, the target device is also determined by the following method:

[0029] When it is determined that there is no such alternative client, determine the server as the target device.

[0030] A second aspect of the present disclosure provides a processing device for caching data, and the device includes:

[0031] A first determination module, configured to determine whether the storage space occupied by the target scene model cached by the target client is greater than a preset storage space threshold, where the target client obtains the target scene model from a server or other clients, the server stores a plurality of scene models for reconstructing the target scene, and each scene model is used to reconstruct a part of the target scene.

[0032] A second determination module, configured to, if the storage space is greater than the storage space threshold, determine the importance of each target scene model, where the importance is used to reflect the degree of future demand for the target scene model.

[0033] A deletion module, configured to delete at least one target scene model from the target client according to the importance of the target scene model.

[0034] Optionally, the second determination module is configured to:

[0035] For each of the target scenario models, perform the following operations:

[0036] A first determination sub-module, configured to determine, among the clients that are associated with the target scenario and can establish communication with the target client, the clients that do not store the target scenario model as the associated clients of the target scenario model;

[0037] A second determination sub-module, configured to respectively determine the relative distance between the position of the camera in each associated client of the target scenario model in the target scenario and the position of the target scenario model in the target scenario;

[0038] A third determination sub-module, configured to determine the network distance between the target client and each of the associated clients of the target scenario model;

[0039] A fourth determination sub-module, configured to determine the importance of the target scenario model according to each network distance and each relative distance corresponding to the target scenario model.

[0040] Optionally, the fourth determination sub-module is configured to determine the importance Weight of the m-th target scenario model through the following formula m :

[0041]

[0042] where n is the total number of associated clients of the m-th target scenario model, Route Ci is the network distance between the i-th associated client of the m-th target scenario model and the target client, and Dist im is the relative distance between the position of the camera in the i-th associated client of the m-th target scenario model in the target scenario and the position of the m-th target scenario model in the target scenario, α is a first adjustment coefficient, and β is a second adjustment coefficient.

[0043] Optionally, the apparatus further includes:

[0044] A third determination module, configured to determine the target scenario information of the local scenario to be loaded into the target client according to the movement information of the camera in the target client in the target scenario;

[0045] A fourth determination module, configured to determine the target device of the scenario model for providing the local scenario indicated by the target scenario information for the target client according to the target scenario information;

[0046] A loading module, configured to obtain and load the scenario model corresponding to the local scenario from the target device.

[0047] Optionally, model cache information is stored in the server, and the model cache information is used to indicate the clients that have cached the scenario model and the scenario information of the scenario model cached by the clients;

[0048] The apparatus determines the target device through the following modules:

[0049] A fifth determination sub-module, configured to determine whether there is an alternative client in the model cache information stored in the server that can match the target scenario information;

[0050] A sixth determination sub-module, configured to, when it is determined that there is the alternative client, determine one of the alternative clients as the target device.

[0051] Optionally, the sixth determination sub-module includes:

[0052] A seventh determination sub-module, configured to respectively determine the network distances between each of the alternative clients and the target client;

[0053] An eighth determination sub-module, configured to determine the alternative client with the smallest network distance as the target device.

[0054] Optionally, the fifth determination module further includes:

[0055] A ninth determination sub-module, configured to, when it is determined that there is no such alternative client, determine the server as the target device.

[0056] A third aspect of the present disclosure provides a non-transitory computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the steps of the method provided in the first aspect of the present disclosure are implemented.

[0057] A fourth aspect of the present disclosure provides an electronic device, including:

[0058] A memory, on which a computer program is stored;

[0059] A controller, when the computer program is executed by the controller, the steps of the method provided in the first aspect of the present disclosure are implemented.

[0060] Through the above technical solution, during the process of reconstructing the target scene, the target client can not only obtain the target scene model from the server, but also obtain the target scene model from other clients. Compared with the method of obtaining each target scene model from the server, on the one hand, it can reduce the load and access pressure of the server. On the other hand, it can avoid delays in the target client when obtaining the scene model, ensure the speed of the target client to obtain the scene model, and thus improve the scene reconstruction speed of the target client. At the same time, the server stores multiple scene models for reconstructing the target scene, and each scene model is used to reconstruct a part of the target scene. That is to say, the model for reconstructing the whole target scene is split into multiple small scene models and stored in the server. Therefore, the target client only needs to obtain the currently required scene model each time. Since the data volume of a single scene model is small, it can ensure the speed of the target client to obtain the scene model. And even if the network quality between the target client and the server is not good, it will not have too much impact on the scene display of the target client. In addition, if the storage space occupied by the target scene models cached in the target client is greater than the preset storage space threshold, some of the target scene models in the target client can be deleted according to the degree of future demand for each target scene model in the target client. In this way, the space for storing the target scene models in the target client can be controlled within a certain range, avoiding excessive occupation of the target client by the resources for reconstructing the target scene, and thus ensuring that the normal use of the target client is not affected.

[0061] Other features and advantages of the present disclosure will be described in detail in the subsequent specific implementation part. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] The drawings are used to provide a further understanding of the present disclosure, and constitute a part of the specification. Together with the following specific implementation, they are used to explain the present disclosure, but do not constitute a limitation to the present disclosure. In the drawings:

[0063] Figure 1 is a flowchart of a method for processing cached data provided by an exemplary embodiment of the present disclosure;

[0064] Figure 2 is a flowchart of a method for processing cached data provided by another exemplary embodiment of the present disclosure;

[0065] Figure 3 is a block diagram of a device for processing cached data provided by an exemplary embodiment of the present disclosure;

[0066] Figure 4 is a block diagram of an electronic device provided by another exemplary embodiment of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0067] The following will describe in detail the specific embodiments of the present disclosure with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only for the purpose of illustrating and explaining the present disclosure, and are not intended to limit the present disclosure.

[0068] Figure 1 It is a flowchart of a method for processing cached data provided by an exemplary embodiment of the present disclosure. As Figure 1 shown, the method may include S101 to S103.

[0069] S101, determine whether the storage space occupied by the target scenario model cached by the target client is greater than a preset storage space threshold.

[0070] Among them, the target client obtains the target scenario model from the server or other clients. Multiple scenario models for reconstructing the target scenario are stored in the server, and each scenario model is used to reconstruct a part of the target scenario.

[0071] The preset storage space threshold can be set according to actual requirements. Among them, in order to ensure the normal operation of the target client, the preset storage space threshold should be less than the maximum storage space of the target client. For example, if the total storage space of the client is 512MB, the preset storage space threshold can be set to 256MB. In this way, by presetting a storage space threshold in the target client to limit the space for storing the scenario model in the target client, it can not only ensure that the target client can cache new scenario models, but also leave space for other functions of the target client.

[0072] It should be noted that the comparison between the storage space occupied by the cached target scenario model and the preset storage space threshold in the present disclosure can be performed after the scenario model is cached in the target client, that is, when the target client receives the data of a new scenario model, regardless of whether the caching of the scenario model will cause the preset storage space threshold to be exceeded, the new scenario model is first cached in the target client. For example, assuming that the preset storage space threshold is 256MB, if the storage space occupied by the target scenario model cached by the target client is 240MB, when the target client receives the data of a new scenario model (40MB), the new scenario model is first cached in the target client and becomes the newly added target scenario model of the target client. At this time, the storage space occupied by the target client cache is 280MB, which is greater than the preset storage space threshold. Then, in the following, the steps of S102 and S103 can be executed to reduce the storage space of the cached target scenario model in the target client so that it is less than the preset storage space threshold.

[0073] S102, if the storage space is greater than the storage space threshold, determine the importance of each target scenario model.

[0074] Among them, the importance is used to reflect the degree to which the target scenario model will be demanded in the future. Since the scenario model can be transmitted between clients in this disclosure, the degree to which the target scenario model will be demanded in the future can be understood as the degree to which the target scenario model will be demanded by other clients in the future, that is, the possibility that the target scenario model will be requested by other clients in the future. The higher the possibility that the target scenario model will be requested by other clients in the future, the higher the degree to which the target scenario model will be demanded in the future. Correspondingly, its importance is greater.

[0075] Exemplarily, if the storage space occupied by the target scenario models cached in the target client is greater than the storage space threshold, the importance of each target scenario model can be determined, so as to process the target scenario models cached in the target client according to the importance of each target scenario model subsequently.

[0076] S103, delete at least one target scenario model from the target client according to the importance of the target scenario model.

[0077] Exemplarily, if there are a total of 5 target scenario models in the target client, and the preset storage space threshold is 256 MB, the storage space occupied by the first target scenario model is 35 MB, the importance is 0.5, the storage space occupied by the second target scenario model is 45 MB, the importance is 0.52, the storage space occupied by the third target scenario model is 55 MB, the importance is 0.8, the storage space occupied by the fourth target scenario model is 60 MB, the importance is 0.6, and the storage space occupied by the fifth target scenario model is 80 MB, the importance is 0.75. It can be seen that at this time, the total storage space occupied by the target scenario models cached in the target client is 280 MB, which is greater than the preset storage space threshold of 256 MB. Then, at least one target scenario model can be deleted from the target client according to the importance corresponding to each of these 5 target scenario models.

[0078] As described above, the higher the degree to which the target scenario model will be demanded in the future, the greater its importance. Therefore, at least one target scenario model with a smaller importance can be deleted from the client. For example, the target scenario models can be deleted one by one in ascending order of importance until the storage space occupied by the target scenario models cached in the target client is no longer greater than the preset storage space threshold. Taking the example described in the previous paragraph as an example, the first target scenario model with the smallest importance can be deleted. After deletion, the storage space occupied by the target scenario models stored in the target client is 245 MB, which is less than the preset storage space threshold. Therefore, there is no need to continue deleting other target scenario models.

[0079] In the above manner, according to the degree of future demand for each target scenario model in the target client, some target scenario models in the target client can be deleted, which can save the storage space of the target client and avoid affecting the use of the target client due to excessive occupation of the resources of the target client.

[0080] Through the above technical solution, during the process of the target client reconstructing the target scenario, the target client can not only obtain the target scenario model from the server, but also obtain the target scenario model from other clients. Compared with the method of obtaining each target scenario model from the server, on the one hand, it can reduce the load and access pressure on the server, and on the other hand, it can avoid delays in the target client when obtaining the scenario model, ensure the speed of the target client to obtain the scenario model, and thus improve the scenario reconstruction speed of the target client. At the same time, the server stores multiple scenario models for reconstructing the target scenario, and each scenario model is used to reconstruct a part of the target scenario. That is to say, the model for reconstructing the whole target scenario is split into multiple small scenario models and stored in the server. Therefore, the target client only needs to obtain the currently required scenario model each time. Since the data volume of a single scenario model is small, it can ensure the speed of the target client to obtain the scenario model. And even if the network quality between the target client and the server is not good, it will not have too much impact on the scenario display of the target client. Also, if the storage space occupied by the target scenario models cached in the target client is greater than the preset storage space threshold, some target scenario models in the target client can be deleted according to the degree of future demand for each target scenario model in the target client. In this way, the space for storing the target scenario models in the target client can be controlled within a certain range, avoiding excessive occupation of the target client by the resources for reconstructing the target scenario, so as to ensure that the normal use of the target client is not affected.

[0081] In order to enable those skilled in the art to better understand the technical solutions provided by the embodiments of the present invention, the corresponding steps and related concepts in the above text will be described in detail below.

[0082] First, the scenario model of the present disclosure will be described below.

[0083] Generally, for the three-dimensional reconstruction of the target scenario, it can be achieved through a three-dimensional scenario reconstruction model. However, such a model has a large data volume and occupies a lot of space. To address this problem, the present disclosure splits the three-dimensional scenario reconstruction model stored in the server into multiple scenario models, and each scenario model is used to reconstruct a part of the target scenario. Thus, through these individual scenario models, the three-dimensional reconstruction of the target scenario can also be realized. In this way, during the subsequent three-dimensional scenario reconstruction process, according to the scenario information of the required local scenario, the corresponding scenario model of the local scenario can be preferentially loaded.

[0084] As described in the following embodiments, the importance of each target scenario model in S102 can be achieved in various ways.

[0085] In an alternative embodiment, for each target scenario model, a first client that does not store the target scenario model can be determined from the clients associated with the target scenario, and the importance of the target scenario model can be determined based on the network distance between each first client and the target client.

[0086] Among them, the client associated with the target scenario can be understood as the client that is loading (or has loaded) the resources related to the target scenario (i.e., the scenario model of the target scenario). Generally, the client can simulate and reconstruct multiple scenarios, and the target scenario may or may not exist in these scenarios. Based on this, it can be determined whether a certain client is associated with the target scenario. If a client caches (or is loading) the resources related to the target scenario, then the client is the client associated with the target scenario. Otherwise, if a client does not cache and does not load any resources related to the target scenario, then the client is not associated with the target scenario.

[0087] In the present disclosure, the scenario model required by the client can be obtained from other clients. Therefore, if both the target client and a certain client store the target scenario model, when the client needs to use this target scenario model, it will obtain the target scenario model from this client instead of from the target client. It can be seen that in this case, the client has no acquisition requirement for this target scenario model, and thus has no reference value for calculating the importance of the target scenario model. Therefore, the importance of a certain target scenario model in the target client should be determined based on the clients associated with the target scenario and that do not store the target scenario model. Thus, such clients need to be screened out. That is, for each target scenario model, a first client that does not store the target scenario model can be determined from the clients associated with the target scenario.

[0088] The network distance between clients is used to characterize the distance of network transmission between clients. For example, the network distance between a client and another client can be represented by the number of routing hops between the two clients. Herein, the number of routing hops refers to the number of routers passed from the source end to the destination end. Thus, for each target scenario model, the importance of the target scenario can be determined by the number of routing hops between each first client corresponding to the target scenario model and the target client respectively. For example, the importance of the target scenario model can be the reciprocal of the sum of the number of routing hops, where the sum of the number of routing hops is a comprehensive representation of the network distance between the first client and the target client. If the sum of the number of routing hops is small, it indicates that the first client is very likely to obtain the target scenario model from the target client subsequently, that is, the degree of demand for the target scenario model in the future is high.

[0089] In another alternative embodiment, determining the importance of each target scenario model in S102 may include the following steps:

[0090] For each target scenario model, perform the following operations:

[0091] S1021, determine the associated clients of the target scenario model as the clients that are associated with the target scenario and can establish communication with the target client and do not store the target scenario model;

[0092] S1022, respectively determine the relative distance between the position corresponding to the camera in each associated client of the target scenario model in the target scenario and the position corresponding to the target scenario model in the target scenario;

[0093] S1023, determine the network distance between the target client and each associated client of the target scenario model;

[0094] S1024, determine the importance of the target scenario model according to each network distance and each relative distance corresponding to the target scenario model.

[0095] During the process of the user using the client, whenever a new scenario model is stored in the client, the relevant information of the client can be sent to the server. The relevant information of the client may include, but is not limited to: the scenario models cached by the client, the local address of the client, and the scenario currently loaded by the client.

[0096] It should be noted that S1021~S2014 are for calculating the importance of one target scenario model. Therefore, each target scenario model will execute S1021~S2014 once to obtain the importance of the target scenario model. The following will explain S1021~S2014.

[0097] In S1021, the client associated with the target scenario is the client that is loading (or has already loaded) the resources related to the target scenario (i.e., the scenario model of the target scenario). Since the relevant information of each client is known in the server, it is possible to determine which clients are the clients associated with the target scenario by querying the relevant information of the clients in the server.

[0098] Whether communication can be established between two clients can be determined according to the network distance (e.g., the number of routing hops) between the two clients. If the network distance between the two clients is less than a preset parameter (e.g., the preset number of routing hops), it can be determined that communication can be established between the two clients. Therefore, it is possible to determine whether communication can be established with the target client by the number of routing hops between each client and the target client. Among them, the number of routing hops between other clients and the target client can be determined according to the local addresses of the other clients and the target client.

[0099] Combined with the above description, the calculation of the importance of the target scenario model by the client storing the target scenario model has no reference value. Therefore, among the clients associated with the target scenario and capable of establishing communication with the target client, the clients that do not store the target scenario model can be determined as the associated clients of the target scenario model.

[0100] In S1022, for each associated client of the target scenario model, the relative distance between the position corresponding to the camera in the associated client in the target scenario and the position corresponding to the target scenario model in the target scenario can be determined. Among them, the camera is a virtual camera in the 3D reconstruction technology, that is, the current perspective, and the 3D reconstruction of the client will be loaded in real time as the camera moves.

[0101] In S1023, for each associated client of the target scenario model, the network distance between the target client and the associated client can be determined. By way of example, the network distance is the number of routing hops. The method for determining the network distance has been described above and will not be elaborated here.

[0102] In S1024, after determining the data for calculating the importance of the target scenario model, the importance can be calculated for each target scenario model respectively. By way of example, the importance Weight of the m-th target scenario model can be determined by the following formula m :

[0103]

[0104] Among them, n is the total number of associated clients of the m-th target scenario model, Route Ci is the network distance between the i-th associated client of the m-th target scenario model and the target client, Dist imis the relative distance between the position corresponding to the camera in the i-th associated client of the m-th target scenario model in the target scenario and the position corresponding to the m-th target scenario model in the target scenario. α is the first adjustment coefficient, and β is the second adjustment coefficient. Among them, the network distance can be the number of routing hops. And the first adjustment coefficient α and the second adjustment coefficient β can be preset according to the experience of professionals in this field.

[0105] In this way, determining the degree of demand for the target scenario model in the future from both aspects of the network distance and the relative distance can improve the accuracy of the determined importance, making the importance of the determined target scenario model more accurate and providing more accurate data support for subsequent deletion operations.

[0106] Figure 2 is a flowchart of a method for processing cached data provided by another exemplary embodiment of the present disclosure. As Figure 2 shown, the method may include S201 to S203.

[0107] S201, determine the target scenario information of the local scenario to be loaded into the target client according to the movement information of the camera in the target client in the target scenario.

[0108] Exemplarily, the movement information of the camera in the target scenario may include, but is not limited to, any one or more of the coordinates, movement direction, and movement trajectory of the camera. For example, the movement direction of the camera at the previous moment can be used to predict the movement direction of the camera at the next moment, and according to the predicted movement direction of the camera, the target scenario information of the local scenario to be loaded into the target client can be determined. For example, if the camera moved to the right 1 second ago, it can be predicted that the camera will still move to the right in the next 1 second. Determine the target scenario information of the local scenario that the camera is about to display when the camera continues to move to the right, that is, the target scenario information of the local scenario to be loaded into the target client. In this way, the target scenario information of the local scenario to be loaded into the target client can be determined in sequence according to the movement information of the camera, so as to load the scenario model corresponding to the local scenario. Compared with loading all the scenario models corresponding to the target scenario at the same time, preferentially loading the scenario model corresponding to the local scenario can speed up the loading rate and improve the user experience.

[0109] S202, determine the target device for providing the scenario model of the local scenario indicated by the target scenario information for the target client according to the target scenario information.

[0110] Among them, the target device can be a server or an alternative client.

[0111] Exemplarily, according to the target scenario information, the scenario model corresponding to the local scenario to be loaded can be determined, and then the target device can be determined. For example, the target device can be determined by the target client. That is, the target client can obtain the client information and scenario model information storing the scenario model from the server to determine that the target device is the server or other clients. For another example, the target client can receive the target device sent by the server, where the server can determine the target device according to the client information and scenario model information of the scenario model stored by itself.

[0112] In an alternative embodiment, the server may store model cache information, which is used to indicate the clients that have cached the scenario model and the scenario information of the scenario model cached by the clients. The scenario information of the scenario model is used to represent the position of the local part of the target scenario reconstructed by the scenario model in the target scenario. Accordingly, the target device can be determined in the following manner:

[0113] Determine whether there is an alternative client in the model cache information stored in the server that can match the target scenario information;

[0114] In the case where an alternative client is determined to exist, one of the alternative clients is determined as the target device.

[0115] Whenever a client communicating with the server stores a new scenario model, the client can synchronously update the information related to the stored scenario model (for example, the scenario information of the scenario model) to the model cache information of the server. Thus, the server can always know the information related to the scenario models cached by each current client. Furthermore, when each client needs to load a new scenario model, it can always confirm through the server whether there are other clients that can provide a new scenario model for it. In this way, the channels for the client to obtain the scenario model can be enriched.

[0116] According to the target scenario information in S201, the position of the local scenario to be loaded into the target client in the target scenario can be determined. Thus, among the multiple scenario information corresponding to the target scenario, the scenario model corresponding to this position can be determined. Furthermore, based on the information related to the scenario models stored by each client stored in the server, it can be determined whether there is a client that has stored this scenario model. If there is a client that has stored the scenario model, then this client can be used as an alternative client. Otherwise, if no client has stored this scenario model, it can be determined that there is no alternative client.

[0117] Exemplarily, the target client can receive the model cache information sent by the server, and according to the received model cache information, determine whether there are alternative clients that can match the target scenario information in the above manner. For example, if the scenario model corresponding to the local scenario is scenario model k, and the target client determines according to the received model cache information that both client p1 and client p2 cache scenario model k, then client p1 and client p2 can be determined as alternative clients. Furthermore, one of client p1 and client p2 can be determined as the target device. Again, for example, the target client can directly receive the relevant information of the target device from the server, where the method for the server to determine the target device can refer to the method for the target client to determine the target device, which will not be elaborated here.

[0118] Optionally, determining one of the alternative clients as the target device may include the following steps:

[0119] Respectively determine the network distance between each alternative client and the target client;

[0120] Determine the alternative client with the smallest network distance as the target device.

[0121] Exemplarily, the network distance between each alternative client and the target client can be determined according to the number of routing hops between the target client and the alternative client. For example, if client p1 and client p2 are alternative clients, and the number of routing hops between client p1 and the target client is 3, and the number of routing hops between client p2 and the target client is 5, then client p1 can be determined as the target device.

[0122] By the above method, selecting the candidate client with fewer routing hops as the target device can reduce the communication delay in the process of obtaining the scenario model and improve the transmission speed.

[0123] In another alternative embodiment, the target device can also be determined in the following manner:

[0124] In the case where it is determined that there are no alternative clients, determine the server as the target device.

[0125] Exemplarily, if it is determined according to the cache data that there is no client caching the scenario model corresponding to the local scenario, then the server can be determined as the target device. In this way, when there are no alternative clients, the target client can obtain the scenario model corresponding to the local scenario through the server, which can not only ensure the normal loading of the target client resources but also minimize the load on the server as much as possible.

[0126] S203, obtain and load the scenario model corresponding to the local scenario from the target device.

[0127] If the target device is a server, the target client can receive the scene model corresponding to the local scene sent by the server; if the target device is an alternative client, the target client can receive the local address of the alternative client sent by the server so that communication can be established between the two clients. After that, the target client can receive the scene model corresponding to the local scene sent by the alternative client.

[0128] In this way, the target scene information of the local scene to be loaded into the target client can be determined in sequence according to the motion information of the camera to load the scene model corresponding to the local scene, which can accelerate the loading rate; obtaining and loading the scene model corresponding to the local scene from the target device can enrich the channels for obtaining the scene model corresponding to the local scene, so as to improve the access response rate, avoid affecting the normal use effect of users, and improve the user experience.

[0129] In an optional embodiment, after obtaining and loading the scene model corresponding to the local scene from the target device, the scene model can be stored in the target client.

[0130] In another optional embodiment, if the network distance between the alternative client as the target device and the target client is less than the preset distance parameter, there is no need to store the scene model in the target client.

[0131] Generally, if another client can obtain the scene model from the target client, it can often also obtain the scene model from an alternative client (target device) with a very short network distance from the target client. For this situation, in order to reduce the occupation of storage resources of the target client, judgment conditions can be set to determine whether it is necessary to cache the scene model in the target client. Exemplarily, the network distance can be characterized by the number of routing hops. Correspondingly, the preset distance parameter can be a preset routing hop threshold. If the number of routing hops between the target client and the alternative client as the target device is less than the preset routing hop threshold, it means that the network distance between the target client and the alternative client as the target device is extremely small. When the scene model is needed subsequently, it can be directly and quickly obtained from the alternative client as the target device. Therefore, there is no need to store the scene model in the target client to save the storage space of the target client as much as possible.

[0132] Based on the same inventive concept, the present disclosure also provides a processing device for cached data. Figure 3 It is a block diagram of a processing device 300 for cached data provided by an exemplary embodiment of the present disclosure. Refer to Figure 3 , the processing device 300 for cached data may include:

[0133] The first determination module 301 is configured to determine whether the storage space occupied by the target scene model cached by the target client is greater than a preset storage space threshold, where the target client obtains the target scene model from a server or other clients, the server stores multiple scene models for reconstructing the target scene, and each scene model is used to reconstruct a part of the target scene;

[0134] The second determination module 302 is configured to, if the storage space is greater than the storage space threshold, determine the importance of each target scene model, where the importance is used to reflect the degree of future demand for the target scene model;

[0135] The deletion module 303 is configured to delete at least one target scene model from the target client according to the importance of the target scene model.

[0136] Through the above technical solution, during the process of the target client reconstructing the target scene, the target client can not only obtain the target scene model from the server, but also obtain the target scene model from other clients. Compared with the method of obtaining each target scene model from the server, on the one hand, it can reduce the load and access pressure of the server, and on the other hand, it can avoid delays when the target client obtains the scene model, ensure the speed at which the target client obtains the scene model, and thus improve the scene reconstruction speed of the target client. At the same time, the server stores multiple scene models for reconstructing the target scene, and each scene model is used to reconstruct a part of the target scene. That is to say, the model for reconstructing the whole target scene is split into multiple small scene models and stored in the server. Therefore, the target client only needs to obtain the currently required scene model each time. Since the data volume of a single scene model is small, it is possible to ensure the speed at which the target client obtains the scene model, and even if the network quality between the target client and the server is poor, it will not have too much impact on the scene display of the target client. In addition, if the storage space occupied by the target scene model cached by the target client is greater than the preset storage space threshold, some target scene models in the target client can be deleted according to the degree of future demand for each target scene model in the target client. In this way, the space for storing the target scene model in the target client can be controlled within a certain range, avoiding excessive occupation of the target client by the resources for reconstructing the target scene, thereby ensuring that the normal use of the target client is not affected.

[0137] Optionally, the second determination module 302 is configured to:

[0138] For each target scene model, perform the following operations:

[0139] The first determination sub-module is configured to determine, from the clients that are associated with the target scenario and can establish communication with the target client, the clients that do not store the target scenario model as the associated clients of the target scenario model;

[0140] The second determination sub-module is configured to respectively determine the relative distance between the position corresponding to the camera in each associated client of the target scenario model in the target scenario and the position corresponding to the target scenario model in the target scenario;

[0141] The third determination sub-module is configured to determine the network distance between the target client and each of the associated clients of the target scenario model;

[0142] The fourth determination sub-module is configured to determine the importance of the target scenario model according to each network distance and each relative distance corresponding to the target scenario model.

[0143] Optionally, the fourth determination sub-module is configured to determine the importance Weight of the m-th target scenario model through the following formula m :

[0144]

[0145] where n is the total number of associated clients of the m-th target scenario model, Route Ci is the network distance between the i-th associated client of the m-th target scenario model and the target client, and Dist im is the relative distance between the position corresponding to the camera in the i-th associated client of the m-th target scenario model in the target scenario and the position corresponding to the m-th target scenario model in the target scenario, α is the first adjustment coefficient, and β is the second adjustment coefficient.

[0146] Optionally, the apparatus 300 further includes:

[0147] The third determination module is configured to determine the target scenario information of the local scenario to be loaded into the target client according to the movement information of the camera in the target scenario in the target client;

[0148] The fourth determination module is configured to determine the target device of the scenario model for providing the local scenario indicated by the target scenario information for the target client according to the target scenario information;

[0149] The loading module is configured to obtain and load the scenario model corresponding to the local scenario from the target device.

[0150] Optionally, model cache information is stored in the server, and the model cache information is used to indicate the clients that have cached the scenario model and the scenario information of the scenario model cached by the clients;

[0151] The apparatus 300 determines the target device through the following modules:

[0152] A fifth determination sub-module, configured to determine whether there is an alternative client in the model cache information stored in the server that can match the target scenario information;

[0153] A sixth determination sub-module, configured to, when it is determined that there is the alternative client, determine one of the alternative clients as the target device.

[0154] Optionally, the sixth determination sub-module includes:

[0155] A seventh determination sub-module, configured to respectively determine the network distance between each of the alternative clients and the target client;

[0156] An eighth determination sub-module, configured to determine the alternative client with the smallest network distance as the target device.

[0157] Optionally, the fifth determination module further includes:

[0158] A ninth determination sub-module, configured to, when it is determined that there is no such alternative client, determine the server as the target device.

[0159] Regarding the apparatus in the above embodiments, the specific manners in which each module performs operations have been described in detail in the embodiments related to the method, and will not be elaborated herein.

[0160] Figure 4 is a block diagram of an electronic device 700 shown according to an exemplary embodiment. As Figure 4 shown, the electronic device 700 may include: a processor 701, a memory 702. The electronic device 700 may further include one or more of a multimedia component 703, an input / output (I / O) interface 704, and a communication component 705.

[0161] Among them, the processor 701 is used to control the overall operation of the electronic device 700 to complete all or part of the steps in the above-mentioned method for processing cached data. The memory 702 is used to store various types of data to support the operation of the electronic device 700. These data may include, for example, instructions for any application or method operating on the electronic device 700, as well as application-related data, such as contact data, received and sent messages, pictures, audio, video, and so on. The memory 702 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic memory, flash memory, a magnetic disk, or an optical disc. The multimedia component 703 may include a screen and an audio component. The screen may be a touch screen, for example, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may be further stored in the memory 702 or sent through the communication component 705. The audio component also includes at least one speaker for outputting audio signals. The I / O interface 704 provides an interface between the processor 701 and other interface modules, and the other interface modules may be a keyboard, a mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 705 is used for wired or wireless communication between the electronic device 700 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, 4G, NB-IoT, eMTC, or other 5G, etc., or a combination of one or more of them is not limited herein. Therefore, the corresponding communication component 705 may include: a Wi-Fi module, a Bluetooth module, an NFC module, and so on.

[0162] In an exemplary embodiment, the electronic device 700 can be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components, and is used to execute the above-mentioned method for processing cached data.

[0163] In another exemplary embodiment, there is also provided a computer-readable storage medium including program instructions, and when the program instructions are executed by a processor, the steps of the above-mentioned method for processing cached data are implemented. For example, the computer-readable storage medium can be the above-mentioned memory 702 including program instructions, and the above-mentioned program instructions can be executed by the processor 701 of the electronic device 700 to complete the above-mentioned method for processing cached data.

[0164] In another exemplary embodiment, there is also provided a computer program product, which includes a computer program capable of being executed by a programmable device, and the computer program has a code part for executing the above-mentioned method for processing cached data when executed by the programmable device.

[0165] The preferred embodiments of the present disclosure have been described in detail above with reference to the accompanying drawings. However, the present disclosure is not limited to the specific details in the above embodiments. Within the scope of the technical concept of the present disclosure, various simple modifications can be made to the technical solutions of the present disclosure, and these simple modifications all fall within the protection scope of the present disclosure.

[0166] In addition, it should be noted that, among the various specific technical features described in the above specific embodiments, they can be combined in any suitable manner without conflict. To avoid unnecessary repetition, the present disclosure will not separately describe various possible combination manners.

[0167] Furthermore, any combination can be made among various different embodiments of the present disclosure as long as it does not violate the idea of the present disclosure, and it should also be regarded as the content disclosed by the present disclosure.

Claims

1. A method for processing cached data, characterized in that, The method includes: Determining whether the storage space occupied by the target scene model cached by the target client is greater than a preset storage space threshold, where multiple scene models for reconstructing the target scene are stored in the server, and each of the scene models is used to reconstruct a part of the target scene, and the target scene model is the scene model obtained by the target client from the server or other clients; If the storage space is greater than the storage space threshold, determining the importance of each of the target scene models, where the importance is used to reflect the degree of future demand for the target scene model; The determining the importance of each of the target scene models includes: For each of the target scene models, performing the following operations: Determining, among the clients that are associated with the target scene and can establish communication with the target client, the clients that do not store the target scene model as the associated clients of the target scene model; Respectively determining the relative distance between the position corresponding to the camera in each of the associated clients of the target scene model in the target scene and the position corresponding to the target scene model in the target scene; Determining the network distance between the target client and each of the associated clients of the target scene model; Determining the importance of the target scene model according to each of the network distances and each of the relative distances corresponding to the target scene model; Deleting at least one target scene model from the target client according to the importance of the target scene model.

2. The method according to claim 1, characterized in that, Determine the importance of the m th target scenario model through the following formula : Among them, n For the m The total number of clients associated with the target scene model, For the m The target scene model i The network distance between the associated clients and the target client, For the m The target scene model i The corresponding position of the camera in the associated client in the target scene is m The relative distance between the positions corresponding to the target scene models in the target scene, is the first adjustment coefficient, is the second adjustment coefficient.

3. The method according to claim 1, characterized in that, The method further includes: Determining the target scene information of the local scene to be loaded into the target client according to the movement information of the camera in the target scene in the target client; Determining the target device of the scene model for providing the local scene indicated by the target scene information for the target client according to the target scene information; Obtaining and loading the scene model corresponding to the local scene from the target device.

4. The method according to claim 3, characterized in that, Model cache information is stored in the server, and the model cache information is used to indicate the clients that have cached the scene model and the scene information of the scene model cached by the client; The target device is determined by the following method: Determining whether there is an alternative client in the model cache information stored in the server that can match the target scene information; In the case of determining that there is an alternative client, determining one of the alternative clients as the target device.

5. The method according to claim 4, characterized in that, The determining one of the alternative clients as the target device includes: Respectively determining the network distance between each of the alternative clients and the target client; Determining the alternative client with the smallest network distance as the target device.

6. The method according to claim 4, characterized in that, The target device is further determined by the following method: In the case of determining that there is no alternative client, determining the server as the target device.

7. A device for processing cached data, characterized in that, The apparatus includes: A first determination module, configured to determine whether the storage space occupied by the target scene model cached by the target client is greater than a preset storage space threshold. Multiple scene models for reconstructing the target scene are stored in the server, and each of the scene models is used to reconstruct a part of the target scene. The target scene model is the scene model obtained by the target client from the server or other clients. A second determination module, configured to, if the storage space is greater than the storage space threshold, determine the importance of each of the target scene models, where the importance is used to reflect the degree of future demand for the target scene model; determine, among the clients that are associated with the target scene and can establish communication with the target client, the clients that do not store the target scene model as the associated clients of the target scene model; respectively determine the relative distance between the position corresponding to the camera in each of the associated clients of the target scene model in the target scene and the position corresponding to the target scene model in the target scene; determine the network distance between the target client and each of the associated clients of the target scene model; and determine the importance of the target scene model according to each of the network distances and each of the relative distances corresponding to the target scene model. A deletion module, configured to delete at least one target scene model from the target client according to the importance of the target scene model.

8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by a processor, the steps of the method according to any one of claims 1-6 are implemented.

9. An electronic device, characterized in that, Including: A memory, on which a computer program is stored; A processor, configured to execute the computer program in the memory to implement the steps of the method according to any one of claims 1-6.

Citation Information

Patent Citations

  • Wireless terminal apparatus for initial operationtiming minimum, it's cache method

    KR1020060070203A