CN-113407339-B - Resource request feedback method and device, readable storage medium and electronic equipment
Abstract
The embodiment of the disclosure discloses a resource request feedback method, a device, a computer-readable storage medium and electronic equipment, wherein the method comprises the steps of obtaining material resource request information comprising at least one material resource identifier, obtaining request material resources and resource dependency information respectively corresponding to the at least one material resource identifier, obtaining dependent material resources respectively corresponding to the at least one material resource identifier based on the resource dependency information, combining the obtained at least one request material resource and the at least one dependent material resource to obtain a material resource set to be sent, and sending the material resource set to be sent to a resource request end. The embodiment of the disclosure realizes the combination of material resources and dependent resources of a plurality of requests according to business requirements at one time, improves the flexibility and efficiency of resource requests, and can realize a more flexible, customizable and self-expandable resource request scheme due to the flexible configuration of the resource dependency relationship information.
Inventors
- SUN HONGPENG
Assignees
- 北京房江湖科技有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20210615
Claims (9)
- 1. A resource request feedback method, comprising: acquiring material resource request information comprising at least one material resource identifier; Acquiring request material resources and resource dependency relationship information corresponding to the at least one material resource identifier respectively, wherein the request material resources are material resources requested by the material resource request information, and the resource dependency relationship information is used for representing dependent material resources on which the request material resources depend; Acquiring the dependent material resources respectively corresponding to the at least one material resource identifier based on the resource dependency relationship information; Combining the obtained at least one request material resource and at least one dependent material resource to obtain a material resource set to be sent; the material resource set to be sent is sent to a resource request end; the sending the material resource set to be sent to the resource request end comprises the following steps: determining an arrangement sequence of material resources to be transmitted in the material resource set to be transmitted based on the resource dependency relationship information, wherein the arrangement sequence is determined based on the dependency weights respectively corresponding to the material resources to be transmitted in the material resource set to be transmitted, and the dependency weights are obtained based on the times that the material resources to be transmitted are depended on other material resources; and transmitting the material resource set to be transmitted to a resource request terminal based on the arrangement sequence.
- 2. The method of claim 1, wherein the merging the acquired at least one request material resource and at least one dependent material resource to obtain a set of material resources to be sent comprises: performing de-duplication treatment on each acquired request material resource and dependent material resource; And combining the request material resources and the dependent material resources after the duplicate removal treatment into a material resource set to be sent.
- 3. The method of claim 1, wherein after the merging of the acquired at least one request material resource and at least one dependent material resource to obtain a set of material resources to be sent, the method further comprises: And storing the material resource request information and the material resource set to be sent in a preset storage area in an associated mode.
- 4. A method according to any of claims 1-3, wherein prior to said obtaining material resource request information comprising at least one material resource identification, the method further comprises: Receiving initial material resource request information comprising at least one material resource identifier; determining whether a preset storage area comprises a material resource set corresponding to the pre-cached initial material resource request information or not; If not, determining whether the parameters of the initial material resource request information are legal; And if the initial material resource request information is legal, determining the initial material resource request information as the material resource request information.
- 5. The method of claim 4, wherein after the determining whether the pre-stored storage area includes the set of material resources corresponding to the pre-cached initial material resource request information, the method further comprises: And if so, sending the material resource set to the resource request end.
- 6. A resource request feedback device, comprising: the first acquisition module is used for acquiring material resource request information comprising at least one material resource identifier; The second acquisition module is used for acquiring the request material resource and the resource dependency relationship information corresponding to the at least one material resource identifier respectively, wherein the request material resource is the material resource requested by the material resource request information, and the resource dependency relationship information is used for representing the dependent material resource on which the request material resource depends; The third acquisition module is used for acquiring the dependent material resources respectively corresponding to the at least one material resource identifier based on the resource dependency relationship information; the merging module is used for merging the acquired at least one request material resource and at least one dependent material resource to obtain a material resource set to be sent; the first sending module is used for sending the material resource set to be sent to a resource request end; the first transmitting module includes: the determining unit is used for determining the arrangement sequence of the material resources to be sent in the material resource set to be sent based on the resource dependency relationship information, wherein the arrangement sequence is determined based on the dependency weights respectively corresponding to the material resources to be sent in the material resource set, and the dependency weights are obtained based on the times that the material resources to be sent are depended on by other material resources; and the sending unit is used for sending the material resource set to be sent to a resource request end based on the arrangement sequence.
- 7. The apparatus of claim 6, wherein the combining module comprises: the de-duplication unit is used for de-duplication treatment of the acquired material resources required and the material resources relied on; And the merging unit is used for merging the request material resources and the dependent material resources after the duplicate removal processing into a material resource set to be sent.
- 8. A computer readable storage medium storing a computer program for performing the method of any one of the preceding claims 1-5.
- 9. An electronic device, the electronic device comprising: A processor; A memory for storing the processor-executable instructions; The processor is configured to read the executable instructions from the memory and execute the instructions to implement the method of any of the preceding claims 1-5.
Description
Resource request feedback method and device, readable storage medium and electronic equipment Technical Field The disclosure relates to the technical field of computers, in particular to a resource request feedback method and device, a computer readable storage medium and electronic equipment. Background In the browser page request service, a front-end page needs to send a large number of requests to a back-end to acquire data needed by the page. If the data is not available, rendering of some blocks on the page cannot be completed, so the speed at which the data is acquired determines the speed at which the page is rendered. In order to accelerate the request process in the browser, the requests are combined in the prior art and sent to the server at one time, and the server combines a plurality of files of the requests into one file and returns the file to the browser. For example, the existing Combo technology realizes that multiple files are combined into one file to be returned through one request by using an open-source nmginx plug-in nginx_concat_module, so that the number of requests is reduced, and the performance is improved. Disclosure of Invention The embodiment of the disclosure provides a resource request feedback method, a resource request feedback device, a computer-readable storage medium and electronic equipment. The embodiment of the disclosure provides a resource request feedback method, which comprises the steps of obtaining material resource request information comprising at least one material resource identifier, obtaining request material resources and resource dependency relationship information corresponding to the at least one material resource identifier respectively, obtaining dependent material resources corresponding to the at least one material resource identifier respectively based on the resource dependency relationship information, combining the obtained at least one request material resource and the at least one dependent material resource to obtain a material resource set to be sent, and sending the material resource set to a resource request end. In some embodiments, combining the acquired at least one request material resource and the at least one dependent material resource to obtain a material resource set to be sent includes performing deduplication processing on each acquired request material resource and dependent material resource, and combining the deduplicated request material resource and dependent material resource into the material resource set to be sent. In some embodiments, the method comprises the steps of sending the to-be-sent material resource set to the resource request end, wherein the to-be-sent material resource set comprises the steps of determining the arrangement sequence of to-be-sent material resources in the to-be-sent material resource set based on the resource dependency information, and sending the to-be-sent material resource set to the resource request end based on the arrangement sequence. In some embodiments, after merging the acquired at least one request material resource and the at least one dependent material resource to obtain a set of material resources to be sent, the method further includes storing the material resource request information and the set of material resources to be sent in association to a preset storage area. In some embodiments, before acquiring the material resource request information including the at least one material resource identifier, the method further comprises the steps of receiving initial material resource request information including the at least one material resource identifier, determining whether a material resource set corresponding to the pre-cached initial material resource request information is included in a preset storage area, determining whether parameters of the initial material resource request information are legal or not if the parameters are not included, and determining that the initial material resource request information is material resource request information if the parameters are legal. In some embodiments, after determining whether the pre-cached material resource set corresponding to the initial material resource request information is included in the preset storage area, the method further includes sending the material resource set to the resource request end if the pre-cached material resource set is included. According to another aspect of the embodiment of the disclosure, a resource request device is provided, which comprises a first acquisition module, a second acquisition module, a third acquisition module, a merging module and a first sending module, wherein the first acquisition module is used for acquiring material resource request information comprising at least one material resource identifier, the second acquisition module is used for acquiring request material resources and resource dependency relationship information respectively corresponding to the at leas