CN113407339A - Resource request feedback method and device, readable storage medium and electronic equipment - Google Patents

Resource request feedback method and device, readable storage medium and electronic equipment Download PDF

Info

Publication number
CN113407339A
CN113407339A CN202110661831.3A CN202110661831A CN113407339A CN 113407339 A CN113407339 A CN 113407339A CN 202110661831 A CN202110661831 A CN 202110661831A CN 113407339 A CN113407339 A CN 113407339A
Authority
CN
China
Prior art keywords
resource
material resource
request
sent
resource request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110661831.3A
Other languages
Chinese (zh)
Inventor
孙鸿鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beike Technology Co Ltd
Original Assignee
Beijing Fangjianghu Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Fangjianghu Technology Co Ltd filed Critical Beijing Fangjianghu Technology Co Ltd
Priority to CN202110661831.3A priority Critical patent/CN113407339A/en
Publication of CN113407339A publication Critical patent/CN113407339A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the disclosure discloses a resource request feedback method, a resource request feedback device, a computer-readable storage medium and electronic equipment, wherein the method comprises the following steps: acquiring material resource request information comprising at least one material resource identifier; obtaining request material resources and resource dependency relationship information respectively corresponding to at least one material resource identifier; based on the resource dependency relationship information, obtaining dependent material resources corresponding to at least one material resource identification respectively; 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; and sending the material resource set to be sent to a resource request terminal. The method and the device for realizing the resource request have the advantages that the material resources and the dependent resources of a plurality of requests can be combined at one time according to the service requirements, the flexibility and the efficiency of the resource request are improved, and the resource dependent relation information can be flexibly configured, so that a more flexible, user-defined and self-expandable resource request scheme can be realized.

Description

Resource request feedback method and device, readable storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a resource request feedback method and apparatus, a computer-readable storage medium, and an electronic device.
Background
In the browser page request service, a front page needs to send a large number of requests to a back end to acquire data required by the page. If the data is not available, some blocks on the page cannot be rendered, and therefore, the speed of acquiring the data determines the page rendering speed. In the browser, in order to accelerate the request process, in the prior art, the requests are merged and sent to the server at one time, and the server merges a plurality of requested files into one file and returns the file to the browser. For example, the conventional Combo technology combines a plurality of files into one file to be returned through one request by using an open-source Nginx 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 includes: acquiring material resource request information comprising at least one material resource identifier; obtaining request material resources and resource dependency relationship information respectively corresponding to at least one material resource identifier; based on the resource dependency relationship information, obtaining dependent material resources corresponding to at least one material resource identification respectively; 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; and sending the material resource set to be sent to a resource request terminal.
In some embodiments, merging the obtained at least one request material resource and at least one dependent material resource to obtain a material resource set to be sent, includes: carrying out duplicate removal processing on each acquired request material resource and each acquired dependent material resource; and combining the request material resources and the dependent material resources after the duplicate removal processing into a material resource set to be sent.
In some embodiments, sending the material resource set to be sent to the resource request terminal includes: 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; and sending the material resource set to be sent to a resource request terminal based on the arrangement sequence.
In some embodiments, after the obtained at least one request material resource and at least one dependent material resource are merged to obtain a material resource set to be sent, the method further includes: and storing the material resource request information and the material resource set to be sent to a preset storage area in an associated manner.
In some embodiments, before obtaining material resource request information including 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 initial material resource request information cached in advance; if not, determining whether the parameter of the initial material resource request information is legal or not; and if the request information is legal, determining that the initial material resource request information is the material resource request information.
In some embodiments, after determining whether the preset storage area includes a material resource set corresponding to the pre-cached initial material resource request information, the method further includes: and if so, sending the material resource set to a resource request end.
According to another aspect of the embodiments of the present disclosure, there is provided a resource request apparatus, including: the system comprises a first acquisition module, a second acquisition module and a first management 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 the request material resource and the resource dependency relationship information which are respectively corresponding to at least one material resource identifier; a third obtaining module, configured to obtain, based on the resource dependency relationship information, dependent material resources corresponding to at least one material resource identifier respectively; 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 the resource request terminal.
In some embodiments, the merging module comprises: the duplicate removal unit is used for carrying out duplicate removal processing on each acquired request material resource and each acquired dependent material resource; and the merging unit is used for merging the request material resources and the dependent material resources subjected to the duplicate removal processing into a material resource set to be sent.
In some embodiments, the first transmitting module comprises: 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; and the sending unit is used for sending the material resource set to be sent to the resource request terminal based on the arrangement sequence.
In some embodiments, the apparatus further comprises: and the storage module is used for storing the material resource request information and the material resource set to be sent to a preset storage area in an associated manner.
In some embodiments, the apparatus further comprises: the receiving module is used for receiving initial material resource request information comprising at least one material resource identifier; the first determining module is used for determining whether a preset storage area comprises a material resource set corresponding to the initial material resource request information cached in advance; the second determining module is used for determining whether the parameter of the initial material resource request information is legal or not if the parameter of the initial material resource request information is not legal; and the third determining module is used for determining that the initial material resource request information is the material resource request information if the initial material resource request information is legal.
In some embodiments, the apparatus further comprises: and the second sending module is used for sending the material resource set to the resource request end if the material resource set corresponding to the pre-cached initial material resource request information is included.
According to another aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium storing a computer program for executing the above-mentioned resource request feedback method.
According to another aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including: a processor; a memory for storing processor-executable instructions; and the processor is used for reading the executable instruction from the memory and executing the instruction to realize the resource request feedback method.
Based on the resource request feedback method, the resource request feedback device, the computer-readable storage medium and the electronic device provided by the embodiments of the present disclosure, at least one requested material resource is obtained by receiving a material resource request, at least one dependent material resource is obtained according to resource dependency relationship information, the at least one requested material resource and the at least one dependent material resource are combined to obtain a material resource set to be sent, and the material resource set to be sent is sent to a resource request terminal, so that the material resources and the dependent resources of multiple requests are combined at one time according to business requirements, the flexibility and the efficiency of the resource request are improved, and as the resource dependency relationship information can be flexibly configured, a more flexible, user-defined and self-expandable resource request scheme can be realized.
The technical solution of the present disclosure is further described in detail by the accompanying drawings and examples.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent by describing in more detail embodiments of the present disclosure with reference to the attached drawings. The accompanying drawings are included to provide a further understanding of the embodiments of the disclosure and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description serve to explain the principles of the disclosure and not to limit the disclosure. In the drawings, like reference numbers generally represent like parts or steps.
Fig. 1 is a system diagram to which the present disclosure is applicable.
Fig. 2 is a flowchart illustrating a resource request feedback method according to an exemplary embodiment of the present disclosure.
Fig. 3 is a flowchart illustrating a resource request feedback method according to another exemplary embodiment of the present disclosure.
Fig. 4 is a flowchart illustrating a resource request feedback method according to another exemplary embodiment of the present disclosure.
Fig. 5 is a schematic diagram of an application scenario of a resource request feedback method according to an embodiment of the present disclosure.
Fig. 6 is a schematic structural diagram of a resource request device according to an exemplary embodiment of the present disclosure.
Fig. 7 is a schematic structural diagram of a resource request device according to another exemplary embodiment of the present disclosure.
Fig. 8 is a block diagram of an electronic device provided in an exemplary embodiment of the present disclosure.
Detailed Description
Hereinafter, example embodiments according to the present disclosure will be described in detail with reference to the accompanying drawings. It is to be understood that the described embodiments are merely a subset of the embodiments of the present disclosure and not all embodiments of the present disclosure, with the understanding that the present disclosure is not limited to the example embodiments described herein.
It should be noted that: the relative arrangement of the components and steps, the numerical expressions, and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless specifically stated otherwise.
It will be understood by those of skill in the art that the terms "first," "second," and the like in the embodiments of the present disclosure are used merely to distinguish one element from another, and are not intended to imply any particular technical meaning, nor is the necessary logical order between them.
It is also understood that in embodiments of the present disclosure, "a plurality" may refer to two or more and "at least one" may refer to one, two or more.
It is also to be understood that any reference to any component, data, or structure in the embodiments of the disclosure, may be generally understood as one or more, unless explicitly defined otherwise or stated otherwise.
In addition, the term "and/or" in the present disclosure is only one kind of association relationship describing an associated object, and means that three kinds of relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" in the present disclosure generally indicates that the former and latter associated objects are in an "or" relationship.
It should also be understood that the description of the various embodiments of the present disclosure emphasizes the differences between the various embodiments, and the same or similar parts may be referred to each other, so that the descriptions thereof are omitted for brevity.
Meanwhile, it should be understood that the sizes of the respective portions shown in the drawings are not drawn in an actual proportional relationship for the convenience of description.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the disclosure, its application, or uses.
Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
The disclosed embodiments may be applied to electronic devices such as terminal devices, computer systems, servers, etc., which are operational with numerous other general purpose or special purpose computing system environments or configurations. Examples of well known terminal devices, computing systems, environments, and/or configurations that may be suitable for use with electronic devices, such as terminal devices, computer systems, servers, and the like, include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, hand-held or laptop devices, microprocessor-based systems, set top boxes, programmable consumer electronics, network pcs, minicomputer systems, mainframe computer systems, distributed cloud computing environments that include any of the above systems, and the like.
Electronic devices such as terminal devices, computer systems, servers, etc. may be described in the general context of computer system-executable instructions, such as program modules, being executed by a computer system. Generally, program modules may include routines, programs, objects, components, logic, data structures, etc. that perform particular tasks or implement particular abstract data types. The computer system/server may be practiced in distributed cloud computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed cloud computing environment, program modules may be located in both local and remote computer system storage media including memory storage devices.
Summary of the application
The prior art has the disadvantages of relying on the Nginx plug-in system and the Nginx configuration, and simply downloading and merging a plurality of requested resources. The file resources with dependency relationship are inelegant, the requirements of duplicate removal and file loading on demand cannot be met, and the problem that the number of requests for multiple resources is too large can be solved.
Exemplary System
Fig. 1 illustrates an exemplary system architecture 100 of a resource request feedback method or resource request device to which embodiments of the present disclosure may be applied.
As shown in fig. 1, system architecture 100 may include terminal device 101, network 102, and server 103. Network 102 is the medium used to provide communication links between terminal devices 101 and server 103. Network 102 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
A user may use terminal device 101 to interact with server 103 over network 102 to receive or send messages and the like. Various communication client applications, such as a search-type application, a web browser application, a shopping-type application, an instant messaging tool, etc., may be installed on the terminal device 101.
The terminal device 101 may be various electronic devices including, but not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle-mounted terminal (e.g., a car navigation terminal), etc., and a fixed terminal such as a digital TV, a desktop computer, etc.
The server 103 may be a server providing various services, for example, a background resource server analyzing the material resource request information sent by the terminal device 101. The background resource server may obtain a material resource set to be sent based on the received material resource server, and send the material resource set to be sent to a resource request terminal (e.g., the terminal device 101).
It should be noted that the resource request feedback method provided in the embodiment of the present disclosure may be executed by the server 103 or the terminal device 101, and accordingly, the resource request apparatus may be disposed in the server 103 or the terminal device 101. The server 103 may be a single server or a server cluster including a plurality of servers. When the server 103 is a server cluster composed of a plurality of servers, the servers in the server cluster may be configured with different functions, and cooperate with each other to execute the resource request feedback method or to set the resource request device. For example, the server cluster may include a CDN (Content Delivery Network) server for delivering a request, and a server provided with a Combo instance for extracting material resources, processing dependent material resources, and sending material resources.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Exemplary method
Fig. 2 is a flowchart illustrating a resource request feedback method according to an exemplary embodiment of the present disclosure. The embodiment can be applied to an electronic device (such as the server 103 shown in fig. 1), and as shown in fig. 2, the method includes the following steps:
step 201, material resource request information including at least one material resource identifier is obtained.
In this embodiment, the electronic device may obtain material resource request information including at least one material resource identifier. The material resource request information may be information for requesting various material resources.
As an example, the asset request information may be a URL (Uniform Resource Locator) address "/api/package/$ id }/$ { version }/index. The method comprises the following steps of setting a parameter 'I ═ page, button, table, form ═ common Default', setting the page, button, table and form in the parameter as four material resource identifiers, and respectively corresponding to one type of material resource which is a component.
Step 202, obtaining request material resources and resource dependency relationship information corresponding to at least one material resource identifier respectively.
In this embodiment, the electronic device may obtain, locally or remotely, the requested material resource and the resource dependency relationship information corresponding to the at least one material resource identifier, respectively. The material resource is requested, that is, the material resource requested by the user end (such as the terminal device 101 shown in fig. 1) through the material resource request information. The resource dependency relationship information is used for representing the material resources on which the corresponding material resources depend. For example, a certain requested material resource is a page component, and the corresponding resource dependency information may be in the form of a list or the like, which includes names of other components (e.g., button components, mark components, etc.) on which the page component depends.
Generally, the electronic device may search resource detail information in a data storage area (which may be local or remote) according to the at least one material resource identifier, where the resource detail information may include a resource dependency table (i.e., resource dependency information), and may also include a resource download address, resource basic description information, and the like.
And 203, acquiring the dependent material resources corresponding to the at least one material resource identifier respectively based on the resource dependency relationship information.
In this embodiment, the electronic device may obtain, based on the resource dependency relationship information, the dependent material resources corresponding to the at least one material resource identifier from a local location or a remote location. As an example, assuming that the requested resource material resources are A, C, E respectively, it is determined that resource a depends on resource B and resource D according to the resource dependency relationship information, resource C depends on resource D, and resource E does not depend, and the acquired dependent material resources include resource B and resource D.
And 204, 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.
In this embodiment, the electronic device may combine 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.
Specifically, the electronic device may directly combine each requested material resource and each corresponding dependent material resource to obtain a material resource set to be sent.
In some alternative implementations, step 204 may be performed as follows:
firstly, the acquired request material resources and the acquired dependent material resources are subjected to duplicate removal processing.
Specifically, if different requested material resources correspond to the same dependent material resource, one of the acquired multiple same dependent material resources is reserved.
And then combining the request material resources and the dependent material resources after the duplicate removal processing into a material resource set to be sent.
Through the deduplication processing, the obtained data volume of the material resource set to be sent is smaller, and therefore the time for sending the material resources is reduced.
Step 205, sending the material resource set to be sent to the resource request terminal.
In this embodiment, the electronic device may send a material resource set to be sent to the resource request terminal. Wherein, the resource request end may be the terminal device 101 shown in fig. 1. As an example, when a material resource in a material resource set to be sent is a component required for displaying a web page, after a resource request terminal receives a component set, a browser installed on the resource request terminal may display the received component set in the web page. Generally, the electronic device may sequentially send each material resource to the resource request terminal in a manner of one data stream for the material resource set to be sent, and the sending sequence may be set as required. For example, the resource requests may be sent in sequence in the order in which the resource request requests the material resources.
The method provided by the above embodiment of the present disclosure obtains at least one requested material resource by receiving a material resource request, obtains at least one dependent material resource according to resource dependency relationship information, combines the at least one requested material resource and the at least one dependent material resource to obtain a material resource set to be sent, and sends the material resource set to be sent to a resource request terminal, thereby realizing that a plurality of requested material resources and dependent resources are combined at one time according to business requirements, improving flexibility and efficiency of resource requests, and further realizing a more flexible, customizable, and self-expandable resource request scheme because the resource dependency relationship information can be flexibly configured.
In some alternative implementations, as shown in fig. 3, step 205 includes the following sub-steps:
step 2051, determining an arrangement order of the material resources to be sent in the material resource set to be sent based on the resource dependency relationship information.
Generally, for a certain dependent material resource, the dependent weight of the dependent material resource can be determined according to the number of times the dependent material resource is dependent on other material resources, and the higher the dependent weight is, the earlier the ranking order is, the earlier it is sent. For example, suppose that the requested resource resources are A, C, E respectively, it is determined that resource a depends on resource B and resource D according to the resource dependency relationship information, resource C depends on resource D, and resource E does not depend. The ranking order of the respective material resources may be D, B, A, C, E, where D is depended twice by a and C, with the highest dependent weight, and B is depended the next to the weight, A, C, E being ordered in the order in the material resource request information.
And step 2052, sending the material resource set to be sent to the resource request terminal based on the arrangement sequence.
Continuing with the above example, the material resources are sent to the resource request side in turn in the order of D, B, A, C, E.
In the embodiment shown in fig. 3, the order of sending is determined based on the dependency relationship of each material resource, so that the resource request terminal can preferentially receive the material resource with higher dependent weight, and the resource request terminal can more efficiently load the requested material resource to the application such as a browser according to the order of the received material resource, thereby reducing the time spent by waiting for the material resource to be dependent when loading is caused by sending each material resource out of order, and improving the efficiency of resource request.
In some optional implementations, after step 204, the electronic device may further perform the following steps:
and storing the material resource request information and the material resource set to be sent to a preset storage area in an associated manner. The preset storage area may be set in a local area of the electronic device or other electronic devices in communication connection with the electronic device. As an example, the preset storage area may be a cache provided on the CDN server, and when the material resource request information is subsequently received again, the corresponding material resource set to be sent may be directly extracted from the cache, and the material resource set to be sent is sent to the resource request terminal.
According to the implementation mode, the material resource request information and the material resource set to be sent are stored in an associated mode, so that when the same material resource set to be sent is requested again in the follow-up process, operations such as dependence on resource analysis and material resource combination are not needed to be carried out again, the cached material resource set to be sent can be directly extracted, and the efficiency of resource request is further improved.
In some optional implementations, as shown in fig. 4, before step 201, the method may further include the steps of:
step 401, receiving initial material resource request information including at least one material resource identifier.
The initial material resource request information may be sent by a resource request end (such as the terminal device 101 shown in fig. 1). As an example, a user sends initial material resource request information for requesting a component on a web page to the electronic device using a browser on a resource requesting side.
Step 402, determining whether a preset storage area includes a material resource set corresponding to the pre-cached initial material resource request information.
The preset storage area may be set in a local area of the electronic device or other electronic devices in communication connection with the electronic device. As an example, the preset storage area may be a cache provided on the CDN server.
And step 403, if not, determining whether the parameter of the initial material resource request information is legal.
The method for determining whether the parameter of the initial material resource request information is legal may include multiple methods. For example, when the plurality of material resource identifiers in the parameter of the initial material resource request information include at least one queryable material resource identifier, it is determined that the parameter of the initial material resource request information is legal. For another example, when the plurality of material resources requested by the initial material resource request information include expired material resources, it is determined that the parameters of the initial material resource request information are illegal.
In some optional implementation manners, if it is determined that the preset storage area includes the material resource set corresponding to the initial material resource request information, the material resource set is sent to the resource request end. By directly sending the material resource set to the resource request terminal under the condition that the pre-cached material resource set exists in the preset storage area, the cached material resource set can be directly extracted without relying on resource analysis, material resource combination and other operations when the same material resource is subsequently requested, and the efficiency of the resource request is further improved.
Step 404, if the request information is legal, determining that the initial material resource request information is material resource request information.
The material resource request information determined in this step is the material resource request information described in the embodiment corresponding to fig. 2.
Optionally, if the parameter of the initial material resource request information is illegal, the electronic device may return a prompt indicating that the parameter is illegal to the resource request terminal.
In the method provided by the embodiment corresponding to fig. 4, when the preset storage area does not include the material resource set corresponding to the initial material resource request information cached in advance and the parameter of the initial material resource request information is judged to be legal, the resource request feedback method is executed based on the initial material resource request information, so that the initial material resource request information sent by the resource request terminal is effectively filtered, and processing errors and consumed computing resources caused by processing of illegal material resource request information by the electronic device are avoided.
Referring to fig. 5, fig. 5 is a schematic diagram of an application scenario of the resource request feedback method according to the present embodiment. In fig. 5, a terminal device 501 first sends a URL (i.e., material resource request information) to a CDN server 502. Then, the CDN server 502 determines whether the resource requested by the URL has a cache, and if so, directly responds to the request, and returns a set of cached material resources to the terminal device 501; if not, load balancing is entered and the request is load distributed to the designated back-to-source service instance (i.e., Combo service instance 503). The Combo service instance 503 judges whether the parameter of the URL request is legal, and if not, returns a prompt indicating that the parameter is illegal to the terminal device 501; and if the request material resources and the dependent material resources comprise repeatedly dependent resources, performing deduplication processing on the acquired request material resources and dependent material resources to obtain a material resource set to be sent, and if the request material resources and the dependent material resources do not comprise repeatedly dependent resources, directly obtaining the material resources to be sent. Finally, the material resource sets to be sent are sorted according to the dependent weight of the dependent resources, and the material resource sets to be sent are sent to the terminal device 501 based on the sorting
Exemplary devices
Fig. 6 is a schematic structural diagram of a resource request device according to an exemplary embodiment of the present disclosure. The present embodiment can be applied to an electronic device, as shown in fig. 6, the resource request apparatus includes: a first obtaining module 601, configured to obtain material resource request information including at least one material resource identifier; a second obtaining module 602, configured to obtain request material resources and resource dependency relationship information corresponding to at least one material resource identifier respectively; a third obtaining module 603, configured to obtain, based on the resource dependency relationship information, dependent material resources corresponding to at least one material resource identifier respectively; a merging module 604, configured to merge 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 first sending module 605 is configured to send a material resource set to be sent to a resource request end.
In this embodiment, the first obtaining module 601 may obtain material resource request information including at least one material resource identifier. The material resource request information may be information for requesting various material resources. As an example, the asset request information may be a URL (Uniform Resource Locator) address "/api/package/$ id }/$ { version }/index. The method comprises the following steps of setting a parameter 'I ═ page, button, table, form ═ common Default', setting the page, button, table and form in the parameter as four material resource identifiers, and respectively corresponding to one type of material resource which is a component.
In this embodiment, the second obtaining module 602 may obtain, locally or remotely, the requested material resource and the resource dependency relationship information corresponding to at least one material resource identifier respectively. And requesting material resources, namely requesting the material resources requested by the user terminal through the material resource request information. The resource dependency relationship information is used for representing the material resources on which the corresponding material resources depend. For example, a certain requested material resource is a page component, and the corresponding resource dependency information may be in the form of a list or the like, which includes names of other components (e.g., button components, mark components, etc.) on which the page component depends.
Generally, the second obtaining module 602 may search, according to the at least one material resource identifier, resource detail information in a data storage area (which may be local or remote), where the resource detail information may include a resource dependency relationship table (i.e., resource dependency relationship information), and may also include a resource download address, resource basic description information, and the like.
In this embodiment, the third obtaining module 603 may obtain, based on the resource dependency relationship information, the dependent material resources corresponding to the at least one material resource identifier from the local or the remote. As an example, assuming that the requested resource material resources are A, C, E respectively, it is determined that resource a depends on resource B and resource D according to the resource dependency relationship information, resource C depends on resource D, and resource E does not depend, and the acquired dependent material resources include resource B and resource D.
In this embodiment, the merging module 604 may merge 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.
Specifically, the merging module 604 may directly merge each requested material resource and each corresponding dependent material resource to obtain a material resource set to be sent.
In this embodiment, the first sending module 605 may send the material resource set to be sent to the resource request terminal. Wherein, the resource request end may be the terminal device 101 shown in fig. 1. As an example, when a material resource in a material resource set to be sent is a component required for displaying a web page, after a resource request terminal receives a component set, a browser installed on the resource request terminal may display the received component set in the web page.
Referring to fig. 7, fig. 7 is a schematic structural diagram of a resource request device according to another exemplary embodiment of the present disclosure.
In some alternative implementations, the merging module 604 includes: a duplicate removal unit 6041, configured to perform duplicate removal processing on each acquired request material resource and dependent material resource; a merging unit 6042, configured to merge the request material resource and the dependent material resource after the deduplication processing into a material resource set to be sent.
In some optional implementations, the first sending module 605 includes: a determining unit 6051, configured to determine, based on the resource dependency relationship information, an arrangement order of material resources to be sent in the material resource set to be sent; a sending unit 6052, configured to send the material resource set to be sent to the resource request end based on the arrangement order.
In some optional implementations, the apparatus further comprises: the storage module 606 is configured to store the material resource request information and the material resource set to be sent in a preset storage area in an associated manner.
In some optional implementations, the apparatus further comprises: a receiving module 607, configured to receive initial material resource request information including at least one material resource identifier; a first determining module 608, configured to determine whether a preset storage area includes a material resource set corresponding to pre-cached initial material resource request information; a second determining module 609, configured to determine whether the parameter of the initial material resource request information is legal or not if the parameter of the initial material resource request information is not included; a third determining module 610, configured to determine that the initial material resource request information is material resource request information if the initial material resource request information is legal.
In some optional implementations, the apparatus further comprises: the second sending module 611 is configured to send the material resource set to the resource request end if the material resource set includes the material resource set corresponding to the pre-cached initial material resource request information.
The resource request device provided by the above embodiment of the present disclosure obtains at least one requested material resource by receiving a material resource request, obtains at least one dependent material resource according to the resource dependency relationship information, merges the at least one requested material resource and the at least one dependent material resource to obtain a material resource set to be sent, and sends the material resource set to be sent to the resource request terminal, thereby realizing that a plurality of requested material resources and dependent resources are merged at one time according to a service requirement, improving flexibility and efficiency of the resource request, and further realizing a more flexible, customizable, and self-expandable resource request scheme because the resource dependency relationship information can be flexibly configured.
Exemplary electronic device
Next, an electronic apparatus according to an embodiment of the present disclosure is described with reference to fig. 8. The electronic device may be either or both of the terminal device 101 and the server 103 as shown in fig. 1, or a stand-alone device separate from them, which may communicate with the terminal device 101 and the server 103 to receive the collected input signals therefrom.
FIG. 8 illustrates a block diagram of an electronic device in accordance with an embodiment of the disclosure.
As shown in fig. 8, an electronic device 800 includes one or more processors 801 and memory 802.
The processor 801 may be a Central Processing Unit (CPU) or other form of processing unit having data processing capabilities and/or instruction execution capabilities, and may control other components in the electronic device 800 to perform desired functions.
Memory 802 may include one or more computer program products that may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. Volatile memory can include, for example, Random Access Memory (RAM), cache memory (or the like). The non-volatile memory may include, for example, Read Only Memory (ROM), a hard disk, flash memory, and the like. One or more computer program instructions may be stored on a computer readable storage medium and executed by the processor 801 to implement the resource request feedback methods of the various embodiments of the present disclosure above and/or other desired functionality. Various content such as material dependent resources may also be stored in the computer readable storage medium.
In one example, the electronic device 800 may further include: an input device 803 and an output device 804, which are interconnected by a bus system and/or other form of connection mechanism (not shown).
For example, when the electronic device is the terminal device 101 or the server 103, the input device 803 may be a mouse, a keyboard, a touch screen, or the like, and is used to input the material resource request information. When the electronic device is a stand-alone device, the input device 803 may be a communication network connector for receiving the input material resource request information from the terminal device 101 and the server 103.
The output device 804 may output various information to the outside, including the determined set of resources of the material to be sent. The output devices 804 may include, for example, a display, speakers, a printer, and a communication network and its connected remote output devices, among others.
Of course, for simplicity, only some of the components of the electronic device 800 relevant to the present disclosure are shown in fig. 8, omitting components such as buses, input/output interfaces, and the like. In addition, electronic device 800 may include any other suitable components depending on the particular application.
Exemplary computer program product and computer-readable storage Medium
In addition to the above-described methods and apparatus, embodiments of the present disclosure may also be a computer program product comprising computer program instructions that, when executed by a processor, cause the processor to perform the steps in the resource request feedback method according to various embodiments of the present disclosure described in the "exemplary methods" section above of this specification.
The computer program product may write program code for carrying out operations for embodiments of the present disclosure in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server.
Furthermore, embodiments of the present disclosure may also be a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, cause the processor to perform the steps in the resource request feedback method according to various embodiments of the present disclosure described in the "exemplary methods" section above in this specification.
The computer-readable storage medium may take any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may include, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The foregoing describes the general principles of the present disclosure in conjunction with specific embodiments, however, it is noted that the advantages, effects, etc. mentioned in the present disclosure are merely examples and are not limiting, and they should not be considered essential to the various embodiments of the present disclosure. Furthermore, the foregoing disclosure of specific details is for the purpose of illustration and description and is not intended to be limiting, since the disclosure is not intended to be limited to the specific details so described.
In the present specification, the embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts in the embodiments are referred to each other. For the system embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The block diagrams of devices, apparatuses, systems referred to in this disclosure are only given as illustrative examples and are not intended to require or imply that the connections, arrangements, configurations, etc. must be made in the manner shown in the block diagrams. These devices, apparatuses, devices, systems may be connected, arranged, configured in any manner, as will be appreciated by those skilled in the art. Words such as "including," "comprising," "having," and the like are open-ended words that mean "including, but not limited to," and are used interchangeably therewith. The words "or" and "as used herein mean, and are used interchangeably with, the word" and/or, "unless the context clearly dictates otherwise. The word "such as" is used herein to mean, and is used interchangeably with, the phrase "such as but not limited to".
The methods and apparatus of the present disclosure may be implemented in a number of ways. For example, the methods and apparatus of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above-described order for the steps of the method is for illustration only, and the steps of the method of the present disclosure are not limited to the order specifically described above unless specifically stated otherwise. Further, in some embodiments, the present disclosure may also be embodied as programs recorded in a recording medium, the programs including machine-readable instructions for implementing the methods according to the present disclosure. Thus, the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.
It is also noted that in the devices, apparatuses, and methods of the present disclosure, each component or step can be decomposed and/or recombined. These decompositions and/or recombinations are to be considered equivalents of the present disclosure.
The previous description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other aspects without departing from the scope of the disclosure. Thus, the present disclosure is not intended to be limited to the aspects shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The foregoing description has been presented for purposes of illustration and description. Furthermore, this description is not intended to limit embodiments of the disclosure to the form disclosed herein. While a number of example aspects and embodiments have been discussed above, those of skill in the art will recognize certain variations, modifications, alterations, additions and sub-combinations thereof.

Claims (10)

1. A resource request feedback method comprises the following steps:
acquiring material resource request information comprising at least one material resource identifier;
obtaining request material resources and resource dependency relationship information respectively corresponding to the at least one material resource identifier;
based on the resource dependency relationship information, obtaining dependent material resources corresponding to the at least one material resource identifier respectively;
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;
and sending the material resource set to be sent to a resource request terminal.
2. The method according to claim 1, wherein the merging the obtained at least one request material resource and at least one dependent material resource to obtain a material resource set to be sent includes:
carrying out duplicate removal processing on each acquired request material resource and each acquired dependent material resource;
and combining the request material resources and the dependent material resources after the duplicate removal processing into a material resource set to be sent.
3. The method of claim 1, wherein the sending the set of material resources to be sent to a resource requesting end comprises:
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;
and sending the material resource set to be sent to a resource request terminal based on the arrangement sequence.
4. The method according to claim 1, wherein after the 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 method further comprises:
and storing the material resource request information and the material resource set to be sent to a preset storage area in an associated manner.
5. The method according to one of claims 1 to 4, 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 initial material resource request information cached in advance;
if not, determining whether the parameter of the initial material resource request information is legal or not;
and if the initial material resource request information is legal, determining the initial material resource request information as the material resource request information.
6. The method according to claim 5, wherein after determining whether the preset storage area includes a material resource set corresponding to the initial material resource request information cached in advance, the method further comprises:
and if so, sending the material resource set to the resource request terminal.
7. A resource request feedback apparatus, comprising:
the system comprises a first acquisition module, a second acquisition module and a first management module, wherein the first acquisition module is used for acquiring material resource request information comprising at least one material resource identifier;
the second obtaining module is used for obtaining the request material resource and the resource dependency relationship information corresponding to the at least one material resource identifier respectively;
a third obtaining module, configured to obtain, based on the resource dependency relationship information, dependent material resources corresponding to the at least one material resource identifier respectively;
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;
and the first sending module is used for sending the material resource set to be sent to a resource request terminal.
8. The apparatus of claim 7, wherein the means for merging comprises:
the duplicate removal unit is used for carrying out duplicate removal processing on each acquired request material resource and each acquired dependent material resource;
and the merging unit is used for merging the request material resources and the dependent material resources subjected to the duplicate removal processing into a material resource set to be sent.
9. A computer-readable storage medium, the storage medium storing a computer program for performing the method of any of the preceding claims 1-6.
10. 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 one of claims 1-6.
CN202110661831.3A 2021-06-15 2021-06-15 Resource request feedback method and device, readable storage medium and electronic equipment Pending CN113407339A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110661831.3A CN113407339A (en) 2021-06-15 2021-06-15 Resource request feedback method and device, readable storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110661831.3A CN113407339A (en) 2021-06-15 2021-06-15 Resource request feedback method and device, readable storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN113407339A true CN113407339A (en) 2021-09-17

Family

ID=77684185

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110661831.3A Pending CN113407339A (en) 2021-06-15 2021-06-15 Resource request feedback method and device, readable storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN113407339A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114374650A (en) * 2022-01-05 2022-04-19 北京理房通支付科技有限公司 Notification sending method based on routing middleware, storage medium and electronic equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114374650A (en) * 2022-01-05 2022-04-19 北京理房通支付科技有限公司 Notification sending method based on routing middleware, storage medium and electronic equipment
CN114374650B (en) * 2022-01-05 2024-02-13 北京理房通支付科技有限公司 Notification sending method based on routing middleware, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
CN105787077B (en) Data synchronization method and device
CN111291103B (en) Interface data analysis method and device, electronic equipment and storage medium
US20170109371A1 (en) Method and Apparatus for Processing File in a Distributed System
CN107302597B (en) Message file pushing method and device
CN109992719B (en) Method and apparatus for determining push priority information
CN110650209A (en) Method and device for realizing load balance
CN111010453B (en) Service request processing method, system, electronic device and computer readable medium
CN111427899A (en) Method, device, equipment and computer readable medium for storing file
CN110119418B (en) Data export method and device
CN113407339A (en) Resource request feedback method and device, readable storage medium and electronic equipment
CN113422808A (en) Internet of things platform HTTP information pushing method, system, device and medium
CN110505289B (en) File downloading method and device, computer readable medium and wireless communication equipment
CN107045452B (en) Virtual machine scheduling method and device
CN115103015B (en) Data pushing method and device, electronic equipment and computer readable medium
CN112990991A (en) Method and device for merging invoices
CN110858240A (en) Front-end module loading method and device
CN115495658A (en) Data processing method and device
CN111460020B (en) Method, device, electronic equipment and medium for resolving message
CN110597802B (en) Message processing method and device
CN109803017B (en) File intercommunication method and device, computing equipment and computer readable storage medium
CN112069771A (en) Method and device for analyzing pictures in PDF (Portable document Format) file
CN112785358A (en) Order fulfillment merchant access method and device
CN115277694B (en) Data acquisition method, device, system, electronic equipment and storage medium
CN113765868B (en) Service processing method and device
CN113467909B (en) Time consuming method and apparatus for compressing concurrent requests

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20211227

Address after: Unit 05, room 112, 1st floor, office building, Nangang Industrial Zone, economic and Technological Development Zone, Binhai New Area, Tianjin 300457

Applicant after: BEIKE TECHNOLOGY Co.,Ltd.

Address before: 101300 room 24, 62 Farm Road, Erjie village, Yangzhen Town, Shunyi District, Beijing

Applicant before: Beijing fangjianghu Technology Co.,Ltd.