[go: up one dir, main page]

CN113050984A - Resource calling method and device, electronic equipment and storage medium - Google Patents

Resource calling method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113050984A
CN113050984A CN202110328314.4A CN202110328314A CN113050984A CN 113050984 A CN113050984 A CN 113050984A CN 202110328314 A CN202110328314 A CN 202110328314A CN 113050984 A CN113050984 A CN 113050984A
Authority
CN
China
Prior art keywords
target
dependent resource
dependent
resource
identifier
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
CN202110328314.4A
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.)
Guahao Net Hangzhou Technology Co Ltd
Original Assignee
Guahao Net Hangzhou 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 Guahao Net Hangzhou Technology Co Ltd filed Critical Guahao Net Hangzhou Technology Co Ltd
Priority to CN202110328314.4A priority Critical patent/CN113050984A/en
Publication of CN113050984A publication Critical patent/CN113050984A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/54Interprogram communication
    • G06F9/544Buffers; Shared memory; Pipes

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

本发明实施例公开了一种资源调取方法、装置、电子设备及存储介质,所述方法包括:当接收到依赖资源调取请求时,确定与所述依赖资源调取请求相对应的目标依赖资源标识;如果所述目标缓存中不包括与所述目标依赖资源标识相对应的目标依赖资源时,确定与所述目标依赖资源标识相对应的目标依赖资源暂存服务器,并将所述依赖资源调取请求发送至所述目标依赖资源暂存服务器;接收所述目标依赖资源暂存服务器反馈的与所述依赖资源调取请求相对应的目标依赖资源;其中,依赖资源为当前项目开发和/或打包所使用的资源,实现了从目标依赖资源暂存服务器中调取目标依赖资源,不需要在项目开发前对依赖资源进行下载、存储以及维护,减轻了本地内存的负担。

Figure 202110328314

Embodiments of the present invention disclose a method, apparatus, electronic device and storage medium for resource retrieval. The method includes: when a dependent resource retrieval request is received, determining a target dependency corresponding to the dependent resource retrieval request Resource identifier; if the target cache does not include the target dependent resource corresponding to the target dependent resource identifier, determine the target dependent resource temporary storage server corresponding to the target dependent resource identifier, and store the dependent resource Sending a retrieval request to the target-dependent resource staging server; receiving the target-dependent resource corresponding to the dependent resource retrieving request fed back by the target-dependent resource staging server; wherein, the dependent resource is the current project development and/or Or package the used resources, realize the retrieval of target dependent resources from the target dependent resource temporary storage server, and do not need to download, store and maintain the dependent resources before project development, reducing the burden of local memory.

Figure 202110328314

Description

Resource calling method and device, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of software development, in particular to a resource calling method and device, electronic equipment and a storage medium.
Background
At present, all the dependency packages which may be used need to be downloaded in advance in the project development stage and stored locally, which has the problem of occupying local memory. Further, in the process of project development, the dependent packages need to be maintained continuously locally, and project maintenance cost is increased.
Thirdly, if the period of project development is long, the dependency package stored locally already has an optimized version, and the dependency package occupies an important position in the project, and at this time, calling the local dependency package may cause failure of project development.
Disclosure of Invention
The embodiment of the invention provides a resource calling method and device, electronic equipment and a storage medium, which are used for calling target dependent resources from a server in a project development stage and reducing the burden of a local memory.
In a first aspect, an embodiment of the present invention provides a resource invoking method, where the method includes:
when a dependent resource calling request is received, determining a target dependent resource identifier corresponding to the dependent resource calling request;
if the target cache does not comprise the target dependent resource corresponding to the target dependent resource identifier, determining a target dependent resource temporary storage server corresponding to the target dependent resource identifier, and sending the dependent resource calling request to the target dependent resource temporary storage server;
receiving the target dependent resources corresponding to the dependent resource calling request fed back by the target dependent resource temporary storage server;
wherein the dependent resources are resources used by the current project development and/or packaging.
In a second aspect, an embodiment of the present invention further provides a resource invoking device, where the device includes:
the target dependent resource identifier calling module is used for determining a target dependent resource identifier corresponding to the dependent resource calling request when the dependent resource calling request is received;
a target dependent resource temporary storage server determining module, configured to determine a target dependent resource temporary storage server corresponding to the target dependent resource identifier if the target cache does not include the target dependent resource corresponding to the target dependent resource identifier, and send the dependent resource invoking request to the target dependent resource temporary storage server;
the first target dependent resource calling module is used for receiving the target dependent resource corresponding to the dependent resource calling request fed back by the target dependent resource temporary storage server; wherein the dependent resources are resources used by the current project development and/or packaging.
In a third aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the resource calling method according to any one of the embodiments of the present invention.
In a fourth aspect, the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform the resource invoking method according to any one of the embodiments of the present invention.
According to the technical scheme of the embodiment of the invention, when the dependent resource calling request is received, the target dependent resource identifier corresponding to the dependent resource calling request is determined, whether the target dependent resource corresponding to the target dependent resource identifier is stored in the target cache is judged, if not, the target dependent resource temporary storage server corresponding to the target dependent resource identifier is determined, and the dependent resource calling request is sent to the target dependent resource temporary storage server. And receiving the target dependent resources fed back by the target dependent resource temporary storage server. According to the technical scheme of the embodiment of the invention, the corresponding dependent resources are pertinently called from the resource temporary storage server corresponding to the dependent resources in the project development process, and the problems that all the dependent resources are required to be downloaded, stored and maintained in advance before the project development and the local memory load is increased are solved.
Drawings
In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, a brief description is given below of the drawings used in describing the embodiments. It should be clear that the described figures are only views of some of the embodiments of the invention to be described, not all, and that for a person skilled in the art, other figures can be derived from these figures without inventive effort.
Fig. 1 is a schematic flowchart of a resource scheduling method according to a first embodiment of the present invention;
fig. 2 is a flowchart illustrating a resource scheduling method according to a second embodiment of the present invention;
fig. 3 is a schematic diagram of a resource scheduling method according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a resource scheduling apparatus according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device in a fifth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart of a resource invoking method according to an embodiment of the present invention, where the embodiment is applicable to a situation where a dependent resource package is invoked during a project development process, and the method may be executed by a resource invoking device, and the device may be implemented in a form of software and/or hardware.
Before explaining the technical solution of the embodiment of the present invention, an application scenario of the embodiment of the present invention is first exemplarily explained: the embodiment of the invention refers to the method for calling the dependent resources in the process of project development or packaging, and particularly, the effect of reducing the occupation amount of the local memory is achieved by calling the dependent resources from the dependent resource temporary storage server.
As shown in fig. 1, the resource scheduling method according to the embodiment of the present invention specifically includes the following steps:
s110, when a dependent resource calling request is received, determining a target dependent resource identifier corresponding to the dependent resource calling request.
The dependent resource calling request refers to a request for calling one or more dependent resources. Dependent resources are resources that are used by the current project development and/or packaging. For example, Errors in the project (error handling library) may be handled and annotated. It should be noted that the dependent resource in the embodiment of the present invention may be understood as a dependent package. The target dependent resource refers to a dependent resource that needs to be called. The target dependent resource identification is an identification that distinguishes the target dependent resource from other dependent resources. The representation form of the target dependent resource identifier may be an icon, a character, and the like.
Specifically, when a dependent resource calling request sent by a client is received, a target dependent resource identifier corresponding to the dependent resource calling request is determined to distinguish a target dependent resource from other dependent resources, and preparation is made for subsequent acquisition of the target dependent resource.
S120, if the target cache does not include the target dependent resource corresponding to the target dependent resource identifier, determining a target dependent resource temporary storage server corresponding to the target dependent resource identifier, and sending the dependent resource calling request to the target dependent resource temporary storage server.
The cache refers to a memory for temporary storage, and the target cache refers to a storage space for temporarily storing the target dependent resource. The target dependent resource temporary storage server refers to a server to which the target dependent resource belongs, for example, the target dependent resource temporary storage server is a GitHub server.
Specifically, after the target dependent resource identifier is determined, whether the target dependent resource corresponding to the target dependent identifier is stored in the target cache is determined based on the target dependent resource identifier. And if the target dependent resource is not stored in the target cache, sending the dependent resource calling request to the target dependent resource server, so that the target dependent resource server determines the target dependent resource according to the received dependent resource calling request.
Optionally, the target dependent resource identifier includes a target dependent resource locator; the determining the target dependent resource temporary storage server corresponding to the target dependent resource identifier includes: and determining a target dependent resource temporary storage server corresponding to the target dependent resource locator.
The target dependent resource locator corresponds to the target dependent resource one to one, the target dependent resource can be called based on the target dependent resource locator, for example, the target dependent resource locator is a URL address, and the target dependent resource can be called from a target dependent resource temporary storage server corresponding to the target dependent resource through the URL address.
Specifically, the target dependent resource temporary storage server corresponding to the target dependent resource is determined through the target dependent resource locator, and accuracy of determining the target dependent resource temporary storage server is improved.
S130, receiving the target dependent resources corresponding to the dependent resource calling request fed back by the target dependent resource temporary storage server.
Specifically, the dependent resource calling request is sent to the target dependent resource temporary storage server, so that the target dependent resource temporary storage server determines the target dependent resource based on the target dependent resource identifier in the dependent resource calling request and feeds back the target dependent resource. By receiving the target dependent resources from the temporary storage server of the target dependent resources, the target dependent resources do not need to be downloaded, stored and maintained in advance, the working efficiency of the server is improved, and the memory occupation amount is reduced.
According to the technical scheme of the embodiment of the invention, when the dependent resource calling request is received, the target dependent resource identifier corresponding to the dependent resource calling request is determined, whether the target dependent resource corresponding to the target dependent resource identifier is stored in the target cache is judged, if not, the target dependent resource temporary storage server corresponding to the target dependent resource identifier is determined, and the dependent resource calling request is sent to the target dependent resource temporary storage server. And receiving the target dependent resources fed back by the target dependent resource temporary storage server. According to the technical scheme of the embodiment of the invention, the corresponding dependent resources are pertinently called from the resource temporary storage server corresponding to the dependent resources in the project development process, and the problems that all the dependent resources are required to be downloaded, stored and maintained in advance before the project development and the local memory load is increased are solved.
On the basis of the foregoing technical solution, optionally, after receiving the target dependent resource corresponding to the dependent resource invoking request and fed back by the target dependent resource temporary storage server, the method includes: and carrying out project packaging based on the target dependent resources and the project file to obtain a target project package.
Wherein, the project file is a file in the process of project development. Such as program code files and document files. The item package refers to a package generated after the whole item is packaged, and one or more dependent resources can be included in the item package. The target project package is obtained by packaging based on the target dependent resources and the project file.
Specifically, after the target dependent resource is determined, the target dependent resource and the project file are packaged to obtain a project package, and the project development process is completed.
Example two
Fig. 2 is a flowchart of a resource retrieving method according to an embodiment of the present invention, which is an extension of the alternative of the foregoing embodiment, and after a target dependent resource is retrieved, the target dependent resource is stored in a target cache, so that when the target dependent resource is retrieved again, the target dependent resource can be retrieved from the target cache. Specific extensions are set forth in detail in the embodiments of the present invention. Technical terms identical or similar to those of the above embodiments will not be described again.
As shown in fig. 2, the resource scheduling method according to the embodiment of the present invention includes the following steps:
s210, when a dependent resource calling request is received, determining a target dependent resource identifier corresponding to the dependent resource calling request.
S220, if the target cache does not include the target dependent resource corresponding to the target dependent resource identifier, determining a target dependent resource temporary storage server corresponding to the target dependent resource identifier, and sending the dependent resource calling request to the target dependent resource temporary storage server.
And S230, receiving the target dependent resources corresponding to the dependent resource calling request fed back by the target dependent resource temporary storage server.
S240, storing the target dependent resource into a target cache, so as to determine a target dependent resource identifier corresponding to the dependent resource calling request when receiving the dependent resource calling request, and calling the target dependent resource corresponding to the target dependent resource identifier from the target cache.
Specifically, after the target dependent resource is obtained, the target dependent resource is stored in the target cache. Optionally, a corresponding relationship is set between the target dependent resource identifier and the location information stored in the target cache, so as to determine whether the target dependent resource is stored in the target cache based on the target dependent resource identifier and the corresponding relationship, and if yes, the location information of the target dependent resource in the target cache may also be determined. And calling the target dependent resource based on the position information.
In this embodiment of the present invention, setting a correspondence between a target dependent resource identifier and location information stored in a target cache may be that, the invoking a target dependent resource corresponding to the target dependent resource identifier from the target cache includes: determining a target dependent resource path corresponding to the target dependent identifier; and calling the target dependent resource corresponding to the target dependent resource path from the target cache.
The target dependent resource path refers to path information of the target dependent resource in the target cache.
Specifically, a corresponding target dependent resource path is determined according to the target dependent identifier, so that the corresponding target dependent resource is called from the target cache according to the target dependent path. And the target dependent resource is called in a target dependent resource path mode, so that the accuracy of calling the target dependent resource is improved.
In the embodiment of the present invention, the target dependent resource stored in the target cache may have an updated condition, and at this time, the target dependent resource in the target cache may be updated according to the updated version or update information may be sent to the target terminal, so as to remind a target user corresponding to the target terminal, and the like. Optionally, after storing the target dependent resource in the target cache, the method further includes: monitoring whether each dependent resource in the target cache has an updated version; if yes, sending prompt information corresponding to the updated dependent resources to the target terminal; the prompt message comprises an updated version number of the updated dependent resource and a server identifier of the target dependent resource temporary storage server.
The prompt information is used for prompting a target user corresponding to the target terminal. The prompt message can be sent to the target terminal through a short message, a push message and telephone voice. The presentation mode of the prompt message can be voice, text, diagram and the like. The server identification of the target dependent resource staging server may be the name of the target dependent resource staging server.
Specifically, when it is monitored that one or more dependent resources in the target cache have an updated version, the prompt information may be sent to the target terminal based on the dependent resources, so that the target user corresponding to the target terminal is prompted, and the target user updates or performs other operations on the dependent resources based on the prompt information, thereby preventing problems such as failure of a project caused by using an old version of a dependent resource package in the project due to version update of the dependent resources. Optionally, when the plurality of dependent resources in the target cache have updated versions, the prompt information may be sent to the target terminal based on each dependent resource, or the prompt information of the plurality of dependent resources may be integrated to generate a piece of prompt information, and the piece of prompt information is sent to the target terminal. The prompt information comprises the updated version number of the dependent resource and the server identifier of the target dependent resource temporary storage server to which the dependent resource belongs, so that a target user corresponding to the target terminal can know the updated version condition of the dependent resource in time conveniently.
On the basis of the above technical solution, after the storing the target dependent resource in the target cache, the method further includes: when detecting that the dependent resource in the target cache has an updated version, updating the dependent resource in the target cache based on the updated version in the dependent resource temporary storage server to which the dependent resource belongs, and sending update information to a target terminal; the update information includes an original version number of the dependent resource, an update version number of the dependent resource, version update time, and a dependent resource temporary storage server to which the dependent resource belongs.
Specifically, when it is detected that the dependent resource in the target cache has an updated version, the dependent resource of the new version is downloaded in the dependent resource temporary storage server corresponding to the dependent resource, and the corresponding dependent resource in the target cache is covered. And sending the update information to the target terminal so that the target user corresponding to the target terminal knows the updated dependent resources based on the update information. Optionally, the downloaded dependent resource of the new version and the corresponding dependent resource in the target cache are stored in an associated manner, and the update information is sent to the target terminal, so that the target user knows that the updated version of the dependent resource is stored in the target cache, and the target user determines whether to delete the original stored dependent resource in the target cache according to the project requirement, thereby improving the experience of the user.
According to the technical scheme of the embodiment of the invention, when the dependent resource calling request is received, the target dependent resource identifier corresponding to the dependent resource calling request is determined, whether the target dependent resource corresponding to the target dependent resource identifier is stored in the target cache is judged, if not, the target dependent resource temporary storage server corresponding to the target dependent resource identifier is determined, and the dependent resource calling request is sent to the target dependent resource temporary storage server. And receiving the target dependent resources fed back by the target dependent resource temporary storage server, and storing the target dependent resources in a target cache. By the technical scheme of the embodiment of the invention, the target dependent resource is called and stored, when the target dependent resource is called again, the target dependent resource can be called from the target cache, the downloading time from the target dependent resource temporary storage server is shortened, and the bandwidth is reduced.
EXAMPLE III
Fig. 3 is a flowchart illustrating a resource invoking method according to an embodiment of the present invention. The embodiment of the invention is an alternative on the basis of the above-described embodiment.
Before explaining the technical solution of the embodiment of the present invention, an exemplary description is first made of the technical background of the embodiment of the present invention:
currently, web packs are generally used as static module packaging tools for developing web applications, and various dependent packages need to be loaded, such as real, Vue, Axios and other technical frameworks. Json is used to maintain various dependency packages and versions thereof during project development. When the project is operated and packaged, the dependent package required to be used is extracted through the Webpack analysis code, the corresponding file is obtained in the Node _ modules (Node modules) according to the names of the dependent package for packaging, if the dependent package cannot be found in the Node _ modules (Node modules), an error is prompted, and the project packaging cannot be successful. Therefore, before a project is run, Npm install is needed to install the dependency package listed in package json, Npm downloads and installs the needed dependency package into the local Node _ modules, and therefore, the burden of the local memory is too heavy.
In the project development process, the target dependency package is firstly analyzed, whether the address of the target dependency package is the URL address or not is judged, if not, the target dependency package is downloaded and stored in the local memory in advance, and the target dependency package can be obtained from the local memory. If so, acquiring the URL address of the target dependency package, and calling the target dependency package through the URL address of the target dependency package. Specifically, whether a target dependency package corresponding to the URL address is stored in the target cache is judged through the URL address of the target dependency package, and if yes, the target dependency package is acquired from the target cache. If not, determining a target server corresponding to the target dependency package through the URL address, acquiring the target dependency package from the target server, and packaging the project based on the target dependency package and the project file. And the downloaded target dependency package is stored in the target cache, so that the target dependency package can be called from the target cache when called again, and the time length for downloading the target dependency package and the occupied bandwidth are reduced. Optionally, when the target dependency package is stored in the target cache, an association relationship is set between the URL address of the target dependency package and a storage location in the target cache, so that the target dependency package is called from the target cache based on the URL address of the target dependency package and the association relationship.
For example, when the technical framework is Vue (of course, other technical frameworks are also possible, and are not limited herein), the invocation of the target dependent packet may be introduced by means of a URL address, for example, import Vue from 'https:// unpkg.com/Vue', where 'https:// unpkg.com/Vue' is a URL address. And then, judging whether the dependency package which can be corresponding to the URL address is stored in the target cache or not according to the URL address. And if the dependency package is not used, the dependency file is called from the corresponding target server according to the URL address, the called dependency file is stored in the target cache for reuse, and finally, all the obtained dependency packages are subjected to code packaging.
According to the technical scheme of the embodiment of the invention, the URL address of the target dependent resource is determined, whether the target dependent resource corresponding to the URL address is stored in the target cache is judged based on the URL address, and if yes, the target dependent resource is called from the target cache. If not, the target server is determined based on the URL address, and the target dependent resource is called from the target server, so that the dependent packet can be directly called from the target cache when being used again, and time and bandwidth are saved.
Example four
Fig. 4 is a schematic structural diagram of a resource retrieving device according to an embodiment of the present invention, where the resource retrieving device according to the embodiment of the present invention can execute a resource retrieving method according to any embodiment of the present invention, and has corresponding functional modules and beneficial effects of the execution method. The device includes: a target dependent resource identifier invoking module 410, a server determining module 420, and a first target dependent resource invoking module 430; wherein:
a target dependent resource identifier invoking module 410, configured to, when a dependent resource invoking request is received, determine a target dependent resource identifier corresponding to the dependent resource invoking request; a server determining module 420, configured to determine a target dependent resource temporary storage server corresponding to the target dependent resource identifier if the target cache does not include the target dependent resource corresponding to the target dependent resource identifier, and send the dependent resource invoking request to the target dependent resource temporary storage server; a first target dependent resource invoking module 430, configured to receive a target dependent resource corresponding to the dependent resource invoking request and fed back by the target dependent resource temporary storage server; wherein the dependent resources are resources used by the current project development and/or packaging.
Further, the target dependent resource identifier comprises a target dependent resource locator; the server determination module 420 includes:
and the temporary storage server determining module is used for determining the target dependent resource temporary storage server corresponding to the target dependent resource locator.
Further, the apparatus further comprises:
and the second target dependent resource calling module is used for storing the target dependent resource into a target cache, so that when a dependent resource calling request is received, a target dependent resource identifier corresponding to the dependent resource calling request is determined, and the target dependent resource corresponding to the target dependent resource identifier is called from the target cache.
Further, the second target dependent resource invoking module includes:
the path determining submodule is used for determining a target dependent resource path corresponding to the target dependent identifier; and the target dependent resource calling submodule is used for calling the target dependent resource corresponding to the target dependent resource path from the target cache.
Further, the apparatus further comprises:
the target project package acquisition module is used for carrying out project packaging based on the target dependent resources and the project files so as to acquire a target project package; wherein, the project file is a file in the process of project development.
Further, the apparatus further comprises:
the update version determining module is used for monitoring whether each dependent resource in the target cache has an update version; the prompt information sending module is used for sending prompt information corresponding to the updated dependent resource to the target terminal if the updated dependent resource exists; the prompt message comprises an updated version number of the updated dependent resource and a server identifier of the target dependent resource temporary storage server.
Further, the apparatus further comprises:
the dependent resource updating module is used for updating the dependent resources in the target cache based on the updated version in the dependent resource temporary storage server to which the dependent resources belong and sending updating information to the target terminal when the fact that the dependent resources in the target cache have the updated version is detected; the update information includes an original version number of the dependent resource, an update version number of the dependent resource, version update time, and a dependent resource temporary storage server to which the dependent resource belongs.
According to the technical scheme of the embodiment of the invention, when the dependent resource calling request is received, the target dependent resource identifier corresponding to the dependent resource calling request is determined, whether the target dependent resource corresponding to the target dependent resource identifier is stored in the target cache is judged, if not, the target dependent resource temporary storage server corresponding to the target dependent resource identifier is determined, and the dependent resource calling request is sent to the target dependent resource temporary storage server. And receiving the target dependent resources fed back by the target dependent resource temporary storage server. According to the technical scheme of the embodiment of the invention, the corresponding dependent resources are pertinently called from the resource temporary storage server corresponding to the dependent resources in the project development process, and the problems that all the dependent resources are required to be downloaded, stored and maintained in advance before the project development and the local memory load is increased are solved.
It should be noted that, the units and modules included in the apparatus are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the embodiment of the invention.
EXAMPLE five
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention. FIG. 5 illustrates a block diagram of an exemplary device 50 suitable for use in implementing embodiments of the present invention. The device 50 shown in fig. 5 is only an example and should not bring any limitation to the function and scope of use of the embodiments of the present invention.
As shown in FIG. 5, device 50 is embodied in a general purpose computing device. The components of the device 50 may include, but are not limited to: one or more processors or processing units 501, a system memory 502, and a bus 503 that couples the various system components (including the system memory 502 and the processing unit 501).
Bus 503 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Device 50 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by device 50 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 502 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)504 and/or cache memory 505. The device 50 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 506 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 5, commonly referred to as a "hard drive"). Although not shown in FIG. 5, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 503 by one or more data media interfaces. Memory 502 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 508 having a set (at least one) of program modules 507 may be stored, for instance, in memory 502, such program modules 507 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 507 generally perform the functions and/or methodologies of embodiments of the invention as described herein.
Device 50 may also communicate with one or more external devices 509 (e.g., keyboard, pointing device, display 510, etc.), with one or more devices that enable a user to interact with device 50, and/or with any devices (e.g., network card, modem, etc.) that enable device 50 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interfaces 511. Also, device 50 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the Internet) via network adapter 512. As shown, the network adapter 512 communicates with the other modules of the device 50 over a bus 503. It should be appreciated that although not shown in FIG. 5, other hardware and/or software modules may be used in conjunction with device 50, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 501 executes various functional applications and data processing, for example, implementing a resource calling method provided by an embodiment of the present invention, by executing a program stored in the system memory 502.
EXAMPLE six
Embodiments of the present invention also provide a storage medium containing computer-executable instructions, which when executed by a computer processor, perform a method for resource invocation, the method comprising:
when a dependent resource calling request is received, determining a target dependent resource identifier corresponding to the dependent resource calling request; if the target cache does not comprise the target dependent resource corresponding to the target dependent resource identifier, determining a target dependent resource temporary storage server corresponding to the target dependent resource identifier, and sending the dependent resource calling request to the target dependent resource temporary storage server; receiving the target dependent resources corresponding to the dependent resource calling request fed back by the target dependent resource temporary storage server; wherein the dependent resources are resources used by the current project development and/or packaging.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, 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. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
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.
Computer program code for carrying out operations for embodiments of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, 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 computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the 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 the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1.一种资源调取方法,其特征在于,包括:1. a resource retrieval method, is characterized in that, comprises: 当接收到依赖资源调取请求时,确定与所述依赖资源调取请求相对应的目标依赖资源标识;When receiving a dependent resource invocation request, determining a target dependent resource identifier corresponding to the dependent resource invocation request; 如果所述目标缓存中不包括与所述目标依赖资源标识相对应的目标依赖资源时,确定与所述目标依赖资源标识相对应的目标依赖资源暂存服务器,并将所述依赖资源调取请求发送至所述目标依赖资源暂存服务器;If the target cache does not include the target dependent resource corresponding to the target dependent resource identifier, determine the target dependent resource temporary storage server corresponding to the target dependent resource identifier, and call the dependent resource request sending it to the target-dependent resource staging server; 接收所述目标依赖资源暂存服务器反馈的与所述依赖资源调取请求相对应的目标依赖资源;receiving a target-dependent resource corresponding to the dependent-resource invocation request fed back by the target-dependent resource staging server; 其中,依赖资源为当前项目开发和/或打包所使用的资源。Among them, the dependent resources are the resources used for the development and/or packaging of the current project. 2.根据权利要求1所述的方法,其特征在于,所述目标依赖资源标识包括目标依赖资源定位符;2. The method according to claim 1, wherein the target-dependent resource identifier comprises a target-dependent resource locator; 所述确定与所述目标依赖资源标识相对应的目标依赖资源暂存服务器,包括:The determining of the target-dependent resource temporary storage server corresponding to the target-dependent resource identifier includes: 确定与所述目标依赖资源定位符相对应的目标依赖资源暂存服务器。A target-dependent resource staging server corresponding to the target-dependent resource locator is determined. 3.根据权利要求1所述的方法,其特征在于,在所述接收所述目标依赖资源暂存服务器反馈的与所述依赖资源调取请求相对应的目标依赖资源之后,还包括:3. The method according to claim 1, wherein after receiving the target-dependent resource corresponding to the dependent-resource fetching request fed back by the target-dependent resource staging server, the method further comprises: 将所述目标依赖资源存储至目标缓存中,以在接收到依赖资源调取请求时,确定与所述依赖资源调取请求相对应的目标依赖资源标识,从所述目标缓存中调取与所述目标依赖资源标识相对应的目标依赖资源。The target dependent resource is stored in the target cache, so that when a dependent resource retrieval request is received, the target dependent resource identifier corresponding to the dependent resource retrieval request is determined, and the target dependent resource identifier corresponding to the dependent resource retrieval request is retrieved from the target cache. Describe the target-dependent resource corresponding to the target-dependent resource identifier. 4.根据权利要求3所述的方法,其特征在于,所述从所述目标缓存中调取与所述目标依赖资源标识相对应的目标依赖资源,包括:4. The method according to claim 3, wherein the retrieving the target-dependent resource corresponding to the target-dependent resource identifier from the target cache comprises: 确定所述目标依赖标识相对应的目标依赖资源路径;determining a target-dependent resource path corresponding to the target-dependent identifier; 从所述目标缓存中调取与所述目标依赖资源路径相对应的目标依赖资源。The target-dependent resource corresponding to the target-dependent resource path is retrieved from the target cache. 5.根据权利要求1所述的方法,其特征在于,在所述接收所述目标依赖资源暂存服务器反馈的与所述依赖资源调取请求相对应的目标依赖资源之后,包括:5 . The method according to claim 1 , wherein after receiving the target-dependent resource corresponding to the dependent-resource invocation request fed back by the target-dependent resource staging server, the method comprises: 5 . 基于所述目标依赖资源和项目文件进行项目打包,以获取目标项目包;Carry out project packaging based on the target dependent resources and project files to obtain the target project package; 其中,所述项目文件为项目开发过程中的文件。Wherein, the project file is a file in the project development process. 6.根据权利要求1所述的方法,其特征在于,在所述将所述目标依赖资源存储至目标缓存中之后,还包括:6. The method according to claim 1, wherein after the storing the target-dependent resource in the target cache, the method further comprises: 监测所述目标缓存中的各个依赖资源是否存在更新版本;Monitoring whether there is an updated version of each dependent resource in the target cache; 若是,发送与更新的依赖资源相对应的提示信息至目标终端;If so, send prompt information corresponding to the updated dependent resource to the target terminal; 其中,所述提示信息包括更新的依赖资源的更新版本号以及所属目标依赖资源暂存服务器的服务器标识。The prompt information includes the updated version number of the updated dependent resource and the server identifier of the target dependent resource temporary storage server to which it belongs. 7.根据权利要求1所述的方法,其特征在于,在所述将所述目标依赖资源存储至目标缓存中之后,还包括:7. The method according to claim 1, wherein after storing the target-dependent resource in the target cache, the method further comprises: 当检测到所述目标缓存中的依赖资源存在更新版本时,基于所述依赖资源所属的依赖资源暂存服务器中的更新版本,更新所述目标缓存中的所述依赖资源,并发送更新信息至目标终端;When detecting that there is an updated version of the dependent resource in the target cache, update the dependent resource in the target cache based on the updated version in the dependent resource temporary storage server to which the dependent resource belongs, and send update information to target terminal; 其中,所述更新信息包括所述依赖资源的原始版本号、所述依赖资源的更新版本号、版本更新时间、所述依赖资源所属的依赖资源暂存服务器。The update information includes the original version number of the dependent resource, the updated version number of the dependent resource, the version update time, and the dependent resource temporary storage server to which the dependent resource belongs. 8.一种资源调取装置,其特征在于,包括:8. A resource retrieval device, comprising: 目标依赖资源标识调取模块,用于当接收到依赖资源调取请求时,确定与所述依赖资源调取请求相对应的目标依赖资源标识;A target-dependent resource identifier retrieval module, configured to determine a target-dependent resource identifier corresponding to the dependent resource retrieval request when a dependent resource retrieval request is received; 目标依赖资源暂存服务器确定模块,用于如果所述目标缓存中不包括与所述目标依赖资源标识相对应的目标依赖资源时,确定与所述目标依赖资源标识相对应的目标依赖资源暂存服务器,并将所述依赖资源调取请求发送至所述目标依赖资源暂存服务器;A target-dependent resource temporary storage server determination module, configured to determine the temporary storage of target-dependent resources corresponding to the target-dependent resource identifier if the target-dependent resource does not include the target-dependent resource identifier corresponding to the target-dependent resource identifier server, and send the dependent resource invocation request to the target dependent resource temporary storage server; 第一目标依赖资源调取模块,用于接收所述目标依赖资源暂存服务器反馈的与所述依赖资源调取请求相对应的目标依赖资源;a first target-dependent resource retrieval module, configured to receive the target-dependent resource corresponding to the dependent-resource retrieval request fed back by the target-dependent resource temporary storage server; 其中,依赖资源为当前项目开发和/或打包所使用的资源。Among them, the dependent resources are the resources used for the development and/or packaging of the current project. 9.一种电子设备,其特征在于,所述电子设备包括:9. An electronic device, characterized in that the electronic device comprises: 一个或多个处理器;one or more processors; 存储装置,用于存储一个或多个程序,storage means for storing one or more programs, 当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-7中任一所述的资源调取方法。When the one or more programs are executed by the one or more processors, the one or more processors implement the resource retrieval method according to any one of claims 1-7. 10.一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时用于执行如权利要求1-7中任一所述的资源调取方法。10. A storage medium containing computer-executable instructions, which when executed by a computer processor, are used to perform the resource retrieval method of any one of claims 1-7.
CN202110328314.4A 2021-03-26 2021-03-26 Resource calling method and device, electronic equipment and storage medium Pending CN113050984A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110328314.4A CN113050984A (en) 2021-03-26 2021-03-26 Resource calling method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110328314.4A CN113050984A (en) 2021-03-26 2021-03-26 Resource calling method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113050984A true CN113050984A (en) 2021-06-29

Family

ID=76515908

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110328314.4A Pending CN113050984A (en) 2021-03-26 2021-03-26 Resource calling method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113050984A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113590144A (en) * 2021-08-16 2021-11-02 北京字节跳动网络技术有限公司 Dependency processing method and device
CN113608800A (en) * 2021-08-31 2021-11-05 北京字节跳动网络技术有限公司 Project starting method and device, electronic equipment and storage medium
CN113672276A (en) * 2021-08-02 2021-11-19 广州三七互娱科技有限公司 Dependency package management method and system for game development engine and game development engine
CN113849217A (en) * 2021-08-30 2021-12-28 北京达佳互联信息技术有限公司 Resource packaging method, device, electronic device and storage medium
CN115344754A (en) * 2022-08-16 2022-11-15 北京金山云网络技术有限公司 Resource-dependent state query method and device, storage medium and electronic equipment

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040215755A1 (en) * 2000-11-17 2004-10-28 O'neill Patrick J. System and method for updating and distributing information
CN104049986A (en) * 2013-03-14 2014-09-17 腾讯科技(深圳)有限公司 Plugin loading method and device
CN107038045A (en) * 2017-03-30 2017-08-11 腾讯科技(深圳)有限公司 Load the method and device of library file
CN109901874A (en) * 2019-03-06 2019-06-18 珠海金山网络游戏科技有限公司 A kind of file loading method and device calculate equipment and storage medium
CN110162332A (en) * 2019-05-20 2019-08-23 深圳前海微众银行股份有限公司 A kind of construction method and system of RN project
CN110275723A (en) * 2019-06-25 2019-09-24 北京字节跳动网络技术有限公司 Obtain method, apparatus, electronic equipment and the readable medium of resource
CN110554876A (en) * 2018-05-31 2019-12-10 北京京东尚科信息技术有限公司 Method and device for compiling android project
CN111596965A (en) * 2020-07-22 2020-08-28 太平金融科技服务(上海)有限公司 Project engineering initialization method, device, computer equipment and storage medium
CN111818117A (en) * 2019-11-22 2020-10-23 北京嘀嘀无限科技发展有限公司 Data updating method and device, storage medium and electronic equipment

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040215755A1 (en) * 2000-11-17 2004-10-28 O'neill Patrick J. System and method for updating and distributing information
CN104049986A (en) * 2013-03-14 2014-09-17 腾讯科技(深圳)有限公司 Plugin loading method and device
CN107038045A (en) * 2017-03-30 2017-08-11 腾讯科技(深圳)有限公司 Load the method and device of library file
CN110554876A (en) * 2018-05-31 2019-12-10 北京京东尚科信息技术有限公司 Method and device for compiling android project
CN109901874A (en) * 2019-03-06 2019-06-18 珠海金山网络游戏科技有限公司 A kind of file loading method and device calculate equipment and storage medium
CN110162332A (en) * 2019-05-20 2019-08-23 深圳前海微众银行股份有限公司 A kind of construction method and system of RN project
CN110275723A (en) * 2019-06-25 2019-09-24 北京字节跳动网络技术有限公司 Obtain method, apparatus, electronic equipment and the readable medium of resource
CN111818117A (en) * 2019-11-22 2020-10-23 北京嘀嘀无限科技发展有限公司 Data updating method and device, storage medium and electronic equipment
CN111596965A (en) * 2020-07-22 2020-08-28 太平金融科技服务(上海)有限公司 Project engineering initialization method, device, computer equipment and storage medium

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113672276A (en) * 2021-08-02 2021-11-19 广州三七互娱科技有限公司 Dependency package management method and system for game development engine and game development engine
CN113590144A (en) * 2021-08-16 2021-11-02 北京字节跳动网络技术有限公司 Dependency processing method and device
CN113590144B (en) * 2021-08-16 2024-05-28 抖音视界有限公司 Dependency processing method and device
CN113849217A (en) * 2021-08-30 2021-12-28 北京达佳互联信息技术有限公司 Resource packaging method, device, electronic device and storage medium
CN113608800A (en) * 2021-08-31 2021-11-05 北京字节跳动网络技术有限公司 Project starting method and device, electronic equipment and storage medium
CN113608800B (en) * 2021-08-31 2024-07-23 抖音视界有限公司 Project starting method and device, electronic equipment and storage medium
CN115344754A (en) * 2022-08-16 2022-11-15 北京金山云网络技术有限公司 Resource-dependent state query method and device, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
CN113050984A (en) Resource calling method and device, electronic equipment and storage medium
CN110515647B (en) Static resource management method, device, equipment and storage medium
US11550599B2 (en) Method and apparatus for running applet
CN108399132B (en) Scheduling test method, device and storage medium
CN111090536B (en) Method, device, medium and electronic equipment for acquiring memory leakage information
CN113761412A (en) Application page display method and device, electronic equipment, medium and application system
CN102707999A (en) App Compatibility Leveraging Successful Problem Solving
CN111538651A (en) Interface testing method, device, server and storage medium
CN111506904B (en) Method and device for online bug repair
CN114116078A (en) Application data processing method, device, equipment and medium based on micro front end
CN114003269A (en) Component processing method and device, electronic equipment and storage medium
CN113138768A (en) Application package generation method and device, electronic equipment and readable storage medium
CN114020490B (en) Inter-process communication system, method and computing device
CN112631590B (en) Component library generation method, device, electronic equipment and computer readable medium
CN116204749A (en) Page loading method and device, electronic equipment and storage medium
CN112783903B (en) Method and device for generating update log
CN112558975B (en) Method and device for switching codes of components, electronic equipment and readable storage medium
CN113342633B (en) Performance test method and device
CN115756763A (en) Method, device and system for quickly compiling and operating micro-service container and electronic equipment
CN116257501A (en) Data processing method, device, electronic equipment and storage medium
CN115080431A (en) Code testing method, device, storage medium and equipment
CN114510334A (en) Class instance calling method and device, electronic equipment and automatic driving vehicle
CN115033251A (en) Software deployment method and device, electronic equipment and storage medium
CN115167872A (en) Service module deployment method and device, electronic equipment and computer readable medium
CN113515299A (en) Software development kit SDK hot upgrade method, device, device and storage medium

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210629