Resource searching method, resource loading method, equipment and readable medium

By dynamically searching and selecting appropriate image resources on the server side based on the client's attribute information, the problem of resource waste and loading time extension caused by the fixed size and path of resources in the existing technology is solved, achieving more efficient resource loading and improving user experience. .

CN119337012APending Publication Date: 2025-01-21SHANGHAI BILIBILI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411413406.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-10
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

In the prior art, image resources are usually provided in fixed paths and sizes, and cannot dynamically adapt to the client's screen specifications and network conditions, resulting in waste of resources and extended loading time, affecting the user experience.

Method used

By implementing resource search methods on the server side, according to the client's attribute information (such as screen resolution, network status, etc.) dynamically search and select appropriate resources to generate resource search response and return to the client. After the client receives the response, analyze and load the target resources to the resource display interface.

Benefits of technology

It realizes dynamic selection of resources according to the actual conditions of the client, reduces resource waste, improves resource loading speed, and significantly improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119337012A_ABST
    Figure CN119337012A_ABST
Patent Text Reader

Abstract

The invention provides a resource searching method, a resource loading method, equipment and a readable storage medium, and the resource searching method comprises the following steps: obtaining attribute information of a client in response to a resource searching request sent by the client; searching and determining a target resource based on the attribute information of the client; and generating a resource search response based on the target resource according to a preset response information generation rule, and returning the resource search response to the client.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to a resource search method, a resource loading method, a device and a readable storage medium. Background Art

[0002] This section is intended to provide a background or context to the embodiments of the application that are recited in the claims. The description herein is not admitted to be prior art by inclusion in this section.

[0003] In traditional Internet technology, when a user visits a web page containing images or uses related applications, the client, such as a web browser or mobile application, will parse the code to identify the image resources that need to be loaded; if the image is not in the local cache or the cache has expired, the client will send a request to the server via the HTTP or HTTPS protocol, which contains the URL of the image; the server locates the image file based on the URL, reads the file through the web server software, and encapsulates it in an HTTP response and sends it back to the client together with the necessary metadata; after receiving the response, the client will parse and display the image and may also cache the image for subsequent quick access.

[0004] In the prior art, image resources are usually provided in a fixed path and size, and their size and resolution are fixed. However, with the rapid development of mobile terminals and Internet technologies, the screen specifications of mobile devices are becoming more and more diverse, and the differences between different network conditions are becoming increasingly large. The design strategy of fixed resource paths and sizes is particularly inappropriate. For example, loading high-resolution images on low-resolution devices will lead to resource waste, while loading large-size images on devices in a low-speed network environment will significantly prolong the loading time, affecting the user experience.

[0005] Therefore, there is an urgent need to propose a resource search method, resource loading method, device and readable storage medium that can dynamically select resources for loading according to the actual conditions of the client. Summary of the invention

[0006] Multiple aspects of the present application provide a resource search method, a resource loading method, a device and a readable storage medium to dynamically select appropriate resources according to actual conditions of the client.

[0007] One aspect of the present application provides a resource search method, which is applied to a server and includes:

[0008] In response to a resource search request sent by a client, acquiring attribute information of the client;

[0009] Based on the attribute information of the client, searching and determining the target resource;

[0010] According to a preset response information generation rule, a resource search response is generated based on the target resource, and the resource search response is returned to the client.

[0011] Furthermore, based on the attribute information of the client, the target resource is searched and determined, including: based on the attribute information of the client, obtaining the resource information to be searched and the software and hardware information of the client; based on the resource information to be searched and the software and hardware information of the client, searching and determining the target resource from a preset resource pool.

[0012] Furthermore, based on the resource information to be searched and the software and hardware information of the client, the target resource is searched and determined from a preset resource pool, including: based on the resource information to be searched, the initial resource is searched and determined from a preset resource pool; based on the software and hardware information of the client, the initial resource is processed to generate the target resource.

[0013] Furthermore, based on the resource information to be searched and the hardware and software information of the client, the target resource is searched and determined from a preset resource pool, including: inputting the resource to be searched and the hardware and software information of the client into a pre-trained target resource search model, and determining that the resource output by the target resource training model is the target resource.

[0014] Furthermore, according to preset response information generation rules, a resource search response is generated based on the target resource, and the resource search response is returned to the client, including: obtaining the uniform resource locator of the target resource and its path information; generating a resource search response based on the uniform resource locator of the target resource and its path information, and returning the resource search response to the client.

[0015] Furthermore, according to preset response information generation rules, a resource search response is generated based on the target resource, and the resource search response is returned to the client, including: based on the uniform resource locator of the target resource and its format; generating a response header of the resource search response based on the format of the target resource; generating a response entity of the resource search response based on the uniform resource locator of the target resource; generating the resource search response based on the response header and the response entity, and returning the resource search response to the client.

[0016] Furthermore, according to a preset response information generation rule, a resource search response is generated based on the target resource, and the resource search response is returned to the client, including: naming the target resource and uploading the target resource to an edge server; determining the edge server with the shortest path to the client as the target edge server, and sending the uniform resource locator of the target resource in the target edge server; generating the resource search response based on the uniform resource locator of the target resource, and returning the resource search response to the client.

[0017] On the other hand, the present application also provides a resource loading method, which is applied to a client to load a target resource generated by the resource generation method as described above, and the method includes: parsing a resource search response returned by the server to obtain the target resource; and loading the target resource to the resource display interface of the client.

[0018] In another aspect of the present application, a resource search device is provided, characterized in that the device comprises:

[0019] A response unit, configured to obtain attribute information of the client in response to a resource search request sent by the client;

[0020] A generating unit, configured to search and determine a target resource based on the attribute information of the client;

[0021] The returning unit is used to generate a resource search response based on the target resource according to a preset response information generation rule, and return the resource search response to the client.

[0022] In another aspect of the present application, the present application provides a resource loading device, the device is used to load the target resource generated by the resource search device as described above, the device comprising:

[0023] A parsing unit, used to parse the resource search response returned by the server to obtain the target resource;

[0024] A loading unit is used to load the target resource to the resource display interface of the client.

[0025] Another aspect of the present application provides an electronic device, the device comprising:

[0026] at least one processor; and

[0027] a memory communicatively connected to the at least one processor; wherein,

[0028] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the resource search method and resource loading method as described above.

[0029] In another aspect of the present application, a readable storage medium is provided, on which computer program instructions are stored, and the computer program instructions can be executed by a processor to implement the resource searching method and the resource loading method.

[0030] In another aspect of the present application, a computer program product is provided, including a computer program, wherein the computer program implements the resource search method and the resource loading method when executed by a processor.

[0031] Compared with the prior art, the resource search method described in the present application not only considers the hardware differences between clients (such as the resolution of the resource display interface and the network status of the client), but also considers the software status differences between clients (such as operating system information, compatibility information, kernel and rendering engine and other multi-dimensional factors), and comprehensively evaluates the client from multiple aspects, multiple angles and multiple levels to accurately and efficiently evaluate the user's resource display conditions;

[0032] Furthermore, based on the resource search method described in the present application, resources are selected in a targeted manner according to the objective conditions of the client to enhance the user's browsing experience.

[0033] In summary, the resource search method described in this application can significantly reduce resource waste, increase the loading speed of the client's resource display interface, especially when the client's software and hardware are in poor condition, thereby achieving the technical effect of significantly improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present application, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0035] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:

[0036] Figure 1 A schematic diagram of a process flow of a resource search method provided in an embodiment of the present application;

[0037] Figure 2 A schematic diagram of a resource loading method according to an embodiment of the present invention;

[0038] Figure 3 A schematic diagram of a process of generating a resource search response according to a preset response information generation rule in a resource loading method provided in Embodiment 1 of the present application;

[0039] Figure 4 A schematic diagram of a process for generating a resource search response according to a preset response information generation rule in a resource loading method provided in Embodiment 2 of the present application;

[0040] Figure 5 A schematic diagram of a process for generating a resource search response according to a preset response information generation rule in a resource loading method provided in Embodiment 3 of the present application;

[0041] Figure 6 A schematic diagram of a process for generating a resource search response according to a preset response information generation rule in a resource loading method provided in Embodiment 4 of the present application;

[0042] Figure 7 A schematic diagram of the structure of a resource search device provided in Example 5;

[0043] Figure 8 A schematic diagram of the structure of a resource loading device provided in Example 6;

[0044] Fig. 9 A schematic diagram of the structure of an electronic device suitable for implementing the solution in the embodiments of the present application;

[0045] The same or similar reference numerals in the drawings represent the same or similar components. DETAILED DESCRIPTION

[0046] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0047] In a typical configuration of the present application, the terminal and the equipment of the service network each include one or more processors (CPU), input / output interface, network interface and memory.

[0048] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0049] Computer readable media include permanent and non-permanent, removable and non-removable media, and can be implemented by any method or technology to store information. Information can be computer program instructions, data structures, modules of programs or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.

[0050] like Figure 1 The embodiment of the present application provides a resource search method, which is applied to a server and includes:

[0051] Step S101: In response to a resource search request sent by a client, obtain attribute information of the client;

[0052] Step S102: searching and determining target resources based on the attribute information of the client;

[0053] Step S103: Generate a resource search response based on the target resource according to a preset response information generation rule, and return the resource search response to the client.

[0054] In actual scenarios, the execution subject of the method can be a user device, or a device formed by integrating a user device and a network device through a network, or an application running on the above device. The user device includes but is not limited to various terminal devices such as computers, mobile phones, tablet computers, smart watches, and bracelets. The network device includes but is not limited to network hosts, single network servers, multiple network server sets, or cloud computing-based computer sets, which can be used to implement some processing functions when setting an alarm. Here, the cloud is composed of a large number of hosts or network servers based on cloud computing, where cloud computing is a type of distributed computing, a virtual computer composed of a group of loosely coupled computer sets.

[0055] Embodiment 1

[0056] like Figure 2 This embodiment provides a resource loading method, which is implemented based on JavaScript and includes:

[0057] Step S201, parsing the resource search response returned by the server to obtain the target resource, the resource search response corresponding to the resource search request, and generated according to a preset resource search response generation rule;

[0058] Step S202: Load the target resource to the resource display interface of the client.

[0059] like Figure 3 In one of the embodiments shown, generating a resource search response according to a preset response information generation rule includes:

[0060] Step S301, the server responds to the resource search request sent by the client and obtains the attribute information of the client;

[0061] Step S302, the server obtains the resource information to be searched and the software and hardware information of the client based on the attribute information of the client;

[0062] Step S303, based on the to-be-searched resource information and the software and hardware information of the client, searching and determining the target resource from a preset resource pool;

[0063] Step S304: the server generates a resource search response based on the target resource according to a preset response information generation rule, and returns the resource search response to the client.

[0064] In one of the embodiments, a resource search response is generated based on the target resource according to a preset response information generation rule, and the resource search response is returned to the client, including: obtaining the uniform resource locator of the target resource and its path information; generating a resource search response based on the uniform resource locator of the target resource and its path information, and returning the resource search response to the client.

[0065] Specifically, the resource search response is a JSON structure; for example, if the uniform resource locator of the target resource is "image_url" and the path information is "http: / / examp.com / path / to / image.jpg", then the resource search response is "{"image_url":"http: / / examp.com / path / to / image.jpg"}".

[0066] / / examp.com / path / to / image.jpg”}”.

[0067] In one embodiment, the method further includes: the client generates a resource search request. Specifically, the client generates the resource search request, including: using JavaScript to access the API provided by the browser to obtain the client's software and hardware information; based on the resource information to be searched and the client's software and hardware information, generating a resource search request and sending it to the server.

[0068] Specifically, JavaScript is used to access the API provided by the browser to obtain the software and hardware information of the client, including: using window.screen and navigator.connection to obtain the resolution of the resource display interface of the client and the network speed of the client.

[0069] Specifically, based on the resource information to be searched and the software and hardware information of the client, a resource search request is generated and sent to the server, including: using a fetch or XMLHttpRequest object to create an asynchronous request, and sending the resource search request generated based on the resource information to be searched and the software and hardware information of the client to the server. The resource search request is in the form of AJAX; the resource search request includes "{resolution:'1920x1080'.speed:'10mbps"}".

[0070] In one embodiment, recording the target resource to the resource display interface of the client includes: using JavaScript to create a new element or modify the resource search response The src attribute of the element to load the uniform resource locator of the target resource returned by the server.

[0071] In one of the embodiments, the method further includes: setting a load time to monitor resource loading progress; and displaying the target resource to a resource display interface of the client after the target resource is loaded, so as to improve the user experience.

[0072] Based on the resource loading method described in this embodiment, the server can intelligently adapt to the software and hardware information of different clients, provide the best target resource loading experience, and reduce unnecessary resource transmission and waiting time.

[0073] Embodiment 2

[0074] like Figure 2 This embodiment provides a resource loading method, which includes:

[0075] Step S201, the client parses the resource search response returned by the server to obtain the target resource, the resource search response corresponds to the resource search request and is generated according to a preset response information generation rule;

[0076] Step S202: The client loads the target resource to the resource display interface of the client.

[0077] In one implementation, the resource search request is generated by the client, and the generation rules of the resource search request include: using JavaScript API to obtain the client's hardware and software information; the client encapsulates the resource information to be searched and its hardware and software information into a resource search request in http format, and uses fetch or XMLHttpRequest to send the resource search request to the server.

[0078] Among them, the client's software and hardware information includes but is not limited to the resolution of the client's resource display interface and the client's network status; specifically, the resolution of the client's resource display interface (i.e., X-Screen-Resolution) is obtained through window.screen, and the client's network status is obtained through navigator.connection (i.e., X-Connection.Speed).

[0079] Furthermore, the client encapsulates the resolution of the resource display interface of the client and the network status of the client into a resource search request in http format such as {X-Screen-Resolution:1920*1080; X-Connection.Speed:10Mbps;}.

[0080] like Figure 4 In one of the embodiments shown, generating a resource search response according to a preset response information generation rule includes:

[0081] Step S401, the server obtains attribute information of the client in response to a resource search request sent by the client;

[0082] Step S402, the server obtains the resource information to be searched and the software and hardware information of the client based on the attribute information of the client;

[0083] Step S403, based on the resource information to be searched, searching and determining the target resource from the preset resource pool;

[0084] Step S404: Generate a resource response search based on the target resource according to a preset response information generation rule, and return the resource search response to the client.

[0085] The server obtains the resource information to be searched and the software and hardware information of the client based on the attribute information of the client, including: the server parses the http request to obtain X-Screen-Resolution and X-Connection.Speed.

[0086] In one implementation manner, based on the resource information to be searched, the target resource is searched and determined from a preset resource pool, including: the server selects a resource of a suitable size according to X-Screen-Resolution; the server selects a resource of appropriate quality and size according to X-Connection.Speed.

[0087] For example, for a high-resolution resource display interface, high-resolution resources are determined as target resources, and for a low-resolution resource display interface, low-resolution resources are determined as target resources; for a client with a high network speed, uncompressed or slightly compressed resources are determined as target resources, and for a client with a low network speed, highly compressed or specially formatted resources are determined as target resources (when the target resource is a picture, a picture in webp format can be selected as the target picture).

[0088] In one embodiment, the response information generation rule includes: the server generates a resource search response in HTML format based on the uniform resource locator of the target resource and its format; wherein the resource search response The src attribute of the element indicates the uniform resource locator of the resource; the Content-Type of the response header of the resource search response indicates the format of the resource.

[0089] In one embodiment, the client loads the target resource to the resource display interface of the client, including: the client parses the resource search response in HTML format returned by the server, obtains the resource search response The src attribute of the element is used to obtain the target resource; the target resource is loaded and displayed on the resource display interface of the client.

[0090] Based on the resource loading method described in this embodiment, the server can provide the best resources according to the client's software and hardware information, thereby improving user experience and website performance; the resource loading method proposed in this embodiment is particularly effective in responsive design and performance optimization.

[0091] Embodiment 3

[0092] like Figure 2 This embodiment provides a resource loading method, which includes:

[0093] Step S201, the client parses the resource search response returned by the server to obtain the target resource, the resource search response corresponds to the resource search request and is generated according to a preset response information generation rule;

[0094] Step S202: The client loads the target resource to the resource display interface of the client.

[0095] In one implementation mode, a resource search request is generated by a client, and the generation rules of the resource search request include: using JavaScript or native API to obtain the client's hardware and software information; the client encapsulates the resource information to be searched and its hardware and software information into a resource search request, and uses libraries such as fetch or axios to send the resource search request to the server.

[0096] Among them, the client's software and hardware information includes but is not limited to the resolution, DPI, color depth, device pixel ratio, network connection type, network speed and network connection stability of the resource display interface.

[0097] like Figure 5 In one embodiment, the server includes a cloud server and an edge server; generating a resource search response according to a preset response information generation rule includes:

[0098] Step S501, the cloud server monitors the resource search request sent by the client and obtains the attribute information of the client;

[0099] Step S502, the cloud server obtains the resource information to be searched and the software and hardware information of the client based on the attribute information of the client;

[0100] Step S503: based on the information of the resources to be searched, searching and determining the initial resources from the preset resource pool; and generating the target resources based on the initial resources.

[0101] Specifically, the cloud server listens to a specific HTTP endpoint; when a resource search request is received from a client, the cloud function of the cloud server parses the resource search request to obtain the client's software and hardware information and the information of the resources to be searched; the cloud server determines the initial resources from the preset resource pool according to the information to be searched sent by the client; the cloud server processes the initial resources according to the client's software and hardware information to determine the target resources.

[0102] Specifically, the cloud server processes the initial resources according to the software and hardware information of the client, including: the cloud function of the cloud server uses the image processing library to dynamically adjust the size and compression quality of the resources according to the resolution of the client's resource display interface and network conditions. It should be understood that the cloud server processes the initial resources according to the software and hardware information of the client, including but not limited to adjusting the size of the resources, changing the format of the resources, lossless or lossy compression, color space conversion, etc. When the resource is a picture, changing the format of the resource includes but is not limited to converting the jpeg format to the webp format to reduce the file size without significantly reducing the visual quality.

[0103] In one of the embodiments, after the target resource is generated based on the initial resource in the response information generation rule, it also includes: the cloud server is integrated with the CDN to automatically copy the target resource to edge servers around the world. The CDN selects the path / nearest edge server based on the client's geographic location to provide resources to the client to minimize latency and increase resource loading speed.

[0104] In one embodiment, the client loads the target resource to the resource display interface of the client, including: parsing the resource search response returned by the cloud function of the cloud server to obtain the CDN URL of the target resource; using Tag or target resource loading API loads the target resource corresponding to the CDN URL.

[0105] Based on the resource loading method described in this embodiment, since the target resource loaded by the client has been optimized, the resource loading speed of the client is faster and the display effect is better.

[0106] Embodiment 4

[0107] like Figure 2 This embodiment provides a resource loading method, which includes:

[0108] Step S201, the client parses the resource search response returned by the server to obtain the target resource, the resource search response corresponds to the resource search request and is generated according to a preset response information generation rule;

[0109] Step S202: The client loads the target resource to the resource display interface of the client.

[0110] like Figure 6 In one of the embodiments shown, generating a resource search response according to a preset response information generation rule includes:

[0111] Step S601, the server obtains attribute information of the client in response to a resource search request sent by the client;

[0112] Step S602, the server obtains the resource information to be searched and the software and hardware information of the client based on the attribute information of the client;

[0113] Step S603, sending the resource information to be searched and the client's hardware and software information to a preset target resource determination model to obtain the target resource;

[0114] Step S604: Generate a resource search response based on the target resource, and return the resource search response to the client.

[0115] In one embodiment, the method for generating a preset target resource determination model includes: collecting the attribute information of the client as training data of the target resource determination model, and determining to obtain the target resource preferred by the client under specific conditions (i.e., the condition that the attribute information of the client has been determined). It should be understood that in the process of target resource determination, the attributes of the client and the target resource determined according to the attribute information of the client can also be used as training data to cyclically and continuously train the target resource determination model and continuously optimize the target resource determination strategy.

[0116] Among them, the client's attribute information includes but is not limited to the resolution, DPI, color depth, device pixel ratio, network connection type, network speed and network connection stability of the resource display interface.

[0117] Based on the resource loading method described in this embodiment, the preset target resource determination model is continuously trained to continuously optimize the target resource determination strategy, ensure the accuracy of the target resources returned by the server to the client, and realize personalized selection of resources.

[0118] It should be understood that the resources described in this application include but are not limited to static images, dynamic images and videos.

[0119] Embodiment 5

[0120] Figure 7 A resource search device provided in an embodiment of the present application is shown, the device comprising:

[0121] A response unit, configured to obtain attribute information of the client in response to a resource search request sent by the client;

[0122] A generating unit, configured to search and determine a target resource based on the attribute information of the client;

[0123] The returning unit is used to generate a resource search response based on the target resource according to a preset response information generation rule, and return the resource search response to the client.

[0124] Embodiment 6

[0125] Figure 8 A resource loading device provided in an embodiment of the present application is shown, and the device is used to load the target resource generated by the resource search device as described in the fifth embodiment, and the device includes:

[0126] A parsing unit, used to parse the resource search response returned by the server to obtain the target resource;

[0127] A loading unit is used to load the target resource to the resource display interface of the client.

[0128] Embodiment 7

[0129] Based on the same inventive concept, an electronic device is also provided in an embodiment of the present application, and the method corresponding to the electronic device may be the resource search method and resource loading method in the aforementioned embodiment, and its principle of solving the problem is similar to that of the method. The electronic device provided in an embodiment of the present application includes: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the methods and / or technical solutions of the aforementioned multiple embodiments of the present application.

[0130] The electronic device may be a user device, or a device formed by integrating a user device and a network device through a network, or may be an application running on the above device. The user device includes but is not limited to various terminal devices such as computers, mobile phones, tablet computers, smart watches, and bracelets. The network device includes but is not limited to network hosts, single network servers, multiple network server sets, or cloud computing-based computer sets, which can be used to implement some processing functions when setting an alarm. Here, the cloud is composed of a large number of hosts or network servers based on cloud computing, where cloud computing is a type of distributed computing, a virtual computer composed of a group of loosely coupled computer sets.

[0131] Fig. 9 The structure of an electronic device suitable for implementing the method and / or technical solution in the embodiment of the present application is shown, and the device 900 includes a central processing unit (CPU, Central Processing Unit) 901, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM, Read Only Memory) 902 or the program loaded from the storage part 908 to the random access memory (RAM, Random Access Memory) 903. In RAM903, various programs and data required for system operation are also stored. CPU 901, ROM 902 and RAM 903 are connected to each other through a bus 904. Input / output (I / O, Input / Output) interface 905 is also connected to bus 904.

[0132] The following components are connected to the I / O interface 905: an input section 906 including a keyboard, a mouse, a touch screen, a microphone, an infrared sensor, etc.; an output section 907 including a cathode ray tube (CRT), a liquid crystal display (LCD), an LED display, an OLED display, etc., and a speaker, etc.; a storage section 908 including one or more computer-readable media such as a hard disk, an optical disk, a magnetic disk, a semiconductor memory, etc.; and a communication section 909 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 909 performs communication processing via a network such as the Internet.

[0133] In particular, the methods and / or embodiments in the embodiments of the present application may be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program code for executing the method shown in the flowchart. When the computer program is executed by the central processing unit (CPU) 901, the above functions defined in the method of the present application are executed.

[0134] Embodiment 8

[0135] Another embodiment of the present application further provides a readable storage medium having computer program instructions stored thereon, wherein the computer program instructions can be executed by a processor to implement the methods and / or technical solutions of any one or more embodiments of the present application described above.

[0136] Specifically, the present embodiment can adopt any combination of one or more computer-readable media. Computer-readable media can be computer-readable signal media or readable storage media. Readable storage media can be, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: electrical connections with one or more wires, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this document, readable storage media can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.

[0137] Computer readable signal media may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer readable program code. Such propagated data signals may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, device, or device.

[0138] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0139] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0140] The flow chart or block diagram in the accompanying drawings shows the possible architecture, function and operation of the equipment, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated system for hardware that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0141] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0142] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or page components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0143] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0144] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0145] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program codes.

[0146] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

[0147] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in a device claim can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.

Claims

1. A resource search method, characterized in that: The method is applied to a server, and the method comprises: In response to a resource search request sent by a client, acquiring attribute information of the client; Based on the attribute information of the client, searching and determining the target resource; According to a preset response information generation rule, a resource search response is generated based on the target resource, and the resource search response is returned to the client.

2. The resource search method according to claim 1, characterized in that: Searching and determining a target resource based on the attribute information of the client includes: Based on the attribute information of the client, obtaining the resource information to be searched and the software and hardware information of the client; Based on the information of the resources to be searched and the software and hardware information of the client, the target resource is searched and determined from a preset resource pool.

3. The resource search method according to claim 2, characterized in that: Based on the resource information to be searched and the software and hardware information of the client, searching and determining the target resource from a preset resource pool includes: Based on the resource information to be searched, searching and determining initial resources from a preset resource pool; Based on the software and hardware information of the client, the initial resources are processed to generate target resources.

4. The resource search method according to claim 2, characterized in that: Based on the resource information to be searched and the software and hardware information of the client, searching and determining the target resource from a preset resource pool includes: The resources to be searched and the software and hardware information of the client are input into a pre-trained target resource search model, and the resource output by the target resource training model is determined to be the target resource.

5. The resource search method according to any one of claims 1 to 4, characterized in that: Generating a resource search response based on the target resource according to a preset response information generation rule, and returning the resource search response to the client, including: Obtaining the uniform resource locator and path information of the target resource; Based on the uniform resource locator of the target resource and its path information, a resource search response is generated, and the resource search response is returned to the client.

6. The resource search method according to any one of claims 1 to 4, characterized in that: Generating a resource search response based on the target resource according to a preset response information generation rule, and returning the resource search response to the client, including: Based on the uniform resource locator of the target resource and its format; generating a response header of the resource search response based on a format of the target resource; Generate a response entity of the resource search response based on the uniform resource locator of the target resource; Based on the response header and the response entity, the resource search response is generated, and the resource search response is returned to the client.

7. The resource generation method according to claims 1 to 4, characterized in that: Generating a resource search response based on the target resource according to a preset response information generation rule, and returning the resource search response to the client, including: Naming the target resource and uploading the target resource to the edge server; Determine an edge server with the shortest path to the client as a target edge server, and send a uniform resource locator of a target resource in the target edge server; The resource search response is generated based on the uniform resource locator of the target resource, and the resource search response is returned to the client.

8. A resource loading method, characterized in that: The method is applied to a client to load a target resource generated by the resource generation method according to any one of claims 1 to 7, and the method comprises: Parsing the resource search response returned by the server to obtain the target resource; The target resource is loaded into the resource display interface of the client.

9. A resource search device, characterized in that: The device comprises: A response unit, configured to obtain attribute information of the client in response to a resource search request sent by the client; A generating unit, configured to search and determine a target resource based on the attribute information of the client; The returning unit is used to generate a resource search response based on the target resource according to a preset response information generation rule, and return the resource search response to the client.

10. A resource loading device, characterized in that: The device is used to load the target resource generated by the resource search device according to claim 9, and the device includes: A parsing unit, used to parse the resource search response returned by the server to obtain the target resource; A loading unit is used to load the target resource to the resource display interface of the client.

11. An electronic device, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 6.

12. A computer readable medium having computer program instructions stored thereon, wherein the computer program instructions can be executed by a processor to implement the method according to any one of claims 1 to 8.

13. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.