CN116996575A - Resource access method, device, equipment and storage medium - Google Patents

Resource access method, device, equipment and storage medium Download PDF

Info

Publication number
CN116996575A
CN116996575A CN202211274094.2A CN202211274094A CN116996575A CN 116996575 A CN116996575 A CN 116996575A CN 202211274094 A CN202211274094 A CN 202211274094A CN 116996575 A CN116996575 A CN 116996575A
Authority
CN
China
Prior art keywords
resource
target
target resource
catalog
cloud server
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
CN202211274094.2A
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.)
Guangzhou Tencent Technology Co Ltd
Original Assignee
Guangzhou Tencent 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 Guangzhou Tencent Technology Co Ltd filed Critical Guangzhou Tencent Technology Co Ltd
Priority to CN202211274094.2A priority Critical patent/CN116996575A/en
Publication of CN116996575A publication Critical patent/CN116996575A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application relates to the technical field of computers, and provides a resource access method, a device, equipment and a storage medium, which are used for realizing persistent resource access and guaranteeing normal operation of services, wherein the method comprises the following steps: responding to uploading operation for the target resource, uploading the target resource to a cloud server, and receiving a target resource identifier of the target resource returned by the cloud server; and responding to the triggering operation aiming at the target resource, acquiring the actual access address of the target resource in the cloud server based on the target resource identification, and acquiring the target resource based on the actual access address.

Description

Resource access method, device, equipment and storage medium
Technical Field
The application relates to the technical field of computers and provides a resource access method, a device, equipment and a storage medium.
Background
With the continuous development of computer technology, containers are widely used as an emerging lightweight virtualization technology. Taking an industrial internet of things scenario as an example, an industrial configuration is an equipment association platform applied to the industrial internet of things scenario, including but not limited to: visual page configuration, data source binding, real-time page display and other functions.
In the related art, configuration services of industrial configuration are deployed in a containerized manner, and configuration resources of industrial configuration are usually stored locally or in a local file server.
However, since the minimum deployment unit of the container is a container group (Pod), the Pod may drift between all container nodes after restarting, and data access across nodes is not supported in the container, if the configuration resource is stored in a local storage manner, component resources are lost due to the Pod restarting, so that persistent resource access cannot be performed.
For example, the Pod deployed with the configuration service is a container node a, the configuration resource is stored in the container node a, and when the Pod is restarted due to a fault or the like, the Pod deployed with the configuration service is a container node B, and at this time, the Pod cannot acquire the component resource stored in the container node a, so that the normal operation of the configuration service is affected.
Disclosure of Invention
The embodiment of the application provides a resource access method and a related device, which are used for realizing persistent resource access and ensuring normal operation of a service.
In a first aspect, an embodiment of the present application provides a resource access method, including:
responding to uploading operation for a target resource, uploading the target resource to a cloud server, and receiving a target resource identifier of the target resource returned by the cloud server;
And responding to a triggering operation for a target resource, acquiring an actual access address of the target resource in the cloud server based on the target resource identifier, and acquiring the target resource based on the actual access address.
In a second aspect, an embodiment of the present application provides a resource access device, including:
the device comprises an identification acquisition unit, a cloud server and a target resource identification unit, wherein the identification acquisition unit is used for responding to uploading operation of target resources, uploading the target resources to the cloud server and receiving target resource identifications of the target resources returned by the cloud server;
the resource acquisition unit is used for responding to the triggering operation of the target resource, acquiring the actual access address of the target resource in the cloud server based on the target resource identifier, and acquiring the target resource based on the actual access address.
In a third aspect, an embodiment of the present application provides an electronic device, including a processor and a memory, where the memory stores a computer program that, when executed by the processor, causes the processor to perform the steps of the above-described resource access method.
In a fourth aspect, an embodiment of the present application provides a computer readable storage medium comprising a computer program for causing an electronic device to perform the steps of the above-described resource access method when the computer program is run on the electronic device.
In a fifth aspect, embodiments of the present application provide a computer program product comprising a computer program stored in a computer readable storage medium, from which a processor of an electronic device reads and executes the computer program, causing the electronic device to perform the steps of the above-described resource access method.
In the embodiment of the application, in response to uploading operation for a target resource, the target resource is uploaded to a cloud server, and a target resource identifier of the target resource returned by the cloud server is received; and responding to a triggering operation for a target resource, acquiring an actual access address of the target resource in the cloud server based on the target resource identifier, and acquiring the target resource based on the actual access address.
By the implementation manner, since the resources are stored in the cloud server, when POD drift or restarting occurs, even if the target resources are generated when the previous node runs the target service, the target resources can be obtained from the cloud server, so that continuity of the target service is ensured.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the application. The objectives and other advantages of the application will be realized and attained by the structure particularly pointed out in the written description and claims thereof as well as the appended drawings.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute a limitation on the application. In the drawings:
fig. 1 is a schematic view of an application scenario provided in an embodiment of the present application;
FIG. 2 is a schematic diagram of a system architecture according to an embodiment of the present application;
FIG. 3 is a flowchart of a method for accessing resources according to an embodiment of the present application;
FIG. 4 is a schematic diagram of an operation interface according to an embodiment of the present application;
FIG. 5 is a schematic diagram of an operation interface before triggering resources according to an embodiment of the present application;
FIG. 6 is a schematic diagram of an operation interface after triggering a resource according to an embodiment of the present application;
FIG. 7 is a schematic diagram of a target resource directory according to an embodiment of the present application;
FIG. 8A is a diagram of an original resource catalog according to an embodiment of the present application;
FIG. 8B is a diagram of a target resource directory according to an embodiment of the present application;
FIG. 9 is a schematic diagram of interaction among a terminal device, an electronic device, a file server and an identifier database in a resource initialization and resource creation process according to an embodiment of the present application;
FIG. 10 is a schematic diagram of interaction between an electronic device and a file server in a process of loading a resource to be loaded according to an embodiment of the present application;
FIG. 11 is a schematic diagram of interaction among a terminal device, an electronic device, a file server, and an identifier database in a resource editing process according to an embodiment of the present application;
FIG. 12 is a schematic diagram of interaction among a terminal device, an electronic device, a file server, and an identifier database in a resource deletion process according to an embodiment of the present application;
fig. 13 is a schematic diagram of interaction among a terminal device, an electronic device, and a file server in a resource uploading process provided in an embodiment of the present application;
fig. 14 is a schematic diagram of interaction among a terminal device, an electronic device, and a file server according to an embodiment of the present application;
Fig. 15 is a schematic structural diagram of a resource access device according to an embodiment of the present application;
fig. 16 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the technical solutions of the present application, but not all embodiments. All other embodiments, based on the embodiments described in the present document, which can be obtained by a person skilled in the art without any creative effort, are within the scope of protection of the technical solutions of the present application.
Some terms in the embodiments of the present application are explained below to facilitate understanding by those skilled in the art.
Industrial internet: the industrial internet is a novel infrastructure, an application mode and industrial ecology which are deeply fused with new generation information communication technology and industrial economy, and a brand new manufacturing and service system which covers a full industrial chain and a full value chain is constructed by comprehensively connecting people, machines, objects, systems and the like, so that an implementation way is provided for the development of industrialization and even industrialization digitization, networking and intellectualization, and the industrial internet is an important foundation stone of the fourth industrial revolution. The industrial Internet has richer connotation and extension, takes a network as a base, takes a platform as a center, takes data as an element and takes security as a guarantee, is not only an infrastructure for industrial digital, networked and intelligent transformation, but also an application mode for deep fusion of the Internet, big data, artificial intelligence and entity economy, and is also a new business state and a new industry, and the enterprise morphology, the supply chain and the industry chain are remodeled.
Configuration and industrial configuration: configuration refers to the process of completing a particular task in an engineering using methods and tools provided in industrial control software. The industrial configuration is a platform mainly applied to industrial Internet scenes, and the platform can provide functions of drag page configuration, data source binding, real-time page display and the like. The developer can customize icons and pages, performs resource isolation and sharing through an account authority system, provides access addresses, facilitates large-screen display or platform integration, and graphically displays various acquired information.
Cloud native architecture: yun Yuansheng is an architecture composition of an internet emerging large-scale distributed system, and core functions include, but are not limited to, micro services, devOps, containerization technology and service management, the core functions are driven by the micro services architecture, new internet+ oriented technology stacks are built, the large-scale distributed system is built, a Continuous Integration (CI)/Continuous Delivery (CD) system is built and completed, service deployment and automatic operation and maintenance are performed through the containerization technology, enterprise cost is reduced, and project delivery is accelerated.
Container cloud: the container cloud is a cloud service product realized by deploying container services on the cluster server through Docker, kubernetes and other technologies, and can be regarded as a lightweight linux cloud server. The user does not need to manage the bottom server, and can run the container by only providing the container mirror image. Each container of the container cloud is a complete service running environment and can perform resource and process isolation.
Dock: dock is an open-source application container engine that allows developers to package related applications and rely on packages into a portable container in a unified manner and then publish them to the server (e.g., linux machine or windows machine) on which the dock engine is installed, thereby enabling virtualization. In the Docker container technology, a container contains a complete running environment of a service.
Cloud technology (Cloud technology) refers to a hosting technology for integrating hardware, software, network and other series resources in a wide area network or a local area network to realize calculation, storage, processing and sharing of data.
Cloud technology (Cloud technology) is based on the general terms of network technology, information technology, integration technology, management platform technology, application technology and the like applied by Cloud computing business models, and can form a resource pool, so that the Cloud computing business model is flexible and convenient as required. Cloud computing technology will become an important support. Background services of technical networking systems require a large amount of computing, storage resources, such as video websites, picture-like websites, and more portals. Along with the high development and application of the internet industry, each article possibly has an own identification mark in the future, the identification mark needs to be transmitted to a background system for logic processing, data with different levels can be processed separately, and various industry data needs strong system rear shield support and can be realized only through cloud computing.
Cloud computing (clouding) is a computing model that distributes computing tasks across a large pool of computers, enabling various application systems to acquire computing power, storage space, and information services as needed. The network that provides the resources is referred to as the "cloud". Resources in the cloud are infinitely expandable in the sense of users, and can be acquired at any time, used as needed, expanded at any time and paid for use as needed.
As a basic capability provider of cloud computing, a cloud computing resource pool (cloud platform for short, generally referred to as infrastructure as a service (Infrastructure as a Service, iaaS)) platform is established, and multiple types of virtual resources are deployed in the resource pool for external clients to select for use. The cloud computing resource pool mainly comprises: computing devices (which are virtualized machines, including operating systems), storage devices, network devices.
According to the logic function division, a platform service (Platform as a Service, paaS) layer can be deployed on the IaaS layer, and a software service (Software as a Service, saaS) layer can be deployed on the PaaS layer, or the SaaS can be directly deployed on the IaaS layer. PaaS is a platform on which software runs, such as a database, web container, etc. SaaS is a wide variety of business software such as web portals, sms mass senders, etc. Generally, saaS and PaaS are upper layers relative to IaaS.
Cloud storage (cloud storage) is a new concept that extends and develops in the concept of cloud computing, and a distributed cloud storage system (hereinafter referred to as a storage system for short) refers to a storage system that integrates a large number of storage devices (storage devices are also referred to as storage nodes) of various types in a network to work cooperatively through application software or application interfaces through functions such as cluster application, grid technology, and a distributed storage file system, so as to provide data storage and service access functions for the outside.
At present, the storage method of the storage system is as follows: when creating logical volumes, each logical volume is allocated a physical storage space, which may be a disk composition of a certain storage device or of several storage devices. The client stores data on a certain logical volume, that is, the data is stored on a file system, the file system divides the data into a plurality of parts, each part is an object, the object not only contains the data but also contains additional information such as a data Identification (ID) and the like, the file system writes each object into a physical storage space of the logical volume, and the file system records storage position information of each object, so that when the client requests to access the data, the file system can enable the client to access the data according to the storage position information of each object.
The process of allocating physical storage space for the logical volume by the storage system specifically includes: physical storage space is divided into stripes in advance according to the group of capacity measures for objects stored on a logical volume (which measures tend to have a large margin with respect to the capacity of the object actually to be stored) and redundant array of independent disks (Redundant Array of Independent Disk, RAID), and a logical volume can be understood as a stripe, whereby physical storage space is allocated to a logical volume.
The Database (Database), which can be considered as an electronic filing cabinet, is a place for storing electronic files, and users can perform operations such as adding, inquiring, updating, deleting and the like on the data in the files. A "database" is a collection of data stored together in a manner that can be shared with multiple users, with as little redundancy as possible, independent of the application.
The internet of things (The Internet of Things, IOT for short) refers to collecting any object or process needing to be checked, connected and interacted in real time through various devices and technologies such as various information sensors, radio frequency identification technologies, global positioning systems, infrared sensors and laser scanners, collecting various needed information such as sound, light, heat, electricity, mechanics, chemistry, biology and positions, and realizing ubiquitous connection of the object and people through various possible network access, thereby realizing intelligent sensing, identification and management of the object and the process. The internet of things is an information carrier based on the internet, a traditional telecommunication network and the like, and enables all common physical objects which can be independently addressed to form an interconnection network.
The Cloud IOT aims to connect information perceived by sensing equipment in the traditional IOT and accepted instructions into the Internet, networking is truly realized, mass data storage and operation are realized through a Cloud computing technology, the current running states of all 'objects' are perceived in real time due to the fact that the things are connected with each other, a large amount of data information can be generated in the process, how to collect the information, how to screen useful information in the mass information and make decision support for subsequent development, and the Cloud is a key problem affecting the development of the IOT, and the Internet of things Cloud based on Cloud computing and Cloud storage technology is also a powerful support for the technology and application of the IOT.
In the related art, configuration services of industrial configuration are deployed in a containerized manner, and configuration resources of industrial configuration are usually stored locally or in a local file server.
However, since the minimum deployment unit of the container is a container group (Pod), the Pod may drift between all container nodes after restarting, and data access across nodes is not supported in the container, if the configuration resource is stored in a local storage manner, component resources are lost due to the Pod restarting, so that persistent resource access cannot be performed. For example, the Pod deployed with the configuration service is a container node a, the configuration resource is stored in the container node a, and when the Pod is restarted due to a fault or the like, the Pod deployed with the configuration service is a container node B, and at this time, the Pod cannot acquire the component resource stored in the container node a, so that the normal operation of the configuration service is affected.
In the embodiment of the application, in response to uploading operation for a target resource, the target resource is uploaded to a cloud server, and a target resource identifier of the target resource returned by the cloud server is received; and responding to a triggering operation for a target resource, acquiring an actual access address of the target resource in the cloud server based on the target resource identifier, and acquiring the target resource based on the actual access address.
By the implementation manner, since the resources are stored in the cloud server, when POD drift or restarting occurs, even if the target resources are generated when the previous node runs the target service, the target resources can be obtained from the cloud server, so that continuity of the target service is ensured.
Fig. 1 is a schematic diagram of an application scenario according to an embodiment of the present application. The application scenario diagram includes a terminal device 110, a server 120, and a server 130. The terminal device 110, the server 120, and the server 130 may communicate with each other via a communication network. The communication network may be a wired network or a wireless network.
The terminal device 110 is a computer device used by a user, and the computer device includes, but is not limited to, a personal computer, a mobile phone, a tablet computer, a notebook, an electronic book reader, an intelligent voice interaction device, an intelligent home appliance, a vehicle-mounted terminal, an aircraft, and the like.
The server 120 is a server corresponding to an industrial internet platform. The server 120 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or may be a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, a content delivery network (Content Delivery Network, CDN), basic cloud computing services such as big data and an artificial intelligence platform. Hereinafter, the server 120 may also be referred to as a background server.
Server 130 is a file server. Server 130 is a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, web services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and basic cloud computing services such as big data and artificial intelligence platforms.
It should be noted that the illustration in fig. 1 is merely an example, and the number of terminal devices and servers is not limited in practice.
In the embodiment of the present application, a configuration portal corresponding to an industrial internet platform may be installed in the terminal device 110, where the configuration portal may be a web page or a client.
The resource access method in the embodiment of the application can be singly executed by the server or the terminal equipment, or can be jointly executed by the server and the terminal equipment. Illustratively, the server 120 obtains a target resource identifier of the target resource in response to a trigger operation for the target resource, obtains an actual access address of the target resource in the server 130 based on the target resource identifier, obtains the target resource based on the actual access address, and resumes running the target service in the target node based on the target resource.
It should be noted that, in the embodiment of the present application, only an example of application to an industrial configuration scenario is illustrated, and the present application may also be applied to other types of visualization development platforms.
Referring to fig. 2, a schematic diagram of a framework according to an embodiment of the present application is shown, where the framework includes three layers: components, industrial internet platforms, configuration portals.
The component layer is used for providing middleware for data storage, the middleware comprises, but is not limited to, a file storage system for storing resources and an identification database for storing resource identifications, and can also comprise a cache database for storing cache data. Further, the component level may also provide message middleware. Exemplary middleware includes MySQL, redis, kafka, network file system (Network File System, NFS), seeWeedFS, where MySQL is an identification database, redis is a cache database, kafka is a message middleware, and NFS, seeWeedFS are both file storage systems.
The industrial Internet platform comprises two modules, namely equipment access management and industrial configuration. The device access management is used for providing the functions of channel management, device management, point location management, protocol access and analysis, data analysis, device asset and the like, the industrial configuration is an industrial internet configuration support module, and the industrial configuration is used for providing the functions of file signing, configuration background, configuration cache, configuration resource storage and the like, but is not limited to the functions.
The configuration portal is used for providing interaction functions with the target object. The configuration portal comprises two modules of control, display and data configuration. The control and display functions are used for providing functions of a control console, resource management, a dashboard, stage data management, operation stage, file uploading and the like, and the data configuration is used for providing functions of attribute configuration, data access and the like.
The architecture also includes an IaaS/PaaS layer for providing services including, but not limited to Docker, kubernetes.
The target object can upload resources through a file uploading function of the configuration portal, and after the uploaded resources are acquired by the configuration background in the industrial internet platform, the uploaded resources are stored into SeeWeedFS through configuration resource storage, and corresponding resource identifiers are stored into MySQL.
In some possible implementations, to improve the data processing efficiency, the resource identifier may be further stored to the Redis, so that the resource identifier is obtained directly through the Redis.
In some possible implementation manners, in order to improve data security, after the configuration background in the industrial internet platform acquires the uploaded resource, the configuration resource is stored in the SeeWeedFS through the configuration resource storage, and access permission control can be performed on the target object through file signing.
Referring to fig. 3, a flow chart of a resource access method provided in an embodiment of the present application is shown, the method is applied to an electronic device, and the electronic device is a server corresponding to an industrial internet platform, and the specific flow chart is as follows:
And S301, uploading the target resource to a cloud server in response to the uploading operation of the target resource, and receiving a target resource identifier of the target resource returned by the cloud server.
Target services include, but are not limited to, configuration services that are industrial configurations. The cloud server is a file server for storing resources, such as seaweedFS. The identification database may employ, but is not limited to MySQL. For convenience of distinction, a cloud server for storing resources is directly referred to as a file server. Hereinafter, only the target service is taken as an industrial configuration, and the cloud server is taken as a seaweedFS as an example.
In the embodiment of the present application, the resource types of the target resource include, but are not limited to, pages (displays), icons (symbols), components (components), static resources (assets), and templates (templates). Static resources include, but are not limited to, one or more of audio files, images, video files, and the like. Components include, but are not limited to, dynamic icons, such as fan blade sets.
The resource identifier is used to determine the actual access address of the resource, which may also be referred to as a resource store identifier, which may be represented by, but is not limited to, a sequence number (ID). In the embodiment of the application, the target resource identifier is used for determining the actual access address of the target resource, and the original resource identifier is used for determining the actual access address of the original resource. The resource identification may have uniqueness in the system to which the resource belongs.
S302, responding to triggering operation for the target resource, acquiring an actual access address of the target resource in the cloud server based on the target resource identification, and acquiring the target resource based on the actual access address.
In some embodiments, in the operation interface of the configuration portal, the resource description information corresponding to each candidate resource may be presented, where the resource type of the candidate resource includes, but is not limited to, one or more of a page, an icon, a component, a resource, a template, and the like. When the target object executes the triggering operation on the resource description information of one candidate resource in the candidate resources in the operation interface, the corresponding candidate resource is used as the target resource, and the triggering operation on the target resource is determined.
The resource description information may be represented by at least one of a resource name and a resource thumbnail, but is not limited thereto. Triggering operations include, but are not limited to, clicking, long pressing, touching, etc. selected operations.
The resource name may be a name consisting of one or more of an alphanumeric, letter, symbol, etc. In the embodiment of the present application, the resource may be understood as a file, and the resource name may be understood as a file name. The file support is stored in a folder form, and for a plurality of candidate resources under the same folder, the resource names of the plurality of candidate resources can be the same or different, and if the resource names of the plurality of candidate resources are the same, the plurality of candidate resources can be further distinguished through file suffixes. File suffixes include, but are not limited to, mp3, png, jpg, and like data formats.
For example, candidate resource 1 is "choosesets.mp3", candidate resource 1 has a resource name of choosesets, a resource suffix of mp3, that is, candidate resource 1 is an audio file named choosesets, candidate resource 2 is "choosesets.png", candidate resource 2 has a resource name of choosesets, and a resource suffix of png, that is, candidate resource 1 is an image named choosesets.
In the embodiment of the application, when presenting each candidate resource, the following two presentation modes can be adopted:
in the first presentation mode, the resource description information corresponding to each candidate resource is presented in parallel.
And in a second presentation mode, presenting the resource description information corresponding to each candidate resource in a tree structure according to the hierarchical relationship among the candidate resources. The hierarchical relationship is used to characterize the upper and lower relationships between the candidate resources.
Considering that if there are more candidate resources, it takes a long time for the target object to search the resource description information of the target resource one by one from the resource description information of all the candidate resources displayed in parallel, resulting in lower resource access efficiency, in the second presentation mode, the resource description information corresponding to each candidate resource is presented in a tree structure according to the hierarchical structure between each candidate resource.
In the embodiment of the present application, in the tree structure, a root node corresponding to a resource type may be referred to as a root resource, and a child node may be referred to as a lower resource.
In the second presentation mode, the resource description information corresponding to each candidate resource contained in each resource type is presented in a tree structure according to the hierarchical relationship for each resource type in the operation interface. Correspondingly, the electronic equipment can respond to the triggering operation of the target object for each level of resources and sequentially present corresponding lower level resources.
Fig. 4 is a schematic diagram of an operation interface of a configuration portal according to an embodiment of the present application, where a left area of the operation interface is used for presenting resource description information corresponding to each candidate resource, and a right area is used for presenting triggered candidate resources, that is, a right area is used for presenting target resources.
In the left region of the operation interface, four root resources of pages, icons, components, and resources (i.e., static resources) are contained.
Taking a page as an example, the candidate resources with the resource type being the page include: the candidate resources of the COB production line, the automobile production line, the air conditioner assembly and the like are all stored in a folder 'example scene', namely, the page is a root resource, the lower resource of the page is the folder 'example scene', and the lower resource of the folder 'example scene' is the COB production line, the automobile production line and the air conditioner assembly waiting for selecting resources. After clicking the page in the operation interface, the target object presents the subordinate resources of the page in the operation interface: folder "example scene", when the target object can click on the folder "example scene", the lower resource of the folder "example scene" is presented: and the COB production line, the automobile production line and the air conditioner assembly wait for selecting resource description information corresponding to the resources respectively, wherein the resource description information comprises corresponding resource names and resource thumbnails. And after the target object clicks the thumbnail of the COB production line, presenting the page corresponding to the COB production line in the right area. The page corresponding to the COB production line comprises COB test equipment, plasma cleaning equipment and other production line equipment, and the connection relation among the production line equipment is contained.
Taking a resource (i.e., a static resource) as an example, referring to fig. 5, the static resource is a root resource, and the lower resource of the static resource includes a folder "2D", a folder "scene case", a folder "model library", a folder "map", a folder "system", a folder "tent", and a folder "user", where the folder "map" includes a folder "media", and the folder "media" includes a "panel light effect, png", "corner light effect, png", and a "selected light effect, png" to wait for a selected resource.
Referring to fig. 6, after a target object clicks on a resource in an operation interface, a lower resource of a static resource is presented in the operation interface: folder "2D", folder "scene case", folder "model library", folder "map", folder "system", folder "tent", folder "user", and when a target object can click on folder "map", a lower resource of folder "map" is presented: folder "media", further, when the target object clicks on folder "media", the lower resource of folder "media" is presented: "Panel light efficiency. Png", "corner light efficiency. Png", "selected light efficiency. Png" awaits selection of resources.
When the process of obtaining the target resource is based on the actual access address, the electronic equipment sends the actual access address of the target resource to the file server, and after the file server receives the actual access address of the target resource, the target resource is obtained based on the actual access address, and the target resource is returned to the electronic equipment.
In some embodiments, the resource identification may be stored by an identification database, and in particular, resource initialization may be performed by, but is not limited to, the following: when the target service is determined not to be initialized by the resources, the electronic equipment uploads all original resources to the cloud server; the file server may generate, after storing each original resource, an original resource identifier of each original resource, and return, to the electronic device, the original resource identifier of each original resource. The electronic equipment receives the original resource identifiers of the original resources returned by the cloud server; and obtaining an original resource catalog based on the received original resource identifiers, and storing the original resource catalog into an identifier database. Correspondingly, after the target resource identification of the uploaded target resource is obtained, the electronic equipment updates the original resource catalog based on the target resource identification, generates the target resource catalog, and stores the target resource catalog into the identification database.
In the embodiment of the application, the target resource catalog can contain the resource identification of each candidate resource, and each candidate resource can comprise the target resource and other candidate resources. The target resource directory may be generated by arranging respective resource identifiers of the candidate resources in a tree structure according to a hierarchical relationship between the candidate resources. Other candidate resources may be resources generated when the target service is run in the previous node, i.e., object creation resources, or default resources. The default resource may also be referred to herein as the original resource.
Referring to fig. 7, a schematic diagram of a possible target resource directory provided in the embodiment of the present application is shown, where the target resource directory includes candidate resource 1, candidate resource 2, … …, candidate resource 5, and the like, and only taking candidate resource 1 and candidate resource 2 as examples, both candidate resource 1 and candidate resource 2 are located in a folder "media", that is, candidate resource 1 and candidate resource 2 are located at the same level, and the resource ID of candidate resource 1 is "dashboard_default_b988d3", and the resource ID of candidate resource 2 is "dashboard_default_f893c2".
Through the implementation mode, when the resource is initialized, the resource is stored in the file server, the resource identifier is stored in the identifier database, data isolation is realized, the probability of resource tampering and misoperation risks in a containerized environment is avoided to a certain extent, and the resource safety is improved.
In some embodiments, the electronic device may determine whether the target service has been resource initialized by, but not limited to, the following:
when the target service is determined to be started in the target node, the electronic equipment sends a resource catalog acquisition request to the identification server and receives a resource catalog acquisition response returned by the identification server. If the resource catalog acquisition response characterizes that the resource catalog does not exist, the target service is determined not to be initialized by the resource. If the resource catalog acquisition response table carries the resource catalog, determining that the target service has initialized the resource.
The fact that the resource catalog is not represented by the resource catalog acquisition response may refer to the fact that the resource catalog is not carried in the resource catalog acquisition response, or may refer to the fact that the indication information representing that the resource catalog is not represented in the resource target acquisition response, which is not limited.
In some embodiments, when obtaining the original resource catalog based on the received original resource identifications, the electronic device may assemble the obtained original resource identifications based on a hierarchical relationship between the original resources to obtain the original resource catalog.
For example, referring to fig. 8A, each original resource includes original resource 1, original resource 2, … …, original resource m, m is a positive integer, original resource identifiers of original resource 1, original resource 2, … …, original resource m are ID1, ID2, … …, IDm, respectively, in a hierarchical relationship among the original resources, original resource 1 is located in folder a, original resource 2, … …, original resource m is located in folder B, folder a is a subfolder of folder X, folder B is a subfolder of folder C of folder X, and the electronic device assembles the obtained ID1, ID2, … …, IDm based on the hierarchical relationship among original resource 1, original resource 2, … …, original resource m, to obtain the original resource directory.
When uploading the target resource to the file server, the electronic device may upload the file by creating a bucket (bucket).
Correspondingly, the original resource catalog is updated based on the target resource identifier, and when the target resource catalog is generated, the electronic device can add the target resource identifier to the original resource catalog based on the storage position of the target resource in the original resource catalog to generate the target resource catalog. The storage location of a target resource in the original resource directory may also be referred to as a resource path.
For example, referring to fig. 8B, assuming that the target resource is resource z, the resource z is stored in the folder a, the electronic device adds the resource identifier IDz of the resource z to the original resource directory based on the storage location of the resource z in the original resource directory, and generates the target resource directory.
By the implementation mode, the original resources are stored in the file server to initialize the system resources, so that a resource creation function of the user-defined resources is provided for the user on the basis of the original resources, and the configuration efficiency is improved.
In some embodiments, the electronic device may store the original resource catalog into the identification database after generating the original resource catalog. Similarly, after generating the target resource catalog, the electronic device stores the target resource catalog in the identification database. When the electronic device stores the target resource catalog in the identification database, the following two possible ways may be used, but are not limited to:
As one possible directory update approach, the electronic device sends the target resource directory to the identification database, so that the identification database replaces the stored original resource directory with the target resource directory.
The electronic device sends a catalog update request to the identification database, the target update request carries a target resource catalog, when the identification database receives the catalog update request, the original resource catalog is replaced by the target resource catalog, a catalog update response is returned to the electronic device, and when the electronic device receives the catalog update response returned by the identification database, the target resource target stored in the identification database is determined.
As another possible directory updating manner, the target resource identifier and the resource path of the target resource are sent to the identifier database, so that the identifier database updates the original resource directory based on the target resource identifier and the resource path of the target resource, and the target resource directory is obtained and stored.
The electronic device sends a catalog update request to the identification database, wherein the target update request carries a target resource identifier and a resource path of the target resource, stores the resource path of the target resource when the identification database receives the catalog update request, returns a catalog update response to the electronic device, and determines that the identification database stores the target resource target when the electronic device receives the catalog update response returned by the identification database.
In the embodiment of the present application, only the update process of the original resource directory based on the target resource directory is described as an example, and similarly, the resource directories stored in the identification database may be updated in the two directory update manners.
For example, referring to fig. 9, when initializing a resource and creating the resource, the interaction process among the terminal device, the electronic device, the file server, and the identification database is as follows:
and S901, the electronic equipment sends a resource catalog acquisition request to the identification server.
S902, the electronic equipment receives a resource catalog acquisition response returned by the identification server, wherein the resource catalog is not carried in the resource catalog acquisition response. The electronic device determines that the resource initialization has not been performed.
S903, the electronic device uploads the original resources to a file server.
S904, the file server returns the original resource identification of each original resource to the electronic equipment.
S905, the electronic equipment obtains an original resource catalog based on the received original resource identifiers.
S906, the electronic equipment stores the original resource catalog into an identification database. Specifically, the electronic device sends a catalog writing request to the identification database, the target writing request carries the target resource catalog, and when receiving a catalog writing success response returned by the identification database, the electronic device determines to store the original resource catalog to the identification database.
S907, the electronic device uploads the target resource to the file server in response to the uploading operation for the target resource.
S908, the file server returns the target resource identification to the electronic equipment.
S909, the electronic equipment updates the original resource catalog based on the target resource identifier to generate the target resource catalog.
S910, the electronic equipment sends a catalog update request to the identification database, wherein the catalog update request carries a target resource catalog.
S911, the electronic device receives the catalog update response returned by the identification database.
When a directory update response returned by the identification database is received, the electronic device determines that the identification database has stored the target resource target.
It should be noted that, in the embodiment of the present application, when updating the original resource directory stored in the identifier database, the electronic device may also send a directory update request carrying the storage location and the target resource identifier to the identifier database, so that the identifier database adds the target resource identifier to the original resource directory to obtain the target resource directory based on the storage location of the target resource in the original resource directory, where in S909 may be executed before S910 or after S910.
In some embodiments, considering that the resource amount is larger, in order to improve the resource access speed, the resources may be loaded in a layered manner, and in embodiments of the present application, when determining that the target object triggers the target resource type, the electronic device may obtain, from the identifier database, a target resource directory corresponding to the target resource type, where the target resource directory corresponding to the target resource type includes respective resource identifiers of candidate resources under the resource type.
Specifically, the electronic device responds to a triggering operation of a target object for a target resource type, determines each candidate resource belonging to the target resource type from candidate resources of each candidate resource type, and presents each candidate resource of the target resource type in an operation interface, wherein each candidate resource comprises the target resource. The target resource type may be any of the root resources above.
It should be noted that, the candidate resources of each candidate resource type may be candidate resources stored in the target resource directory.
In the process of acquiring the target resource catalog corresponding to the target resource type, the electronic equipment can send a resource catalog acquisition request carrying the target resource type to the identification database, and receive a resource catalog acquisition response carrying the target resource catalog returned by the identification database to acquire the target resource catalog.
For example, the target object triggers a root resource "page", the electronic device determines, from the target resource directory, each candidate resource belonging to the target resource type "page" in response to a triggering operation of the target object for the target resource type "page", and supposedly, each candidate resource belonging to the target resource type "page" includes: COB production line, automobile production line, air conditioner equipment wait for select the resource, presents COB production line, automobile production line, air conditioner equipment wait for select the resource in operating interface.
Through the implementation mode, the resource loading speed is improved through layered loading, and meanwhile, the resource updating and storing pressure is reduced, so that the system performance is improved.
In some embodiments, if the resource type of the target resource is a page, the electronic device obtains the respective resource identifier of at least one resource to be loaded when determining that the target resource includes at least one resource to be loaded; the electronic equipment obtains the actual access address of each of the at least one resource to be loaded based on the resource identifier of each of the at least one resource to be loaded, and obtains and presents the at least one resource to be loaded based on the actual access address of each of the at least one resource to be loaded.
The resource to be loaded refers to a resource which needs to be acquired through analysis. Resources to be loaded include, but are not limited to, dynamic icons.
For example, when the electronic device determines that the target resource includes a resource of a set type, it determines that the target resource includes a resource to be loaded. The setting type is related to a resource type of the target resource, where the setting type is a resource type of the target resource that needs to be obtained through analysis, for example, the resource type of the target resource is a page, and the setting type may be a dynamic icon, a script file, or the like.
And the electronic equipment can send the respective actual access address of the at least one resource to be loaded to the cloud server in the process of obtaining the at least one resource to be loaded based on the respective actual access address of the at least one resource to be loaded. And after receiving the respective actual access addresses of the at least one resource to be loaded, the cloud server obtains the at least one resource to be loaded based on the respective actual access addresses of the at least one resource to be loaded, and returns the at least one resource to be loaded to the electronic equipment.
For example, referring to fig. 10, it is assumed that the target resource is a COB production line in the page, after the target object clicks the COB production line in the operation interface, the electronic device obtains the resource identifier of the COB production line, and obtains the actual access address of the page "COB production line" according to the resource identifier of the page "COB production line", and further obtains the page "COB production line" based on the actual access address of the page "COB production line", and it is assumed that a dynamic icon exists in the page "COB production line", and the dynamic icon is a flashing light, that is, the page "COB production line" has a resource to be loaded, and at this time, the electronic device obtains the actual access address of the dynamic icon based on the resource identifier of the dynamic icon, and sends the actual access address of the dynamic icon to the cloud server. And after receiving the actual access address of the dynamic icon, the cloud server obtains the dynamic icon based on the actual access address of the dynamic icon and returns the dynamic icon to the electronic equipment. And after the electronic equipment receives the dynamic icon, the dynamic icon is presented in the operation interface.
Through the implementation manner, when the reference exists in the target resource (e.g. page), the target resource and the resources to be loaded can be presented after each resource to be loaded is acquired.
In some embodiments, resource editing may also be performed in, but is not limited to, the following ways:
the electronic equipment responds to the editing operation aiming at the target resource to obtain an edited new resource, uploads the new resource to the file server and receives the resource identifier of the new resource returned by the file server; based on the target resource identification of the target resource, obtaining the actual access address of the target resource in the cloud server, and based on the actual access address of the target resource, deleting the target resource from the file server; updating the target resource identification stored in the identification database based on the resource identification of the new resource.
For example, referring to fig. 11, the interaction flow between the terminal device, the electronic device, the file server, and the identification database is as follows:
s1101, the terminal equipment responds to the editing operation for the target resource to obtain the edited new resource.
And S1102, the terminal equipment sends the edited new resources to the electronic equipment.
And S1103, the electronic equipment uploads the new resources to the file server.
S1104, the electronic equipment receives the resource identification of the new resource returned by the file server.
S1105, the electronic equipment obtains a target resource identifier of the target resource through the identifier database.
Specifically, the electronic device may send a resource identifier query request to the identifier database according to a resource path of the target resource, where the resource path of the target resource is used to indicate a location of the target resource in the target resource directory. And after receiving the resource identification inquiry response of the target resource returned by the identification database, the electronic equipment acquires the target resource identification carried in the resource identification inquiry response.
S1106, the electronic equipment obtains an actual access address of the target resource in the cloud server based on the target resource identification of the target resource.
S1107, the electronic equipment deletes the target resource from the file server based on the actual access address of the target resource. Specifically, the electronic device judges whether the target resource is an original resource, if the target resource is the original resource, the target resource is not deleted in the file server, if the target resource is an object creation resource, a resource deletion request is sent to the file server based on an actual access address of the target resource, and when a resource deletion success response returned by the file server is received, the target resource is determined to be deleted from the file server.
By deleting the object creation resource, the data storage pressure of the identification database can be reduced, and meanwhile, the original resource is not deleted, so that the normal operation of the system can be ensured.
S1108, the electronic equipment updates the target resource identification stored in the identification database based on the resource identification of the new resource. Specifically, the electronic device updates the original resource catalog based on the resource identifier of the new resource to generate a new resource catalog, then the electronic device sends a catalog update request to the identification database, the catalog update request carries the new resource catalog, and when receiving a catalog update success response returned by the identification database, the electronic device determines that the target resource identifier stored in the identification database is updated.
S1109, the terminal equipment receives a resource uploading result returned by the electronic equipment.
In the embodiment of the present application, the target object may be edited for the original resource, and the resource editing process for the original resource is the same as the resource editing process for the target resource, which is not described herein.
According to the implementation mode, in the process of editing the resources, the file server and the identification database are updated, so that dynamic maintenance of data is realized.
In some embodiments, referring to fig. 12, an interaction flow between a terminal device, an electronic device, a file server, and an identifier database in a resource deletion process provided in the embodiments of the present application is as follows:
s1201, the terminal equipment responds to the deleting operation of the target object for the target resource, and acquires the resource path of the target resource. In the embodiment of the present application, the target object may be deleted for one resource, or may be deleted for all or part of the resources in one folder, which is not limited. Here, deletion of one resource is only described as an example.
S1202, the terminal equipment sends the resource path of the target resource to the electronic equipment.
And S1203, when the target resource is determined not to belong to the original resource, the electronic equipment sends a resource deleting request to the file server based on the actual access address of the target resource.
And S1204, the electronic equipment receives a resource deletion success response returned by the file server.
And S1205, the electronic equipment returns a resource deletion success response to the terminal equipment.
Furthermore, the electronic device may update the resource catalog currently stored in the identification database, or may not update the resource catalog, which is not limited. The updating process of the resource directory in the identification database is referred to as the resource directory updating process above, and will not be described herein.
In some embodiments, resource renaming may be performed in, but is not limited to, the following ways:
the terminal equipment responds to renaming operation of the target object for the target resource, acquires an original resource path and a target resource path of the target resource, and sends the original resource path and the target resource path of the target resource to the electronic equipment. In the embodiment of the present application, the target object may be renamed for one resource, or may be renamed for all or part of the resources in one folder, which is not limited. Only renaming to one resource is described herein.
After the electronic equipment receives the original resource path and the target resource path of the target resource, when the resource path of the target resource, the original resource path is modified into the target resource path. Further, the electronic device may update or not update the resource catalog currently stored in the identification database, which is not limited.
In some embodiments, in order to avoid security problems such as resource loss caused by leakage of the target resource identifier, a signature mechanism is added in the embodiments of the present application. Specifically, when the electronic device obtains the actual access address of the target resource in the cloud server based on the target resource identifier, the following manner may be adopted, but is not limited to:
The electronic equipment generates signature information of the target object based on the resource information of the target resource, wherein the signature information is used for representing that the target object has resource access rights; and the electronic equipment obtains the actual access address of the target resource in the cloud server based on the target resource identification and the signature information.
Wherein, the resource information may contain at least one of a resource name and a resource suffix. In the embodiment of the present application, the target object may refer to a user, or may refer to an account used by the user, or the target object may refer to a tenant, or may refer to an account used by the tenant.
In the process of generating the signature information of the target object based on the resource information of the target resource, the electronic device generates the signature information of the target object through a GetPreSign interface for generating the signature information according to the resource prefix and the resource name.
Specifically, based on the actual access address, the following implementation manner may be adopted in the process of obtaining the target resource: a resource acquisition request is sent to a file server, wherein the resource acquisition request carries an actual access address and signature information, so that the file server judges whether a target object has resource access rights or not based on the signature information; and receiving a target resource returned by the file server when the resource access right exists in the target object.
Through the implementation mode, the authentication and the authority control are carried out on the target object through the signature information, so that the resources can be prevented from being tampered, accessed and modified to a certain extent, the safety and the reliability of the data are ensured, and in addition, the use of multiple tenants and multiple accounts can be realized based on the authority control.
In some embodiments, in order to improve access efficiency, if the target object accesses the target resource for the first time, the actual access address of the target resource is cached, and when the target object accesses the target resource again within a certain period of time, the actual access address of the cached target resource may not be generated again, but the actual access address of the target resource is directly adopted to obtain the target resource.
Specifically, the electronic device may record the address obtaining time of the actual access address, and store the actual access address of the target resource into the cache; responding to triggering operation for the target resource again, and determining waiting time between the re-triggering time and the address obtaining time; and when the waiting time does not exceed the preset cache time, acquiring the actual access address of the target resource from the cache, and acquiring the target resource again based on the actual access address of the target resource.
For example, the preset cache duration may be 30 minutes, and when the target resource is triggered again and the duration between the time of triggering again and the time of obtaining the address does not exceed 30 minutes, the actual access address of the target resource is obtained from the cache, and the target resource is obtained again based on the actual access address of the target resource.
In the embodiment of the application, when the target object uploads the file, the terminal device may obtain the actual access address of the file through the file prefix and the file name and by using the GetPreSign interface. After uploading the file, the terminal device may update the file prefix and the file name of the uploaded file into the resource directory through resource update (UploadSource), and the update process of the resource directory is the same as the above resource update process, which is not described herein. And after refreshing the resource catalogue, the terminal equipment presents a new resource catalogue.
For example, referring to fig. 13, the interaction flow among the terminal device, the electronic device, and the file server is as follows:
s1301, the terminal equipment sends a resource catalog acquisition request to the electronic equipment.
S1302, the electronic equipment acquires a target resource catalog. As one possible implementation manner, the electronic device requests the target resource catalog from the identification server, acquires the target resource catalog, and as another possible implementation manner, the electronic device directly stores the target resource catalog locally.
S1303, the electronic device returns the target resource catalog to the terminal device. In some embodiments, the terminal device may also present the acquired target resource catalog to the target object.
S1304, the terminal equipment responds to the triggering operation aiming at the target resource, and obtains the target resource identification of the target resource based on the target resource catalog.
And S1305, the terminal equipment sends the signature information of the target object to the electronic equipment. The signature information may be generated by the terminal device using a GetPreSign interface based on the resource information of the target resource.
S1306, the electronic equipment obtains the actual access address and the authorized expiration time of the target resource in the file server based on the target resource identification and the signature information. The authorization expiration time is determined based on the address acquisition time and a preset cache time length.
And S1307, the electronic equipment returns the actual access address and the authorized expiration time to the terminal equipment.
S1308, the terminal device caches the actual access address and the authorization expiration time. The terminal device may also cache the resource path of the target resource.
And S1309, the terminal equipment sends a resource access request to the file service according to the actual access address.
S1310, the terminal equipment receives a resource access response carrying the target resource returned by the file server.
S1311, the terminal equipment triggers the target resource again, and when the current time does not exceed the authorized expiration time, the actual access address of the target resource is obtained from the cache.
S1312, the terminal equipment sends a resource access request to the file service according to the actual access address.
In some embodiments, the terminal device generates signature information using a GetPreSign interface based on a resource prefix and a resource name of the target resource in response to a resource upload operation for the target resource, and transmits the signature information to the electronic device. The electronic equipment generates an actual access address of the target resource in the file server based on the target resource identification and the signature information, and returns the actual access address to the terminal equipment. After receiving the actual access address returned by the electronic equipment, the terminal equipment converts the File format of the target resource into a File format standard File, and uploads the target resource to the File server through the actual access address. Further, after uploading the target resource to the file server, the terminal device may update the resource directory stored in the electronic device through the resource directory update interface according to the resource prefix and the resource name of the target resource, so that the terminal device receives the updated resource directory returned by the electronic device, and presents the updated resource directory.
The present application will be described below by taking an example in which a target service is operated at the previous node.
Referring to fig. 14, the application scenario includes a terminal device, an electronic device, a signature service, a file server, a cache, and an identifier database, where the file server is seeiedfs, the cache is Redis, and the identifier database is DB. The electronic equipment comprises a configuration back end and two configuration storage modules. The interaction flow among the terminal equipment, the electronic equipment, the signature service, the file server, the cache and the identification database is as follows:
s1401, the configuration back end of the electronic device sends an initialization request to the configuration storage.
S1402, the configuration storage of the electronic equipment sends a signature generation request to the signature service. The signature generation request may carry object information of the target object. The signature generation request may also carry a platform certificate.
S1403, the signature service returns signature information to the electronic device.
S1404, the configuration storage of the electronic device uploads each original resource to the file server.
S1405, the configuration storage of the electronic device receives the original resource identifiers of the original resources returned by the file server.
S1406, the configuration storage of the electronic device organizes the original resource identifiers of the original resources to obtain an original resource catalog.
S1407, the configuration storage of the electronic equipment stores the original resource catalog into the identification database.
S1408, the configuration storage of the electronic device receives a catalog writing response returned by the identification database. The directory write response may carry a database identification of the database.
S1409, the configuration storage of the electronic equipment stores the original resource catalog into a cache.
S1410, the configuration storage of the electronic device receives the target write response returned by the cache.
S1411, the configuration storage of the electronic equipment returns an initialization response to the configuration back end.
S1412, when the terminal equipment determines that the configuration is loaded for the first time, a default resource acquisition request is sent to the configuration back end of the electronic equipment.
S1413, the configuration back end of the electronic equipment forwards the default resource acquisition request to the configuration storage of the electronic equipment.
S1414, the configuration storage of the electronic equipment sends a resource catalog acquisition request to the cache.
S1415, the configuration storage of the electronic device receives the original resource catalog from the cache.
S1416, the configuration storage of the electronic equipment sends a resource acquisition request to the file server based on the original resource catalog and signature information.
S1417, the configuration storage of the electronic equipment receives the original resources returned by the file server.
S1418, the configuration back end of the electronic equipment receives the original resources returned by the configuration storage.
S1419, the terminal equipment receives the original resources returned by the configuration back end of the electronic equipment.
S1420, the terminal equipment responds to the uploading operation of the target object for the target resource and sends a resource uploading request to the configuration back end of the electronic equipment.
S1421, the configuration back end of the electronic device forwards the resource uploading request to the configuration storage of the electronic device.
S1422, the configuration storage of the electronic equipment uploads the target resource to the file server based on the signature information.
S1423, the configuration storage of the electronic device receives the target resource identification of the target resource returned by the file server.
S1424, the configuration storage of the electronic device sends a catalog update request to the identification database, wherein the catalog update request carries the target resource identification and the resource path of the target resource.
S1425, the configuration storage of the electronic equipment receives a catalog update response returned by the identification database.
S1426, the configuration storage of the electronic equipment updates the original resource catalog based on the target resource identifier to obtain the target resource catalog.
S1427, the configuration storage of the electronic device sends a catalog update request to the cache, wherein the catalog update request carries the target resource catalog.
S1428, the configuration storage of the electronic equipment receives the directory update response returned by the cache, and sends the directory update response to the configuration back end.
S1429, the configuration back end sends the catalog update response to the terminal equipment.
Based on the same inventive concept, the embodiment of the application provides a resource access device. As shown in fig. 15, which is a schematic structural diagram of the resource access device 1500, may include:
an identifier obtaining unit 1501, configured to respond to an upload operation for a target resource, upload the target resource to a cloud server, and receive a target resource identifier of the target resource returned by the cloud server;
the resource obtaining unit 1502 is configured to obtain, in response to a trigger operation for a target resource, an actual access address of the target resource in the cloud server based on the target resource identifier, and obtain the target resource based on the actual access address.
As a possible implementation manner, the identifier obtaining unit 1501 is further configured to:
when the target service is determined not to initialize the resources, uploading each original resource to the cloud server, and receiving the original resource identifiers of each original resource returned by the cloud server;
Based on each received original resource identifier, obtaining the original resource catalog, and storing the original resource catalog into the identifier database;
after receiving the target resource identifier of the target resource returned by the cloud server, in response to a trigger operation for the target resource, before obtaining, based on the target resource identifier, an actual access address of the target resource in the cloud server, the identifier obtaining unit 1501 is further configured to:
updating the original resource catalog based on the target resource identifier, generating the target resource catalog, and storing the target resource catalog into the identifier database.
As a possible implementation manner, when the obtaining the original resource directory based on the received original resource identifiers, the identifier obtaining unit 1501 is specifically configured to:
assembling the obtained original resource identifiers based on the hierarchical relation among the original resources to obtain the original resource catalogue;
updating the original resource catalog based on the target resource identifier to generate the target resource catalog, including:
and adding the target resource identification into the original resource catalog based on the storage position of the target resource in the original resource catalog, and generating the target resource catalog.
As a possible implementation manner, when the target resource directory is stored in the identifier database, the identifier obtaining unit 1501 is specifically configured to:
transmitting the target resource catalog to the identification database so that the identification database replaces the stored original resource catalog with the target resource catalog; or alternatively, the process may be performed,
and sending the target resource identifier and the resource path of the target resource to the identifier database, so that the identifier database updates the original resource catalog based on the target resource identifier and the resource path of the target resource to obtain and store the target resource catalog.
As a possible implementation manner, when the determining that the target service does not perform resource initialization, the identifier obtaining unit 1501 is specifically configured to:
when the target service is determined to be started in the target node, sending a resource catalog acquisition request to the identification database, and receiving a resource catalog acquisition response returned by the identification database;
and when the resource catalog is not carried in the resource catalog acquisition response, determining that the target service does not initialize the resource.
As a possible implementation, the resource acquisition unit 1502 is further configured to:
Responding to a triggering operation of a target object aiming at a target resource type, and determining each candidate resource belonging to the target resource type from candidate resources of each candidate resource type;
and presenting each candidate resource of the target resource type in an operation interface, wherein each candidate resource comprises the target resource.
As a possible implementation, the resource acquisition unit 1502 is further configured to:
responding to the editing operation aiming at the target resource, obtaining an edited new resource, uploading the new resource to the cloud server, and receiving a resource identifier of the new resource returned by the cloud server;
acquiring an actual access address of the target resource in the cloud server based on the target resource identifier, and deleting the target resource from the cloud server based on the actual access address;
updating the target resource identification stored in the identification database based on the resource identification of the new resource.
As a possible implementation, the resource acquisition unit 1502 is further configured to:
if the resource type of the target resource is a page, when the target resource is determined to contain at least one resource to be loaded, acquiring the respective resource identification of the at least one resource to be loaded;
Based on the respective resource identification of the at least one resource to be loaded, the respective actual access address of the at least one resource to be loaded is obtained, and based on the respective actual access address of the at least one resource to be loaded, the at least one resource to be loaded is obtained.
As a possible implementation manner, when the obtaining, based on the target resource identifier, an actual access address of the target resource in the cloud server, the resource obtaining unit 1502 is specifically configured to:
generating signature information of a target object based on resource information of the target resource, wherein the signature information is used for representing that the target object has resource access rights;
and acquiring an actual access address of the target resource in the cloud server based on the target resource identification and the signature information.
As a possible implementation, the resource acquisition unit 1502 is further configured to:
recording the address obtaining time of the actual access address, and storing the actual access address of the target resource into a cache;
responding to triggering operation for the target resource again, and determining waiting time between the triggering time again and the address obtaining time;
And when the waiting time does not exceed the preset cache time, acquiring the actual access address of the target resource from the cache, and acquiring the target resource again based on the actual access address of the target resource.
As a possible implementation manner, when the target resource is obtained based on the actual access address, the resource obtaining unit 1502 is specifically configured to:
a resource acquisition request is sent to the cloud server, wherein the resource acquisition request carries the actual access address and the signature information, so that the cloud server judges whether a target object has resource access rights or not based on the signature information;
and receiving the target resource returned by the cloud server after determining that the target object has the resource access authority.
For convenience of description, the above parts are described as being functionally divided into modules (or units) respectively. Of course, the functions of each module (or unit) may be implemented in the same piece or pieces of software or hardware when implementing the present application.
The specific manner in which the respective units execute the requests in the apparatus of the above embodiment has been described in detail in the embodiment concerning the method, and will not be described in detail here.
Those skilled in the art will appreciate that the various aspects of the application may be implemented as a system, method, or program product. Accordingly, aspects of the application may be embodied in the following forms, namely: an entirely hardware embodiment, an entirely software embodiment (including firmware, micro-code, etc.) or an embodiment combining hardware and software aspects may be referred to herein as a "circuit," module "or" system.
Based on the same inventive concept, the embodiment of the application also provides electronic equipment. In one embodiment, the electronic device may be a server or a terminal device. Referring to fig. 16, which is a schematic structural diagram of one possible electronic device provided in an embodiment of the present application, in fig. 16, an electronic device 1600 includes: a processor 1610 and a memory 1620.
The memory 1620 stores a computer program executable by the processor 1610, and the processor 1610 can execute the steps of the resource access method by executing the instructions stored in the memory 1620.
The memory 1620 may be a volatile memory (RAM) such as a random-access memory (RAM); the Memory 1620 may be a nonvolatile Memory (non-volatile Memory), such as a Read-Only Memory (ROM), a flash Memory (flash Memory), a hard disk (HDD) or a Solid State Drive (SSD); or memory 1620 is any other medium capable of carrying or storing desired program code in the form of instructions or data structures and of being accessed by a computer, but is not limited to such. The memory 1620 may be a combination of the above memories.
Processor 1610 may include one or more central processing units (central processing unit, CPU) or digital processing units, etc. A processor 1610, configured to implement the above-described resource access method when executing the computer program stored in the memory 1620.
In some embodiments, processor 1610 and memory 1620 may be implemented on the same chip, or they may be implemented separately on separate chips in some embodiments.
The specific connection medium between the processor 1610 and the memory 1620 is not limited in the embodiment of the present application. In the embodiment of the present application, the processor 1610 and the memory 1620 are connected by a bus, which is depicted in fig. 16 by a thick line, and the connection manner between other components is only schematically illustrated, and is not limited thereto. The buses may be divided into address buses, data buses, control buses, etc. For ease of description, only one thick line is depicted in fig. 16, but only one bus or one type of bus is not depicted.
Based on the same inventive concept, an embodiment of the present application provides a computer readable storage medium comprising a computer program for causing an electronic device to perform the steps of the above-mentioned resource access method when the computer program is run on the electronic device. In some possible embodiments, aspects of the resource access method provided by the application may also be implemented in the form of a program product comprising a computer program for causing an electronic device to perform the steps of the resource access method described above, when the program product is run on the electronic device, e.g. the electronic device may perform the steps as shown in fig. 3.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, a RAM, a ROM, an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (Compact Disk Read Only Memory, CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The program product of embodiments of the present application may take the form of a CD-ROM and comprise a computer program and may run on an electronic device. However, the program product of the present application is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a computer program for use by or in connection with a command execution system, apparatus, or device.
The readable signal medium may comprise a data signal propagated in baseband or as part of a carrier wave in which a readable computer program is embodied. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a computer program for use by or in connection with a command execution system, apparatus, or device.
While preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present application without departing from the spirit or scope of the application. Thus, it is intended that the present application also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (15)

1. A method for accessing resources, comprising:
responding to uploading operation for a target resource, uploading the target resource to a cloud server, and receiving a target resource identifier of the target resource returned by the cloud server;
and responding to a triggering operation for a target resource, acquiring an actual access address of the target resource in the cloud server based on the target resource identifier, and acquiring the target resource based on the actual access address.
2. The method of claim 1, wherein the responding to the uploading operation for the target resource, before uploading the target resource to the cloud server, further comprises:
When the target service is determined not to initialize the resources, uploading each original resource to the cloud server, and receiving the original resource identifiers of each original resource returned by the cloud server;
based on each received original resource identifier, obtaining the original resource catalog, and storing the original resource catalog into the identifier database;
after receiving the target resource identifier of the target resource returned by the cloud server, responding to a triggering operation for the target resource, and before obtaining an actual access address of the target resource in the cloud server based on the target resource identifier, further comprising:
updating the original resource catalog based on the target resource identifier, generating the target resource catalog, and storing the target resource catalog into the identifier database.
3. The method of claim 2, wherein the obtaining the original resource catalog based on the received original resource identifications comprises:
assembling the obtained original resource identifiers based on the hierarchical relation among the original resources to obtain the original resource catalogue;
Updating the original resource catalog based on the target resource identifier to generate the target resource catalog, including:
and adding the target resource identification into the original resource catalog based on the storage position of the target resource in the original resource catalog, and generating the target resource catalog.
4. The method of claim 2, wherein the storing the target resource catalog to the identification database comprises:
transmitting the target resource catalog to the identification database so that the identification database replaces the stored original resource catalog with the target resource catalog; or alternatively, the process may be performed,
and sending the target resource identifier and the resource path of the target resource to the identifier database, so that the identifier database updates the original resource catalog based on the target resource identifier and the resource path of the target resource to obtain and store the target resource catalog.
5. The method of claim 2, wherein the determining that the target service is not resource initialized comprises:
when the target service is determined to be started in the target node, sending a resource catalog acquisition request to the identification database, and receiving a resource catalog acquisition response returned by the identification database;
And when the resource catalog is not carried in the resource catalog acquisition response, determining that the target service does not initialize the resource.
6. The method of any of claims 1-5, wherein the obtaining, in response to a trigger operation for a target resource, an actual access address of the target resource in the cloud server based on the target resource identification, further comprises:
responding to a triggering operation of a target object aiming at a target resource type, and determining each candidate resource belonging to the target resource type from candidate resources of each candidate resource type;
and presenting each candidate resource of the target resource type in an operation interface, wherein each candidate resource comprises the target resource.
7. The method of any one of claims 1-5, further comprising:
responding to the editing operation aiming at the target resource, obtaining an edited new resource, uploading the new resource to the cloud server, and receiving a resource identifier of the new resource returned by the cloud server;
acquiring an actual access address of the target resource in the cloud server based on the target resource identifier, and deleting the target resource from the cloud server based on the actual access address;
Updating the target resource identification stored in the identification database based on the resource identification of the new resource.
8. The method of any one of claims 1-5, further comprising:
if the resource type of the target resource is a page, when the target resource is determined to contain at least one resource to be loaded, acquiring the respective resource identification of the at least one resource to be loaded;
based on the respective resource identification of the at least one resource to be loaded, the respective actual access address of the at least one resource to be loaded is obtained, and based on the respective actual access address of the at least one resource to be loaded, the at least one resource to be loaded is obtained.
9. The method of any of claims 1-5, wherein the obtaining, based on the target resource identification, an actual access address of the target resource in the cloud server comprises:
generating signature information of a target object based on resource information of the target resource, wherein the signature information is used for representing that the target object has resource access rights;
and acquiring an actual access address of the target resource in the cloud server based on the target resource identification and the signature information.
10. The method of claim 9, wherein the obtaining the target resource based on the actual access address comprises:
recording the address obtaining time of the actual access address, and storing the actual access address of the target resource into a cache;
responding to triggering operation for the target resource again, and determining waiting time between the triggering time again and the address obtaining time;
and when the waiting time does not exceed the preset cache time, acquiring the actual access address of the target resource from the cache, and acquiring the target resource again based on the actual access address of the target resource.
11. The method of claim 9, wherein the obtaining the target resource based on the actual access address comprises:
a resource acquisition request is sent to the cloud server, wherein the resource acquisition request carries the actual access address and the signature information, so that the cloud server judges whether a target object has resource access rights or not based on the signature information;
and receiving the target resource returned by the cloud server after determining that the target object has the resource access authority.
12. A resource access device, comprising:
the device comprises an identification acquisition unit, a cloud server and a target resource identification unit, wherein the identification acquisition unit is used for responding to uploading operation of target resources, uploading the target resources to the cloud server and receiving target resource identifications of the target resources returned by the cloud server;
the resource acquisition unit is used for responding to the triggering operation of the target resource, acquiring the actual access address of the target resource in the cloud server based on the target resource identifier, and acquiring the target resource based on the actual access address.
13. An electronic device comprising a processor and a memory, wherein the memory stores a computer program which, when executed by the processor, causes the processor to perform the steps of the method of any of claims 1 to 11.
14. A computer readable storage medium, characterized in that it comprises a computer program for causing an electronic device to perform the steps of the method according to any one of claims 1-11 when said computer program is run on the electronic device.
15. A computer program product, characterized in that it comprises a computer program stored in a computer readable storage medium, from which computer readable storage medium a processor of an electronic device reads and executes the computer program, causing the electronic device to perform the steps of the method according to any one of claims 1-11.
CN202211274094.2A 2022-10-18 2022-10-18 Resource access method, device, equipment and storage medium Pending CN116996575A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211274094.2A CN116996575A (en) 2022-10-18 2022-10-18 Resource access method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211274094.2A CN116996575A (en) 2022-10-18 2022-10-18 Resource access method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116996575A true CN116996575A (en) 2023-11-03

Family

ID=88527161

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211274094.2A Pending CN116996575A (en) 2022-10-18 2022-10-18 Resource access method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116996575A (en)

Similar Documents

Publication Publication Date Title
US11029976B2 (en) Facilitating multi-inheritance within a single inheritance container-based environment
JP6621543B2 (en) Automatic update of hybrid applications
US10725976B2 (en) Fast recovery using self-describing replica files in a distributed storage system
US9734159B2 (en) File path modification based management
US11188499B2 (en) Storing and retrieving restricted datasets to and from a cloud network with non-restricted datasets
CN110019081A (en) Data persistence processing method, device, system and readable storage medium storing program for executing
US9965361B2 (en) Avoiding inode number conflict during metadata restoration
CN111201763B (en) Security based on file system content
CN106331075B (en) Method for storing file, metadata server and manager
CN111090498B (en) Virtual machine starting method and device, computer readable storage medium and electronic equipment
CN114385091A (en) Method and device for realizing network disk drive character, network disk and storage medium
WO2023160327A1 (en) Container image management
CN116401004A (en) Data sharing method, device, system and storage medium
US11151093B2 (en) Distributed system control for on-demand data access in complex, heterogenous data storage
US11157456B2 (en) Replication of data in a distributed file system using an arbiter
CN113688139A (en) Object storage method, gateway, device and medium
CN116996575A (en) Resource access method, device, equipment and storage medium
CN110347656A (en) The management method and device requested in document storage system
WO2019097352A1 (en) Deduplication for files in cloud computing storage and communication tools
CN111949378B (en) Virtual machine starting mode switching method and device, storage medium and electronic equipment
CN114996236A (en) Data processing method, device and equipment for converged storage system and storage medium
US11210270B2 (en) Mapping storage across storage providers
CN111459412A (en) Disk management method and device and electronic equipment
US20190392079A1 (en) Holistic mapping and relocation of social media assets
CN116340691B (en) Multi-source data-based data asset networking management and sharing method and system

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