Data loading method and device, electronic equipment, storage medium and product

By obtaining and parsing loading data in real time on the client, evaluating and dynamically adjusting the data loading strategy, the problem of low data loading efficiency caused by the changing network environment in the existing technology is solved, and more efficient data loading performance is achieved.

CN119166229APending Publication Date: 2024-12-20MASHANG CONSUMER FINANCE CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410978175.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-19
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

In the prior art, when the client requests the server to pull resource data, the changing network environment leads to a reduced data loading efficiency and cannot meet the needs.

Method used

During the operation of the target application, the loading data is obtained and parsed in real time, the loading performance is evaluated, the matching data loading strategy is determined, the loading strategy is dynamically adjusted to adapt to environmental changes, and the flexibility and performance of data loading are improved.

Benefits of technology

Through real-time analysis and dynamic adjustment of data loading strategies, the flexibility and adaptability of data loading are improved, and the environment changes are quickly responded to real-time optimization of loading performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119166229A_ABST
    Figure CN119166229A_ABST
Patent Text Reader

Abstract

The invention provides a data loading method and device, electronic equipment, a storage medium and a product, and the method comprises the steps: obtaining first loading data of a target application in a running process of the target application; analyzing the first loading data to obtain evaluation information of the loading performance of the target application; determining a first data loading strategy matched with the evaluation information; and loading the data requested by the data loading request of the target application based on the first data loading strategy, thereby dynamically adjusting the data loading strategy according to real-time data analysis, and improving the loading performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a data loading method, device, electronic device, storage medium and product. Background Art

[0002] When entering a page in the client, the client needs to request to pull resource data from the server. In related technologies, resource data is mainly pulled based on fixed resource loading rules that are statically configured in advance. However, network environments and other conditions are usually changeable. Using this method may not meet the needs and reduce data loading efficiency. Summary of the invention

[0003] The present disclosure provides a data loading method, device, electronic device, storage medium and product.

[0004] In a first aspect, the present disclosure provides a data loading method, the data loading method comprising:

[0005] During the running of the target application, obtaining first loading data of the target application;

[0006] parsing the first loading data to obtain evaluation information of the loading performance of the target application;

[0007] Determine a first data loading strategy that matches the evaluation information;

[0008] Based on the first data loading strategy, the data requested by the data loading request of the target application is loaded.

[0009] In a second aspect, the present disclosure provides a data loading device, the data loading device comprising:

[0010] An acquisition module, used for acquiring first loading data of the target application during the running of the target application;

[0011] A parsing module, used for parsing the first loading data to obtain evaluation information of the loading performance of the target application;

[0012] A determination module, used to determine a first data loading strategy that matches the evaluation information;

[0013] A processing module is used to load the data requested by the data loading request of the target application based on the first data loading strategy.

[0014] In a third aspect, the present disclosure provides an electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores one or more computer programs executable by the at least one processor, and one or more of the computer programs are executed by the at least one processor so that the at least one processor can execute the above-mentioned data loading method.

[0015] In a fourth aspect, the present disclosure provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the above-mentioned data loading method when executed by a processor.

[0016] In a fifth aspect, the present disclosure provides a computer program product, including a computer-readable code, or a non-volatile computer-readable storage medium carrying a computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above-mentioned data loading method.

[0017] The data loading method provided by the embodiment of the present disclosure can obtain the first loading data of the target application in real time during the operation of the target application, and perform data analysis on the first loading data, so as to timely determine the loading performance of the target application, obtain evaluation information of the loading performance of the target application, and then determine the first data loading strategy that matches the evaluation information, and perform data loading based on the first data loading strategy. In this way, since the first data loading strategy is determined in real time according to the first loading data of the target application, it is possible to use a loading strategy that is more targeted to the loading performance of the target application, which is more in line with the current loading environment requirements of the target application, thereby improving the flexibility of data loading and the loading performance.

[0018] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The accompanying drawings are used to provide a further understanding of the present disclosure and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the present disclosure and do not constitute a limitation of the present disclosure. The above and other features and advantages will become more apparent to those skilled in the art by describing detailed example embodiments with reference to the accompanying drawings, in which:

[0020] Figure 1 A schematic diagram of an application scenario provided by an embodiment of the present disclosure;

[0021] Figure 2 A flowchart of a data loading method provided in an embodiment of the present disclosure;

[0022] Figure 3 A schematic diagram of the implementation logic of a data loading method provided in an embodiment of the present disclosure;

[0023] Figure 4 A block diagram of a data loading device provided in an embodiment of the present disclosure;

[0024] Figure 5 A block diagram of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0025] In order to enable those skilled in the art to better understand the technical solutions of the present disclosure, the exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0026] In the absence of conflict, the various embodiments of the present disclosure and the various features therein may be combined with each other.

[0027] As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.

[0028] The terms used herein are only used to describe specific embodiments and are not intended to limit the present disclosure. As used herein, the singular forms "a" and "the" are also intended to include plural forms, unless the context clearly indicates otherwise. It will also be understood that when the terms "including" and / or "made of" are used in this specification, the presence of the features, wholes, steps, operations, elements and / or components is specified, but the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof is not excluded. "Connected" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect.

[0029] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and the present disclosure, and will not be interpreted as having an idealized or overly formal meaning unless explicitly defined as such herein.

[0030] In the technical solution disclosed in this disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals. The use of user data in this technical solution complies with relevant national laws and regulations (for example, the "Information Security Technology Personal Information Security Specification", etc.). For example: corresponding prescribed measures are taken for personal information access control; prescribed restrictions are imposed on the display of personal information; the purpose of using personal information does not exceed the scope of direct or reasonable association; when using personal information, clear identity orientation is eliminated to avoid precise positioning of specific individuals.

[0031] When entering a page in the client, the client needs to request to pull resource data from the server. In related technologies, resource data is mainly pulled according to fixed resource loading rules that are statically configured in advance. However, the network environment and other conditions are usually changeable, and using this method may not meet the needs, resulting in reduced loading efficiency.

[0032] Therefore, a data loading method is provided in an embodiment of the present disclosure. During the operation of the target application, the first loading data of the target application can be monitored in real time, the loading performance of the target application can be timely known, and a first data loading strategy that matches the loading performance can be determined, so that data loading can be performed based on the first data loading strategy, thereby improving flexibility and adaptability, and being able to provide a more targeted data loading strategy, thereby being able to quickly respond to environmental changes and demands of the target application and achieve instant optimization of loading performance.

[0033] Figure 1 The application scenario diagram of the data loading method and device provided by the embodiment of the present disclosure is schematically shown.

[0034] like Figure 1 As shown, the application scenario of the embodiment of the present disclosure may include a terminal device 101, a network 103 and a server 102. The network 103 is used to provide a medium for a communication link between the terminal device 101 and the server 102. The network 103 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0035] The user can use the terminal device 101 to interact with the server 102 through the network 103 to receive or send messages, etc. Various communication client applications can be installed on the terminal device 101, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).

[0036] The terminal device 101 may be any electronic device having a display screen and supporting web browsing, including but not limited to a smart phone, a tablet computer, a laptop computer, a desktop computer, and the like.

[0037] The server 102 may be a server that provides various services, such as a background management server (only as an example) that provides support for websites browsed by users using the terminal device 101. The background management server may analyze and process received data such as user requests, and feed back processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.

[0038] It should be noted that the data loading method and apparatus provided in the embodiments of the present disclosure can be executed by the terminal device 101. Accordingly, the data loading method and apparatus provided in the embodiments of the present disclosure can be set in the terminal device 101. The data loading method and apparatus provided in the embodiments of the present disclosure can also be executed by a terminal device or a terminal device cluster that is different from the terminal device 101 and can communicate with the terminal device 101 and / or the server 102. Accordingly, the data loading method and apparatus provided in the embodiments of the present disclosure can also be set in a terminal device or a terminal device cluster that is different from the terminal device 101 and can communicate with the terminal device 101 and / or the server 102.

[0039] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0040] The data loading method in the embodiment of the present disclosure is described below by taking the execution subject as a terminal device as an example. Figure 2 A flowchart of a data loading method provided in an embodiment of the present disclosure, referring to Figure 2 , the method comprising:

[0041] S201: Acquire first loading data of the target application during the running of the target application.

[0042] For the front-end resource data loading scenario, in the related technology, usually the relevant personnel optimize the application based on experience before the application is released, and deploy the set optimization strategy in the application. After the deployment and release, no matter what the specific usage environment is, the optimization strategy is fixed, but it may not meet the environmental changes and needs during actual use, which reduces the application loading performance. In the embodiment of the present disclosure, it is mainly possible to perform real-time loading performance analysis during the operation of the application, and dynamically determine the data loading strategy according to the actual situation, which is more in line with the actual usage environment and can provide a more suitable data loading strategy according to the specific application environment.

[0043] In the embodiments of the present disclosure, there is no restriction on the target application, which can be any application installed in the terminal device. After the user starts the target application, the target application runs, and the user requests to obtain the page resources, data, etc. of the target application through interactive operations. During the running process, the first loading data of the target application can be obtained in real time, wherein the first loading data can include network environment information, user behavior information, operating system environment information, data loading information, etc. For example, the network environment information includes network speed, network stability, network request delay, etc., the user behavior information includes the user's content consumption characteristics, interaction time, the number of times or duration of using the target application, etc., the operating system environment information includes system memory, processor performance, etc., the data loading information includes loading time, number of loading requests, etc., which are not restricted in the embodiments of the present disclosure.

[0044] Among them, for the method of obtaining the first loading data, the present disclosure provides a possible implementation method, which uses the event listening interface or custom event system provided by the browser to obtain the first loading data of the target application, and can use an asynchronous mechanism to ensure that the listening event does not block the main thread, thereby reducing the impact on other key threads.

[0045] S202: Analyze the first loading data to obtain evaluation information of the loading performance of the target application.

[0046] In the disclosed embodiment, the evaluation information refers to performance analysis and assessment information for loading performance, which can characterize the performance of the target application during operation.

[0047] In a possible embodiment, for step S202, it includes: parsing the first loading data according to a preset performance evaluation indicator to obtain the value of the performance evaluation indicator, and obtaining evaluation information of the loading performance of the target application according to a set threshold or judgment condition corresponding to the performance evaluation indicator and the value of the performance evaluation indicator obtained by parsing.

[0048] Among them, performance evaluation indicators may include page loading time, network speed, response time, etc., and the evaluation information obtained may be, for example, that the page loading time exceeds x seconds, and the loading time is long. For example, the evaluation information may be that the network speed is lower than the set speed threshold, and the network speed is slow.

[0049] Furthermore, in the embodiments of the present disclosure, the set threshold or judgment condition corresponding to the performance evaluation indicator can also be dynamically adjusted. When it is determined that the set threshold corresponding to the performance evaluation indicator needs to be adjusted based on the first loaded data, the adjusted threshold corresponding to the performance evaluation indicator can be determined.

[0050] For example, by parsing the first loaded data, it is found that the target application has been parsed for n consecutive times or the network speed has been less than the set speed threshold for a continuous period of time, then it is determined that the set speed threshold corresponding to the network speed needs to be adjusted and the set speed threshold needs to be lowered. For example, according to the preset adjustment step size, the adjusted threshold value can be determined to be the difference between the set speed threshold and the adjustment step size.

[0051] S203: Determine a first data loading strategy that matches the evaluation information.

[0052] Among them, the first data loading strategy is used to indicate the loading processing of the data requested by the data loading request of the target application. In a possible embodiment of the present disclosure, a mapping relationship between multiple evaluation information of different loading performances and data loading strategies can be pre-configured, and then the first data loading strategy matching the evaluation information can be determined based on the evaluation information currently parsed and the mapping relationship.

[0053] For example, if the evaluation information is that the page loading time exceeds x seconds, the first data loading strategy matched may be to reduce the resolution of the loaded image, etc.

[0054] Furthermore, in another possible embodiment of the present disclosure, it is also possible to support dynamic adjustment of data loading strategies. For example, the pre-configured evaluation information is that the page loading time exceeds the time threshold, and the corresponding data loading strategy with a mapping relationship is that for files with a size exceeding 500K, the file is divided into multiple sub-files for loading. Then, during the operation of the target application, according to the acquired real-time first loading data, it is also possible to further determine whether the evaluation information of the loading performance meets the adjustment condition. For example, the adjustment condition is that the page loading time has exceeded the time threshold for n consecutive times or for a continuous period of time. At this time, if it is determined that the adjustment condition is met, the data loading strategy corresponding to the evaluation information can also be adjusted. For example, the adjusted data loading strategy is that for files with a size exceeding 300K, the file is divided into multiple sub-files for loading. In this way, when the evaluation information of the loading performance has been in a certain state, the matching data loading strategy can be further adjusted, which can further optimize the loading performance and better meet the current loading environment requirements, and the adjusted data loading strategy can also be reported to the server so that it can be updated synchronously in the server.

[0055] S204: Loading the data requested by the data loading request of the target application based on the first data loading strategy.

[0056] Furthermore, after executing the first data loading strategy in the embodiment of the present disclosure, corresponding log information can also be recorded so that the actual effect of the loading performance optimization can be tracked when debugging or analysis is needed. This can help with monitoring and maintenance, and implement the rollback operation of the data loading strategy to ensure that it can roll back to the previous state in the event of problems or performance degradation.

[0057] In addition, the result data after executing the first data loading strategy can also be fed back to relevant personnel or a monitoring system. Specifically, the present disclosure provides a possible implementation method. Based on the first data loading strategy, after loading the data requested by the data loading request of the target application, it also includes: obtaining the second loading data of the target application; reporting the second loading data, and the second loading data is used to update the first data loading strategy.

[0058] The method of reporting the second loading data may be implemented, for example, through message push, web page full-duplex communication (WebSocket) and other technologies, and is not limited.

[0059] In addition, in the embodiments of the present disclosure, the implementation method of updating the first data loading strategy based on the second loading data may specifically include: comparing the second loading data with the first loading data to obtain a comparison result, and determining whether the comparison result meets the optimization requirements. When it is determined that the comparison result does not meet the optimization requirements, adjusting the first data loading strategy, for example, reconfiguring a new data loading strategy, or adjusting the adjustable parameter values ​​included in the first data loading strategy.

[0060] In this way, the execution result of the first data loading strategy is fed back in real time, the optimization effect of the first data loading strategy can be understood in time, and a performance report can be generated to show to relevant personnel, which can facilitate further adjustment of the first data loading strategy to improve effectiveness and flexibility.

[0061] In the disclosed embodiment, during the operation of the target application, the first loading data of the target application is obtained, the first loading data is parsed, evaluation information of the loading performance of the target application is obtained, and a first data loading strategy matching the evaluation information is determined, and then loading processing can be performed based on the first data loading strategy. In this way, a matching first data loading strategy can be dynamically determined based on real-time first loading data, so as to better meet different loading environment requirements, provide a more suitable first data loading strategy, quickly respond to environmental changes, improve the loading performance optimization effect, and achieve instant optimization of loading performance.

[0062] In some possible embodiments, the data loading method in the embodiments of the present disclosure can be implemented based on a configurable rule engine. Specifically, a configurable rule engine can be introduced in the embodiments of the present disclosure. The rule engine is used to determine the evaluation information and the data loading strategy. The rule engine is configured with multiple evaluation information and corresponding data loading strategies. The rule engine can be understood as a configurable tool that allows relevant personnel to configure various rules based on the rule engine, which is flexible and supports dynamic adjustment of the rules, so that the data loading strategy can be efficiently adapted according to the specific application scenarios and user needs.

[0063] Among them, in a possible embodiment, a rule engine with a plug-in architecture can be used for configuration, and each evaluation information and corresponding data loading strategy corresponds to a plug-in.

[0064] In this way, by adopting a plug-in architecture, an evaluation information and the corresponding data loading strategy can be understood as a rule, and each rule is an independent plug-in, which makes it easier to add, modify or delete rules without having to have an in-depth understanding of the underlying rule engine structure, thereby improving the scalability and flexibility of the rule engine. In addition, the language and expression used can be configured, so that relevant personnel can describe and configure the rules more clearly.

[0065] It can also provide a visual configuration interface for the rule engine to improve the intuitiveness and simplicity of configuration, and establish a two-way binding between the visual configuration interface and the rule engine so that changes in configuration information in the visual configuration interface can be reflected in the rule engine in a timely manner, thus achieving synchronization with the rule engine.

[0066] After the rule engine configuration is completed, it can be loaded into the target application for use. The present disclosure provides a possible implementation method, in which the first data loading strategy is based on the rule engine configuration and is loaded locally by loading the rule engine when the target application is initialized.

[0067] Among them, the target application is initialized, for example, when the target application is started, or when it is installed or updated, etc. Thus, in the embodiment of the present disclosure, a configurable rule engine is introduced, and when the target application is initialized, the rule engine is pulled and loaded from the server, and then during the operation of the target application, based on the rule engine, the evaluation information of the loading performance corresponding to the first loading data and the matching first data loading strategy can be dynamically determined.

[0068] In the disclosed embodiment, during the operation of the target application, the first loaded data obtained may be preprocessed to standardize the data format, and then the preprocessed first loaded data may be encapsulated into an object or data structure, and sent to the rule engine, which may be parsed and obtain the evaluation information of the loading performance of the target application. For example, for the first loaded data involving numbers, a standard unit may be set, such as the size of the loaded file, which needs to be converted into a standard unit, to ensure the consistency of the data in the rule engine and improve the processing efficiency and accuracy.

[0069] In addition, in the embodiments of the present disclosure, the first data loading strategy that matches the evaluation information can be determined through the event monitoring mechanism of the rule engine. For example, the first data loading strategy returned by the rule engine can be obtained, and the corresponding loading operation can be performed according to the first data loading strategy. For example, if the returned first data loading strategy is a code splitting strategy, the code splitting operation can be performed. If the returned first data loading strategy is asynchronous loading, the asynchronous processing logic can be executed. For example, if the returned first data loading strategy is that an operation must wait for a specific resource to be loaded before execution, the operation can be performed after the resource is loaded.

[0070] In addition, in an embodiment of the present disclosure, user optimization suggestion feedback can also be supported. Specifically, the present disclosure provides a possible implementation method, in response to first optimization suggestion information input for a first data loading strategy, the first optimization suggestion information is reported to a server, and the first optimization suggestion information is used to indicate an update of the first data loading strategy.

[0071] For example, the first optimization suggestion information may include providing loading prompts such as progress bars or animations during the data loading process to improve the user's waiting experience; considering using local data preprocessing and caching strategies to reduce real-time loading pressure, etc.; preloading can be performed before the request; big data can be loaded in blocks, and data blocks can be loaded gradually to reduce the amount of data loaded at one time, etc.

[0072] These first optimization suggestion information can then be reported to the server, and the first optimization suggestion information can be analyzed or processed by relevant personnel to update or reconfigure the data loading strategy.

[0073] That is to say, in the embodiment of the present disclosure, the user can input the required first optimization suggestion information according to the needs and usage, and can report the optimization suggestion information to the server or relevant personnel to continuously improve and adjust the data loading strategy.

[0074] In another possible implementation of the present disclosure, in response to second optimization suggestion information input for the first data loading strategy, the first data loading strategy is updated according to the second optimization suggestion information.

[0075] In the embodiment of the present disclosure, the terminal device can also adjust the personalized data loading strategy based on the second optimization suggestion information, so that a more personalized data loading strategy can be provided for the user. The second optimization suggestion information in this step is similar to the first optimization suggestion information described above, and the user can input it according to the needs, which is not limited in the embodiment of the present disclosure.

[0076] Furthermore, in a possible embodiment, the present disclosure can also periodically determine the rule engine version information during the operation of the target application so as to be able to perceive changes in the configuration information of the rule engine. Specifically, a possible implementation method is provided, which obtains the first version information of the first data loading strategy loaded locally, and obtains the second version information corresponding to the first data loading strategy from the server; when the first version information and the second version information are different, obtains the second data loading strategy corresponding to the second version information from the server, and updates the first data loading strategy based on the second data loading strategy.

[0077] In this way, it is possible to regularly determine whether the version of the rule engine is updated, obtain the latest evaluation information and data loading strategy configuration in a timely manner, and further improve optimization performance.

[0078] The following uses a specific application scenario to illustrate the data loading method in the embodiment of the present disclosure based on the rule engine as an example. Figure 3 As shown, it is a schematic diagram of the implementation logic of the data loading method in the embodiment of the present disclosure, such as Figure 3 As shown, it can be divided into the following two aspects for explanation, specifically:

[0079] The first aspect: configuration of the rule engine.

[0080] 1) Introduce a rule engine.

[0081] For example, a rule engine library may be installed so that a rule engine may be created and used based on the rule engine library.

[0082] 2) Create a rule engine module.

[0083] In the disclosed embodiment, a rule engine module can be created based on the introduced rule engine library to initialize and manage evaluation information and data loading strategies, specifically including: constructing an instance of the rule engine and initializing the instance, such as initializing the basic configuration information of the rule engine to facilitate the subsequent addition of the data loading strategy corresponding to the mapping of evaluation information; creating an external interface for the rule engine module so that other modules or applications can more conveniently introduce and use the rule engine, and can also export the configured instance so that other applications can use it directly; configuring the rule engine, such as configuring the execution order of the rules, the maximum number of executions allowed, etc., to better control the behavior of the rule engine; and implementing an error handling mechanism to correctly handle possible problems when the rule engine is running, and configuring a logging function to facilitate tracking and handling of problems or execution conditions of the rule engine.

[0084] 3) Configure rules based on the rule engine.

[0085] Among them, the rules include evaluation information and corresponding mapped data loading strategies, which can be configured in JSON format, for example, without limitation, and specifically can include: configuring evaluation information corresponding to set parameter thresholds, such as page loading time exceeding a first time threshold, network request delay time exceeding a second time threshold, etc.; and configuring corresponding data loading strategies for the configured evaluation information, for example, data loading strategies include executing pre-data loading, delaying loading of a component, reducing the resolution of image loading, etc.

[0086] Among them, in the embodiment of the present disclosure, the setting parameter threshold can be set to be adjustable, so that it can be more flexibly applied to different application scenarios, and during configuration, different rules can adopt consistent naming and structure, which can improve readability and subsequent maintainability, and corresponding instruction documents can be provided for each rule to explain the function, trigger conditions, optimized execution operations and other information of the rule.

[0087] In this way, in the embodiments of the present disclosure, the configuration of the data loading strategy can be flexibly and conveniently implemented through the rule engine.

[0088] The second aspect: front-end data loading.

[0089] 1) Target application initialization.

[0090] In the embodiment of the present disclosure, during the initialization phase of the front-end target application, in response to the initialization, the rule engine is loaded to introduce the configured rule engine into the target application.

[0091] 2) Obtain the first loading data.

[0092] Specifically, during the operation of the target application, the first loading data of the target application can be obtained through a detection tool, wherein the first loading data can be, for example, page loading time, network speed, response time, etc., which is not limited in the embodiments of the present disclosure.

[0093] 3) Send the first loaded data to the rule engine.

[0094] 4) Execute the rules engine.

[0095] Specifically, the first loading data is parsed through the rule engine to obtain evaluation information of the loading performance of the target application.

[0096] 5) Determine the first data loading strategy.

[0097] Specifically, through the rule engine, the first data loading strategy that matches the evaluation information is determined, and then the first data loading strategy can be executed to load the data requested by the data loading request of the target application. Relevant log information of the execution of the first data loading strategy can also be recorded to facilitate tracking, monitoring and maintenance.

[0098] In this way, in the embodiment of the present disclosure, a configurable rule engine is introduced, which can dynamically determine the matching first data loading strategy based on the real-time first loading data to adapt to different loading environment requirements, making performance optimization more flexible and intelligent and providing a better user experience.

[0099] Based on the above embodiments, the data loading method in the embodiments of the present disclosure can also be briefly described from the following parts, including a configurable rule engine, a graphical user interface (GUI) for user configuration, evaluation information and data loading strategies, intelligent loading and caching strategies, and loading performance monitoring and feedback mechanisms.

[0100] 1) Configurable rules engine.

[0101] In the embodiments of the present disclosure, the rule engine may include the following designs: (1) Define the rule language: For example, use preset syntax and structure to describe evaluation information and data loading strategies, which is easy to parse and process. (2) Plug-in architecture: A rule engine with a plug-in architecture can be used, and each rule is an independent plug-in, which improves configuration flexibility and efficiency and can be more convenient for dynamic loading or unloading of rules, wherein each rule includes evaluation information and data loading strategies. (3) Dynamic rule loading and execution: Dynamic script loading technology and functions for executing rules can be used to enable rules to take effect immediately and execute in real time at runtime. (4) Event monitoring mechanism: The event monitoring interface or custom event system provided by the browser can be used to obtain the loading data of the application, and it can be obtained through an asynchronous mechanism so as not to affect the main thread and ensure efficient response of performance. (5) Rule engine state management: It is mainly used for the consistency and real-time nature of the rules. A state management mechanism can be used to update and obtain the latest configuration information of the rule engine in real time.

[0102] 2) Graphical user interface for user configuration.

[0103] In the disclosed embodiments, a graphical user interface for configuration can be provided to relevant personnel, through which they can browse, add, edit or delete rules, etc., and through the two-way binding of the interface and the rule engine, synchronization between operations in the interface and the rule engine can be achieved, thereby improving configuration efficiency and accuracy.

[0104] 3) Evaluation information and data loading strategies.

[0105] In the disclosed embodiment, the evaluation information and data loading strategy are configured based on the rule engine, so that the rule engine can be loaded when the application is initially applied, and during the application operation, the current evaluation information can be parsed in real time to obtain the matching data loading strategy.

[0106] Furthermore, in the disclosed embodiment, it is also possible to dynamically determine whether the rule engine is updated, and to load the latest data loading strategy in a timely manner, thereby improving optimization accuracy.

[0107] 4) Intelligent loading and caching strategy.

[0108] In the disclosed embodiments, a front-end cache strategy is also provided. For example, a page service worker (Service Worker) thread or a browser cache interface can be used to perform cache management of resource data. The cache strategy can be configured through a rule engine, which can improve cache management efficiency, reduce the number of requests to the server, and increase loading speed.

[0109] It should be noted that, in the embodiments of the present disclosure, the specific contents of the data loading strategy and the cache strategy are not limited and can be configured according to requirements and actual conditions. Specifically, the present disclosure provides several possible implementation methods:

[0110] Load resource data on demand: For example, using techniques such as asynchronous loading, deferred loading, or lazy loading, resources can be loaded only when needed, which can reduce resource overhead during the initial loading of the page and increase page loading speed.

[0111] Preload key resource data: You can pre-configure key resource types, such as images, keywords, etc., and then preload key resources, so that you can obtain these resources faster when you actually need them.

[0112] Browser cache strategy: By utilizing the browser cache mechanism and setting appropriate cache headers, static resources can be cached by the front end, reducing repeated downloads, alleviating server burden, and increasing loading speed.

[0113] Service Worker caching strategy: Use Service Worker technology to control cache through scripts, implement offline caching or other caching strategies, and improve cache control performance.

[0114] Cache version control: For example, you can add a version number or hash value to the resource, and then use the version number or hash value to determine whether the cache is expired or updated, so that you can get the latest resource data in time.

[0115] Distributed loading strategy: For example, you can use technologies such as Content Delivery Network (CDN) to distribute static resources on different servers, which can increase resource loading speed and reduce latency.

[0116] Asynchronous loading of non-critical resources strategy: Non-critical resources can be marked as asynchronously loaded to avoid blocking the main process, improving loading performance and user experience.

[0117] Resource merging and compression strategy: For example, you can merge multiple small files requested into one, compress the file, and send it to the front end. This can reduce the number of network requests, reduce bandwidth consumption, and increase loading speed.

[0118] Of course, the embodiments of the present disclosure are not limited to the above-mentioned data loading strategies and cache strategies, and can be configured according to actual needs and can also be dynamically adjusted.

[0119] 5) Loading performance monitoring and feedback mechanism.

[0120] In the disclosed embodiments, during the operation of the application, a front-end performance monitoring mechanism may be used to send relevant data to the server through tracking and asynchronous reporting. For example, the relevant data may be the loading data of the application, the loading performance change data after executing the optimization strategy, the data on errors, etc. The server may then analyze and process the relevant data sent to generate a loading performance report, which may also be displayed to relevant personnel, thereby helping the relevant personnel to promptly discover and understand the loading performance situation, and to make further optimizations and adjustments.

[0121] In addition, in the disclosed embodiment, a user feedback module may be configured to support users to input loading performance issues or optimization suggestion information, etc., to improve user experience and further improve the accuracy of data loading strategies.

[0122] In this way, in the embodiment of the present disclosure, by introducing a configurable rule engine, relevant personnel can configure rules more intuitively through the interface, and determine matching data loading strategies based on the loading data of the application that changes in real time, which can improve loading performance in a targeted manner and enhance performance optimization effects.

[0123] It can be understood that the above-mentioned various method embodiments mentioned in the present disclosure can be combined with each other to form a combined embodiment without violating the principle logic. Due to space limitations, the present disclosure will not repeat them. It can be understood by those skilled in the art that in the above-mentioned method of the specific implementation method, the specific execution order of each step should be determined according to its function and possible internal logic.

[0124] In addition, the present disclosure also provides a data loading device, an electronic device, and a computer-readable storage medium, all of which can be used to implement any data loading method provided by the present disclosure. The corresponding technical solutions and descriptions are referred to the corresponding records in the method part and will not be repeated here.

[0125] Figure 4 A block diagram of a data loading device provided in an embodiment of the present disclosure.

[0126] Reference Figure 4 , the present disclosure provides a data loading device, the data loading device comprising:

[0127] The acquisition module 41 is used to acquire the first loading data of the target application during the running of the target application;

[0128] A parsing module 42, configured to parse the first loading data to obtain evaluation information of the loading performance of the target application;

[0129] A determination module 43, used to determine a first data loading strategy that matches the evaluation information;

[0130] The processing module 44 is configured to load the data requested by the data loading request of the target application based on the first data loading strategy.

[0131] A possible embodiment further includes an updating module 45, which is used to:

[0132] Obtaining first version information of the first data loading strategy that has been loaded locally, and obtaining second version information corresponding to the first data loading strategy from a server;

[0133] In the case that the first version information and the second version information are different, a second data loading policy corresponding to the second version information is obtained from the server, and the first data loading policy is updated based on the second data loading policy.

[0134] In a possible embodiment, after loading the data requested by the data loading request of the target application based on the first data loading strategy, it also includes a reporting module 46 used to: obtain second loading data of the target application; report the second loading data, and the second loading data is used to update the first data loading strategy.

[0135] In a possible embodiment, the first feedback module 47 is further configured to:

[0136] In response to first optimization suggestion information input for the first data loading strategy, the first optimization suggestion information is reported to a server, where the first optimization suggestion information is used to indicate an update of the first data loading strategy.

[0137] A possible embodiment further includes: a second feedback module 48 is used to: respond to second optimization suggestion information input for the first data loading strategy, and update the first data loading strategy according to the second optimization suggestion information.

[0138] In a possible embodiment, the first data loading strategy is configured based on a rule engine, and is loaded locally by loading the rule engine when the target application is initialized.

[0139] Each module in the above data loading device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0140] Figure 5 A block diagram of an electronic device provided in an embodiment of the present disclosure.

[0141] Reference Figure 5An embodiment of the present disclosure provides an electronic device, which includes: at least one processor 501; at least one memory 502, and one or more I / O interfaces 503, connected between the processor 501 and the memory 502; wherein the memory 502 stores one or more computer programs that can be executed by the at least one processor 501, and the one or more computer programs are executed by the at least one processor 501 so that the at least one processor 501 can execute the above-mentioned data loading method.

[0142] Each module in the above electronic device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0143] The present disclosure also provides a computer-readable storage medium on which a computer program is stored, wherein the computer program implements the above-mentioned data loading method when executed by a processor. The computer-readable storage medium may be a volatile or non-volatile computer-readable storage medium.

[0144] The embodiment of the present disclosure also provides a computer program product, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above-mentioned data loading method.

[0145] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In a hardware implementation, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable storage medium, which may include a computer storage medium (or a non-transitory medium) and a communication medium (or a temporary medium).

[0146] As is known to those of ordinary skill in the art, the term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable program instructions, data structures, program modules or other data). Computer storage media include, but are not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), static random access memory (SRAM), flash memory or other memory technology, portable compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. In addition, it is known to those of ordinary skill in the art that communication media typically contain computer-readable program instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and may include any information delivery medium.

[0147] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.

[0148] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.

[0149] The computer program product described herein may be implemented in hardware, software, or a combination thereof. In one optional embodiment, the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (SDK), etc.

[0150] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.

[0151] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0152] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0153] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.

[0154] Example embodiments have been disclosed herein, and although specific terms are employed, they are used and should be interpreted only in a general illustrative sense and not for limiting purposes. In some instances, it will be apparent to those skilled in the art that, unless otherwise expressly noted, features, characteristics, and / or elements described in conjunction with a particular embodiment may be used alone or in combination with features, characteristics, and / or elements described in conjunction with other embodiments. Therefore, those skilled in the art will appreciate that various changes in form and detail may be made without departing from the scope of the present disclosure as set forth in the appended claims.

Claims

1. A data loading method, characterized in that: The method comprises: During the running of the target application, obtaining first loading data of the target application; parsing the first loading data to obtain evaluation information of the loading performance of the target application; Determine a first data loading strategy that matches the evaluation information; Based on the first data loading strategy, the data requested by the data loading request of the target application is loaded.

2. The data loading method according to claim 1, characterized in that: The method further comprises: Obtaining first version information of the first data loading strategy that has been loaded locally, and obtaining second version information corresponding to the first data loading strategy from a server; In the case that the first version information and the second version information are different, a second data loading policy corresponding to the second version information is obtained from the server, and the first data loading policy is updated based on the second data loading policy.

3. The data loading method according to claim 1 or 2, characterized in that: After loading the data requested by the data loading request of the target application based on the first data loading strategy, the method further includes: Acquire second loading data of the target application; The second loading data is reported, where the second loading data is used to update the first data loading strategy.

4. The data loading method according to claim 1, characterized in that: The method further comprises: In response to first optimization suggestion information input for the first data loading strategy, the first optimization suggestion information is reported to a server, where the first optimization suggestion information is used to indicate an update of the first data loading strategy.

5. The data loading method according to claim 1, characterized in that: The method further comprises: In response to second optimization suggestion information input for the first data loading strategy, the first data loading strategy is updated according to the second optimization suggestion information.

6. The data loading method according to claim 1, characterized in that: The first data loading strategy is configured based on a rule engine, and is loaded locally by loading the rule engine when the target application is initialized.

7. A data loading device, characterized in that: include: An acquisition module, used for acquiring first loading data of the target application during the running of the target application; A parsing module, used for parsing the first loading data to obtain evaluation information of the loading performance of the target application; A determination module, used to determine a first data loading strategy that matches the evaluation information; A processing module is used to load the data requested by the data loading request of the target application based on the first data loading strategy.

8. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores one or more computer programs executable by the at least one processor, and the one or more computer programs are executed by the at least one processor so that the at least one processor can perform the data loading method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the computer program implements the data loading method according to any one of claims 1 to 6.

10. A computer program product, characterized in that The invention comprises a computer-readable code or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the data loading method as described in any one of claims 1 to 6.

Citation Information

Cited By

  • Intelligent data processing method for public facility design

    CN121833085A