Data processing method and device, electronic equipment and storage medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-18
- Publication Date
- 2026-08-11
AI Technical Summary
[0003]相关技术中,在同一时刻对多个数据源发起访问请求以访问目标数据时,由于各个数据源的响应时间及数据量不同,在将数据通过前端页面进行展示时容易造成数据加载缓慢的问题,从而影响用户的使用体验
[0009]本申请一些实施例提供的技术方案带来的有益效果至少包括:本申请提供的数据处理方法通过获取在前端页面中用于在目标区域进行数据展示的多个业务接口数据源进行汇总,然后基于目标区域的数据显示阈值确定各个业务接口对应的数据比例,并将通过该数据比例得到的每个目标业务接口对应的响应数据量进行汇总,得到目标区域所需的目标数据集合并进行显示。由此,能够自动调整业务接口的响应数据量,从而优化数据响应速度以提高用户的使用体验。
Smart Images

Figure CN120705427B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computers, and more particularly to data processing methods, apparatus, electronic devices, and storage media. Background Technology
[0002] With the continuous development of computer technology, the functions of web pages are also constantly improving. When browsing web pages, users can view the corresponding data on the web pages according to their actual needs. For example, users can browse product lists in online shopping malls or browse articles in blogs.
[0003] In related technologies, when multiple data sources are accessed simultaneously to access target data, the different response times and data volumes of each data source can easily cause slow data loading when displaying the data on the front-end page, thus affecting the user experience. Summary of the Invention
[0004] This application provides a data processing method, apparatus, electronic device, and storage medium, which can improve the access speed of data in front-end pages.
[0005] Firstly, a data processing method is provided, including: Obtain at least two target business interfaces corresponding to the page collection, wherein the target business interfaces are used to obtain the business data required for displaying the page collection; Determine the amount of business data corresponding to at least two target business interfaces to obtain the total amount of business data required for the page set; Based on the total amount of business data, determine the proportion of business data for each target business interface within the total amount of business data; Based on the data ratio and the amount of response data required by the target page of the page set, the target data set is obtained and displayed through the target page.
[0006] Secondly, a data processing apparatus is provided, comprising: The acquisition module is used to acquire at least two target business interfaces corresponding to the page collection. The determination module is used to determine the amount of business data corresponding to at least two target business interfaces, and to obtain the total amount of business data required for the page set. The data proportion determination module is used to determine the proportion of business data for each target business interface in the total business data volume, based on the total business data volume. The target data set module is used to obtain a target data set based on the data ratio and the amount of response data required by the target page of the page set, and to display the target data set through the target page.
[0007] Thirdly, an electronic device is provided, comprising: Memory, used to store executable program code; A processor for calling and running the executable program code from the memory, causing the electronic device to perform the data processing method as described in any of the preceding claims.
[0008] Fourthly, a computer-readable storage medium is provided, the computer-readable storage medium storing a computer program that, when executed, implements the data processing method as described in any of the preceding claims.
[0009] The beneficial effects of the technical solutions provided in some embodiments of this application include at least the following: The data processing method provided in this application obtains and aggregates multiple business interface data sources used for data display in the target area on the front-end page, then determines the data ratio corresponding to each business interface based on the data display threshold of the target area, and aggregates the response data volume corresponding to each target business interface obtained through the data ratio to obtain the target dataset required for the target area and displays it. Therefore, the response data volume of the business interfaces can be automatically adjusted, thereby optimizing the data response speed and improving the user experience. Attached Figure Description
[0010] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0011] Figure 1 This is a schematic diagram of the first type of data processing method provided in the embodiments of this application.
[0012] Figure 2 This is a schematic diagram of the second type of data processing method provided in the embodiments of this application.
[0013] Figure 3 This is a schematic diagram of the third data processing method provided in the embodiments of this application.
[0014] Figure 4 This is a schematic diagram of the fourth data processing method provided in the embodiments of this application.
[0015] Figure 5 This is a fifth flowchart illustrating the data processing method provided in the embodiments of this application.
[0016] Figure 6 This is a schematic diagram of the structure of the data processing device provided in the embodiments of this application.
[0017] Figure 7 This is a schematic diagram of the first structure of the electronic device provided in the embodiments of this application.
[0018] Figure 8 This is a schematic diagram of a second structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0019] To make the features and advantages of this application more apparent and understandable, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0020] In the following description, when referring to the accompanying drawings, the same numbers in different drawings denote the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0021] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature.
[0022] In related technologies, when a target object needs to browse data on a front-end page, the browser will obtain data from multiple data sources at the same time and display the returned data on the front-end page without preprocessing. However, since the data volume of each data source interface is different and the response time of each data source interface is also different, it will cause the problem of slow data loading. In addition, if the unprocessed response data is displayed on the front-end page at the same time, it will cause page data chaos, which will seriously affect the user experience.
[0023] To address the aforementioned issues, this application provides a data processing solution. This solution involves obtaining at least two target business interfaces corresponding to a page set, determining the amount of business data corresponding to these interfaces, obtaining the total amount of business data required for the page set, determining the proportion of business data for each target business interface within the total business data, and finally, based on the proportion and the amount of response data required for the target page of the page set, obtaining the target data set and displaying it through the target page.
[0024] The selection method provided in this application will be described in detail below with reference to specific embodiments. It should be noted that the order of description of the following embodiments is not intended to limit the preferred order of the embodiments.
[0025] Please see Figure 1 , Figure 1 This is a schematic flowchart of the first embodiment of the data processing method provided in this application. The specific flow of the data processing method can be as follows: It should be noted that in this application, the front-end page displays the data corresponding to each target business interface by using a page collection method. The page collection is displayed in a paginated manner, with each page corresponding to a set of target response data. Each page corresponds to a data threshold to limit the amount of response data.
[0026] S101, obtain at least two target business interfaces corresponding to the page set.
[0027] In this embodiment, the front-end page provides an interactive component for users to select data types. Users select the data type they want to view through the interactive component. Each data type corresponds to a business interface. Once the user has determined the corresponding data type, the corresponding business interface is taken as the target business interface. Then, the front-end page will only request data from the back-end for the target business interface, thereby avoiding access to other unrelated business interfaces.
[0028] Specifically, in the front-end page, the interactive components corresponding to the selected data type of the page collection are determined, such as dropdowns, radio buttons, or input boxes for filtering data. The data type corresponding to the selected interactive component is obtained, and the corresponding target business interface request is generated. When the user initiates a confirmation command, the browser sends the target business interface request to the server. After receiving the request, the server routes the request to the corresponding business interface processing function based on the data type parameter in the request. Then, the business interface processing function performs business logic processing based on the data type to obtain the business data corresponding to the target business interface determined in the database. Finally, a space is built in the cache to save the business data to the cache.
[0029] S102, determine the amount of business data corresponding to at least two target business interfaces, and obtain the total amount of business data required for the page set.
[0030] In this embodiment, after determining the target business interface for the data type required by the user on the target page, the backend data corresponding to the target business interface will be obtained and returned.
[0031] Specifically, firstly, the execution objects corresponding to each target business interface are encapsulated into a target execution object. Then, the backend business interfaces corresponding to each execution object are accessed through the target execution object. The backend business interface includes the URL, request method, parameter format, and return data format. After receiving the request, the backend server performs user authentication and permission verification on the request initiator to ensure the legitimacy of the request. It then finds the corresponding business processing logic based on the request URL route, retrieves the data corresponding to each target business interface from the database according to the business logic, integrates and processes the data from the target business interface, and converts it into a specific format before returning it.
[0032] S103, based on the total amount of business data, determine the proportion of business data for each target business interface in the total amount of business data.
[0033] Specifically, after calling the specific business logic in the backend service and obtaining the total amount of business data for each target business interface, the proportion of each target business interface in the total business data is calculated using the formula: Interface Data Proportion = (Target Business Interface Data Volume / Total Business Data Volume) * 100%. Then, the data proportions of each target business interface are adjusted appropriately according to actual needs. For example, to improve the response speed of a certain interface, its proportion in the total data volume can be decreased to reduce the amount of data required by that target business interface; conversely, to meet the special requirements of a specific target business interface, its proportion in the total business data volume can be increased to increase the amount of data required by that target business interface. S104: Based on the data ratio and the amount of response data required by the target page of the page set, obtain the target data set and display the target data set through the target page.
[0034] In this embodiment, since the number of data items displayed on each target page in the target set is limited, it is necessary to adjust and integrate the amount of business data to be displayed on the target page according to the data ratio of each target business interface, so that the amount of data responded by each target business interface on the target page meets the display requirements of the target page.
[0035] Specifically, the data limit threshold and required response data volume of the target page are obtained based on the front-end configuration file. Then, the fields to be displayed are filtered from the data returned by each target business interface, and the data is integrated according to the correlation between the fields to obtain the target data set. At the same time, when integrating the data, it is necessary to check whether there are any abnormalities in the interface based on the response header information of each target business interface. If there are any abnormalities, the interface call failure or incomplete data acquisition can be handled through error handling mechanisms or retry strategies. Finally, the integrated target data set is displayed according to the display requirements of the target page in the format of the target page.
[0036] As shown above, by determining the target business interfaces corresponding to the required data in the page set, integrating the business data of all target business interfaces to obtain the total amount of business data required for the page set, and determining the proportion of the target business interface in the total amount of business data, the amount of response data corresponding to each target business interface on the target page is determined and displayed. This can automatically adjust the amount of response data of the business interfaces, reduce the amount of useless data, and thus optimize the data response speed.
[0037] It is understood that, in order to enable those skilled in the art to better understand and implement the concepts, implementation methods and advantages of the embodiments of this application, the following examples will be provided in further detail.
[0038] Please see Figure 2 , Figure 2 This is a schematic diagram of a second flow of the data processing method provided in this application embodiment. The specific flow of this data processing method may include: S201, obtain the first data ratio of the business data volume of each target business interface in the total business data volume.
[0039] Specifically, for example, there are three target business interfaces: computer product display interface, mobile product display interface, and headphone product display interface. The computer product display interface has 1000 data entries, the mobile product display list interface has 2000 data entries, and the headphone product interface has 3000 data entries. The total amount of business data obtained is 6000. Then, according to the formula: Data Ratio = (Target Business Interface Data Volume / Total Business Data Volume) * 100%, the first data ratio for the computer product display interface is: 1000 / (1000+2000+3000)×100% = 16.67%; the first data ratio for the mobile product display list interface is: 2000 / (1000+2000+3000)×100% = 33.33%; and the first data ratio for the headphone product display interface is: 3000 / (1000+2000+3000)×100% = 50.00%.
[0040] S202, based on the first data ratio, obtain the first response data volume corresponding to the first target page in the page set for each target business interface.
[0041] S203, if the amount of the first response data is greater than the data volume threshold of the target page, the amount of the first response data is reduced based on the first data ratio to obtain the processed amount of the first response data.
[0042] Specifically, in steps S202 to S203, after determining the first data ratio corresponding to each target business interface, the first response data volume corresponding to each target business interface is obtained based on the first data ratio, and the response data volume that the target business interface should provide is determined based on this response data volume. For example, if the first response data volume of the computer product display interface is 4, then 4 pieces of business data corresponding to the computer product display interface are obtained. Afterwards, the corresponding response data volume for each target business interface is determined. This response data volume is obtained by multiplying the data ratio of each target business interface by the data threshold of the target page and rounding up.
[0043] When integrating data to determine if the response data volume exceeds the target page's data display threshold, if an excess is detected, the first data ratio for each target business interface is adjusted. For example, if the target page's data display threshold is 10, the first response data volume for the computer product display interface is 4, the first response data volume for the mobile product list display interface is 4, and the first response data volume for the headphone product display interface is 5. Then, it is determined whether the first response data volume of each target business interface, after integration, exceeds the target page's data threshold. If it does, adjustments are made based on the first data ratio for each target business interface. For example, the first response data volume for the computer product display interface is adjusted to 3, the first response data volume for the mobile product list display interface is adjusted to 3, and the first response data volume for the headphone product display interface is adjusted to 4. At this point, the total first response data volume of 10 satisfies the target page's data threshold.
[0044] S204, integrate the processed first response data to obtain the first target data set.
[0045] S205, the first target data set is displayed through the first target page.
[0046] Specifically, in steps S204 to S205, the front-end page obtains the corresponding number of response data based on the first response data volume of each target business interface, integrates the response data to obtain the first target data set, and then determines the corresponding target page in the page set and loads it. For example, there are two data sets: data set A and data set B. The data corresponding to the first response data volume in data set A is [0,1,2,3,4,5], and the data corresponding to the first response data volume in data set B is [6,7,8,9]. At this time, the two data sets are merged to obtain the first target data set as [0,1,2,3,4,5,6,7,8,9].
[0047] As can be seen from the above, by obtaining the first data ratio corresponding to each target business interface, determining the first response data volume of each target business interface based on the first data ratio, and judging whether it exceeds the data display threshold of the target page, if it exceeds the threshold, the data is adjusted based on the first data ratio to obtain the first target dataset, which is then merged and displayed on the target page. This avoids obtaining other irrelevant interface data and further optimizes the data processing speed.
[0048] Optional, please refer to Figure 3 , Figure 3 This is a schematic diagram of a third data processing method provided in an embodiment of this application. The specific flow of this data processing method may include: S301, Get the amount of loaded data corresponding to each target business interface in the loaded pages of the page collection.
[0049] S302, subtract the amount of loaded data corresponding to each target business interface from the amount of business data corresponding to each target business interface to obtain the amount of remaining data corresponding to each target business interface.
[0050] In this embodiment, after the data of each target business interface is acquired and loaded, the current page, the amount of data loaded, and the amount of data remaining in the counter corresponding to each target business interface will be dynamically updated in real time.
[0051] Specifically, in steps S301 to S302, a counter is first created for each target business interface to record the amount of data loaded, the current page, the amount of data acquired, and the amount of data remaining for that interface, with the initial value set to 0 for all of them. After acquiring the data of the target business interface, the current page, the amount of data acquired, and the amount of data remaining in the counter are updated in real time. For example, if the amount of business data for target business interface A is 35 and 5 data items have been loaded, the amount of data remaining is updated to 30. If the amount of business data for target business interface B is 30 and 5 data items have been loaded, the amount of data remaining is updated to 25.
[0052] S303 checks whether the remaining data volume of at least two target business interfaces is empty.
[0053] S304 If the remaining data volume of any target business interface is empty, then enable access restriction permissions for the target business interface with empty remaining data volume.
[0054] Specifically, in steps S303 to S304, assuming the interface for obtaining the remaining data volume corresponding to the current target business interface A is / api / a / remaining, after calling this interface, the response data of the interface is obtained. For example, calling the interface / api / a / remaining to obtain the remaining data volume of the target business interface A, if the return value of the remaining data volume in the response data of the target business interface A is 0, it means that the remaining data volume of the target business interface A is empty. At this time, an access control request is sent to the backend to set the access permission of interface A to a restricted state to stop access to the target business interface A.
[0055] S305 If the remaining data volume of all target business interfaces is empty, a prompt message will be generated.
[0056] Specifically, for example, if there are two target business interfaces A and B on the current page, and the return value is 0 after calling the interfaces for the remaining data of A and B respectively, it means that the data of target business interfaces A and B has been loaded. At this time, a prompt box indicating that the data loading is complete will pop up on the front-end page.
[0057] Optional, please refer to Figure 4 , Figure 4 This is a schematic diagram of the fourth flow of the data processing method provided in this application embodiment. The specific flow of this data processing method may include: S401: Obtain the remaining data volume corresponding to the target business interface that does not have access restriction permissions enabled, and integrate the remaining data volume to obtain the total remaining data volume.
[0058] In this embodiment, frequent access requests to interfaces with empty remaining data will affect data loading time and bandwidth resources, thereby reducing data loading efficiency. In addition, since interfaces with empty remaining data do not provide any useful data resources, they do not have optimization value in resource allocation and utilization. Therefore, they need to be excluded to save computing resources.
[0059] Specifically, the access permission interfaces of each target business interface are called. Based on the return value of the access permission interface, the target business interface with access restrictions not enabled is obtained. For example, a return value of True indicates that the access restriction of the target business interface is enabled, and a return value of False indicates that the access restriction of the target business interface is disabled. If the return value is True, it means that the remaining data volume of the corresponding target business interface is empty, and this interface cannot be accessed to obtain interface data. For obtaining the remaining data volume, please refer to S302 to S304, which will not be elaborated here.
[0060] S402, based on the total remaining data, determine the second proportion of the remaining data for each target business interface within the total remaining data.
[0061] Please refer to the description of step S201 above for step S402, which will not be repeated here.
[0062] S403, based on the second data ratio, obtain the second response data volume corresponding to the second target page in the page set for each target business interface.
[0063] Please refer to the description of step S202 above for step S403, which will not be repeated here.
[0064] S404, if the amount of the second response data is greater than the data amount threshold of the second target page, then the amount of the second response data is reduced based on the second data ratio to obtain the processed amount of the second response data.
[0065] Please refer to the description of step S203 above for step S404, which will not be repeated here.
[0066] S405, integrate the processed second response data to obtain the second target data set.
[0067] S406, Display the second target data set through the second target page.
[0068] Please refer to the description of steps S204 to S205 above for steps S405 and steps S406, which will not be repeated here.
[0069] Optional, please refer to Figure 5 , Figure 5 This is a fifth flowchart illustrating the data processing method provided in this application. The specific flow of this data processing method may include: S501, obtain the request object corresponding to each target business interface, where the request object is used to access the target data corresponding to the target business interface.
[0070] S502 encapsulates each request object to obtain the target execution object, and based on the target execution object, obtains the interface data returned by each request object.
[0071] In steps S501 to S502, before obtaining the business data corresponding to the target business interface, it is necessary to obtain the request object corresponding to each target business interface and perform preprocessing to optimize the concurrent data processing of the target business interface and reduce user waiting time.
[0072] Specifically, the `Promise.all` mechanism is used to wrap multiple request objects in an array, and this array is passed to the `Promise.all()` method. Then, the `Promise.all()` method generates a target execution object to execute the request objects corresponding to multiple target business interfaces simultaneously, and after all request objects have been successfully executed, it returns the business data from all request objects in the form of an array.
[0073] S503 If the interface data of any requested object fails to return, an exception message will be generated.
[0074] Specifically, the system checks for exception header information, such as interface exception response status codes, by traversing the response data after executing the Promise.all() method. If an interface exception response status code is found in the response data returned by the execution object of any target business interface, the existence of the interface exception response status code will be displayed on the front-end page through a prompt box.
[0075] In some optional instances, to further improve data processing speed, the cached data is checked by examining the timestamp of the cached data before retrieving the business data corresponding to the target business interface. This is to determine whether the cached data contains the business data corresponding to the target business interface or whether the data is complete. For example, if the business data corresponding to the target business interface in the cached data does not exist or is incomplete, the corresponding complete business data is retrieved from the backend database and stored in the cache. Then, when calling the business data of the target business interface, it is retrieved directly from the cached data without accessing the backend database, thereby reducing the data loading time.
[0076] Additionally, this application also provides a data processing apparatus. Please refer to [link / reference]. Figure 6 , Figure 6 This is a schematic diagram of the data processing apparatus provided in an embodiment of this application. The data processing apparatus 600 may include an acquisition module 601, a determination module 602, a data ratio determination module 603, and a target data set module 604, as detailed below: The acquisition module 601 is used to acquire at least two target business interfaces corresponding to the page collection.
[0077] The determination module 602 is used to determine the amount of business data corresponding to at least two target business interfaces, and to obtain the total amount of business data required for the page set.
[0078] The data proportion determination module 603 is used to determine the proportion of business data for each target business interface in the total business data based on the total business data volume.
[0079] The target data set module 604 is used to obtain the target data set based on the data ratio and the amount of response data required by the target page of the page set, and then display the target data set through the target page.
[0080] In some embodiments, the target data set module 604 further includes a first data ratio acquisition module, which is used to acquire the first data ratio of the business data volume of each target business interface in the total business data volume.
[0081] Optionally, the target data set module 604 further includes a first response data volume determination module, which is used to obtain the first response data volume corresponding to the first target page of the page set for the target business interface according to the first data ratio.
[0082] Optionally, the target data set module 604 further includes a first response data volume processing module, which can be used to reduce the first response data volume based on a first data ratio if the first response data volume is greater than the data volume threshold of the target page, so as to obtain the processed first response data volume.
[0083] Optionally, the target data set module 604 may further include an integration module, which may be used to display the first target data set through a first target page.
[0084] In some embodiments, the target data set module 604 further includes a loaded data volume acquisition module, which can be used to acquire the loaded data volume corresponding to each target business interface in the loaded pages of the page set.
[0085] Optionally, the target data set module 604 further includes a remaining data acquisition module, which can be used to subtract the loaded data volume corresponding to each target business interface from the business data volume corresponding to each target business interface to obtain the remaining data volume corresponding to each target business interface.
[0086] In some embodiments, the target data set module 604 further includes a detection module, which can be used to detect whether the remaining data volume of at least two target service interfaces is empty.
[0087] Optionally, the target data set module 604 further includes an access restriction and permission control module, which can be used to enable access restriction permissions for target business interfaces with empty remaining data if the remaining data volume of any target business interface is empty.
[0088] Optionally, the target data set module 604 also includes a prompt message generation module, which can be used to generate a prompt message if the remaining data volume of all target business interfaces is empty.
[0089] In some embodiments, the target data set module 604 further includes a remaining data total acquisition module, which can be used to acquire the remaining data volume corresponding to the target business interface that has not enabled access restriction permissions, and integrate the remaining data volume to obtain the remaining data total.
[0090] Optionally, the target data set module 604 further includes a second data ratio determination module, which can be used to determine the second data ratio of the remaining data of each target business interface in the total remaining data based on the total remaining data.
[0091] In some embodiments, the target data set module 604 further includes a second response data volume determination module, which can be used to obtain the second response data volume corresponding to the second target page of the page set for each target business interface according to the second data ratio.
[0092] Optionally, the target data set module 604 further includes a second response data volume processing module, which can be used to reduce the second response data volume based on a second data ratio if the second response data volume is greater than the data volume threshold of the second target page, so as to obtain the processed second response data volume.
[0093] Optionally, the target data set module 604 may further include a second target data set module, which can be used to integrate the processed second response data to obtain a second target data set.
[0094] Optionally, the target data set module 604 may further include a second display module, which can be used to display the second target data set through a second target page.
[0095] In some embodiments, the acquisition module 601 further includes a target data acquisition module, which can be used to acquire a request object corresponding to each target business interface, wherein the request object is used to access the target data corresponding to the target business interface.
[0096] Optionally, the acquisition module 601 may further include a target execution object module, which can be used to encapsulate the request object to obtain the target execution object, and based on the target execution object, obtain the interface data returned by each request object.
[0097] Optionally, the acquisition module 601 further includes a prompt information generation module, which can be used to generate an exception prompt information if the interface data of any request object fails to return.
[0098] It should be noted that the data processing device provided in this application embodiment and the data processing method in the above embodiment belong to the same concept. Any method provided in the data processing method embodiment can be run on the data processing device. For details of its specific implementation process, please refer to the data processing method embodiment, which will not be repeated here.
[0099] In this embodiment, the data processing device 600 acquires at least two target business interfaces corresponding to the page set through the acquisition module 601; determines the business data volume corresponding to the at least two target business interfaces through the determination module 602, thereby obtaining the total amount of business data required for the page set; determines the data proportion of the business data volume of each target business interface in the total amount of business data through the data proportion determination module 603; and obtains the target data set through the target data set module 604 based on the data proportion and the response data volume required for the target page of the page set, and displays the target data set through the target page, thereby optimizing the data response speed and improving the user experience.
[0100] This embodiment also provides a computer-readable storage medium storing computer program code. When the computer program code is run on a computer, the computer executes the aforementioned method steps to implement a data processing method provided in the above embodiment.
[0101] The storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0102] Since the instructions stored in the storage medium can execute the steps of any of the data processing methods provided in the embodiments of this application, the beneficial effects that any of the data processing methods provided in the embodiments of this application can achieve can be realized. For details, please refer to the previous embodiments, which will not be repeated here.
[0103] Accordingly, this application also provides an electronic device 700, which may include devices such as an in-vehicle terminal. Please refer to the figures. Figure 7This is a schematic diagram of the first structure of an electronic device provided in this application embodiment. The electronic device 700 includes a processor 701 and a memory 702. The processor 701 and the memory 702 are electrically connected.
[0104] The processor 701 is the control center of the electronic device 700. It connects various parts of the electronic device through various interfaces and lines. By running or calling computer programs stored in the memory 702 and calling data stored in the memory 702, it performs various functions of the electronic device and processes data, thereby monitoring the electronic device as a whole.
[0105] The memory 702 can be used to store software programs and modules. The processor 701 executes various functional applications and data processing by running the computer programs and modules stored in the memory 702. The memory 702 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, computer programs required for at least one function, etc.; the data storage area may store data created according to the use of the electronic device, etc.
[0106] Furthermore, memory 702 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, memory 702 may also include a memory controller to provide processor 701 with access to memory 702.
[0107] In this embodiment, the processor 701 in the electronic device 700 loads the instructions corresponding to the processes of one or more computer programs into the memory 702 according to the following steps, and the processor 701 runs the computer programs stored in the memory 702 to realize various functions, as follows: Retrieve at least two target business interfaces corresponding to the page collection; Determine the amount of business data corresponding to at least two target business interfaces to obtain the total amount of business data required for the page set; Based on the total amount of business data, determine the proportion of business data for each target business interface within the total amount of business data; Based on the data ratio and the amount of response data required by the target page of the page set, the target data set is obtained and displayed through the target page.
[0108] In some embodiments, please refer to Figure 8 , Figure 8This is a schematic diagram of a second structure of the electronic device provided in this application embodiment. The electronic device 700 may include: a processor 701, a memory 702, a display screen 703, a camera assembly 704, an audio circuit 705, a sensor 706, and a power supply 707. The processor 701 is electrically connected to the display screen 703, the camera assembly 704, the audio circuit 705, the sensor 706, and the power supply 707.
[0109] The display screen 703 can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of electronic devices, which can be composed of images, text, icons, videos, and any combination thereof.
[0110] The camera assembly 704 may include image processing circuitry, which may be implemented using hardware and / or software components and may include various processing units defining an image signal processing (ISP) pipeline. The image processing circuitry may include at least: multiple cameras, an image signal processor (ISP), control logic, and image memory. Each camera may include at least one or more lenses and an image sensor. The image sensor may include a color filter array (such as a Bayer filter). The image sensor acquires light intensity and wavelength information captured by each imaging pixel of the image sensor and provides a set of raw image data that can be processed by the image signal processor.
[0111] Audio circuitry 705 can be used to provide an audio interface between a user and an electronic device via a speaker or microphone. Audio circuitry 705 includes a microphone. The microphone is electrically connected to the processor 701. The microphone is used to receive voice information input by the user.
[0112] Sensor 706 is used to collect information about the electronic device itself, user information, or external environmental information. For example, sensor 706 may include one or more of the following sensors: vibration sensor, temperature sensor, distance sensor, magnetic field sensor, light sensor, acceleration sensor, fingerprint sensor, Hall sensor, position sensor, gyroscope, inertial sensor, attitude sensor, barometer, heart rate sensor, etc.
[0113] The power supply 707 is used to supply power to the various components of the electronic device 700. In some embodiments, the power supply 707 can be logically connected to the processor 701 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system.
[0114] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0115] For the data processing apparatus of this application embodiment, its functional modules can be integrated into a single processing chip, or each module can exist physically separately, or two or more modules can be integrated into a single module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0116] The data processing methods, apparatus, electronic devices, and storage media provided in the embodiments of this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The above descriptions of the embodiments are only for the purpose of helping to understand the methods and core ideas of this application; furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A data processing method, characterized by, The method includes: Obtain at least two target business interfaces corresponding to the page set, wherein the target business interfaces are used to obtain the business data required for displaying the page set; Determine the amount of business data corresponding to at least two of the target business interfaces to obtain the total amount of business data required for the page set; Based on the total amount of business data, determine the proportion of business data for each target business interface within the total amount of business data; Obtain the first data proportion of the business data volume of each target business interface in the total business data volume; Based on the first data ratio, the first response data volume corresponding to the first target page of the page set for each target business interface is obtained; If the total amount of the first response data is greater than the data volume threshold of the target page, the amount of the first response data is reduced based on the first data ratio to obtain the processed first response data. The processed first response data is integrated to obtain a first target data set; The first target data set is displayed through the first target page.
2. The data processing method according to claim 1, characterized in that, The method further includes: Obtain the amount of loaded data corresponding to each target business interface in the loaded pages of the page set; Subtract the amount of loaded data corresponding to each target business interface from the amount of business data corresponding to each target business interface to obtain the amount of remaining data corresponding to each target business interface.
3. The data processing method according to claim 2, characterized in that, After subtracting the amount of loaded data corresponding to each target business interface from the amount of business data corresponding to each target business interface to obtain the remaining amount of data corresponding to each target business interface, the method further includes: Check whether the remaining data volume of at least two of the target service interfaces is empty; If the remaining data volume of any of the target business interfaces is empty, then the access restriction permission of the target business interface with the empty remaining data volume is enabled. If the remaining data volume of all the target business interfaces is empty, a prompt message will be generated.
4. The data processing method according to claim 3, characterized in that, After enabling access restrictions on the target service interface with empty remaining data if any of the target service interfaces has empty remaining data, the method further includes: Obtain the remaining data volume corresponding to the target business interface for which the access restriction permission is not enabled, and integrate the remaining data volume to obtain the total remaining data volume; Based on the total remaining data, determine a second data proportion of the remaining data for each target service interface within the total remaining data.
5. The data processing method according to claim 4, characterized in that, After determining the second proportion of the remaining data amount of each target service interface in the total remaining data amount based on the total remaining data amount, the method further includes: Based on the second data ratio, the second response data volume corresponding to the second target page of the page set for each target business interface is obtained; If the total amount of the second response data is greater than the data volume threshold of the second target page, then the amount of the second response data is reduced based on the second data ratio to obtain the processed amount of the second response data. The processed second response data is integrated to obtain a second target data set; The second target data set is displayed through the second target page.
6. The data processing method according to claim 1, Its characteristic lies in that, before obtaining at least two target business interfaces corresponding to the page set, the method includes: Obtain a request object corresponding to each of the target business interfaces, wherein the request object is used to access the target data corresponding to the target business interface; Each request object is encapsulated to obtain a target execution object, and based on the target execution object, the interface data returned by each request object is obtained; If the interface data requested by any of the aforementioned objects fails to return, an exception message will be generated.
7. A data processing apparatus, characterized in that, include: The acquisition module is used to acquire at least two target business interfaces corresponding to the page collection, wherein the target business interfaces are used to acquire the business data required for displaying the page collection; The determination module is used to determine the amount of business data corresponding to at least two target business interfaces, and to obtain the total amount of business data required for the page set. The data proportion determination module is used to determine the proportion of business data for each target business interface in the total business data volume, based on the total business data volume. The target data set module further includes a first data ratio acquisition module, which is used to acquire a first data ratio corresponding to the business data volume of each target business interface in the total business data volume; the target data set module further includes a first response data volume determination module, which is used to obtain a first response data volume corresponding to a first target page in the page set for each target business interface based on the first data ratio; the target data set module further includes a first response data volume processing module, which is used to reduce the first response data volume based on the first data ratio if the total amount of the first response data volume is greater than the data volume threshold of the target page, thereby obtaining a processed first response data volume; the target data set module further includes an integration module, which is used to integrate the processed first response data volume to obtain a first target data set, and display the first target data set through the first target page.
8. An electronic device, characterized in that, The electronic device includes: Memory, used to store executable program code; A processor is configured to call and run the executable program code from the memory, causing the electronic device to perform the data processing method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed, implements the data processing method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Dynamic current limiting method based on interface response time trend and computer readable medium
CN110099009A
System and method for arranging presentation of advertisement on network such as internet
JP2001167183A