Resource access method, apparatus, device, and storage medium

CN116996575BActive Publication Date: 2026-09-25GUANGZHOU TENCENT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211274094.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-18
Publication Date
2026-09-25
Estimated Expiration
2042-10-18

AI Technical Summary

Technical Problem

[0004]然而,由于容器的最小部署单位为容器组(Pod),Pod在重启后可以在所有容器节点之间进行漂移,且容器中不支持跨节点访问数据,因此,若以本地存储方式存储组态资源,会因Pod重启导致组件资源丢失,造成无法进行持久化地资源访问

Benefits of technology

[0016]本申请实施例中,响应于针对目标资源的上传操作,将所述目标资源上传至云服务器,并接收所述云服务器返回的所述目标资源的目标资源标识;响应于针对目标资源的触发操作,基于所述目标资源标识,获得所述目标资源在所述云服务器中的实际访问地址,并基于所述实际访问地址,获得所述目标资源。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116996575B_ABST
    Figure CN116996575B_ABST
Patent Text Reader

Abstract

The application relates to the computer technical field and provides a resource access method and device, equipment and a storage medium, which are used for realizing persistent resource access and guaranteeing normal service operation, wherein the method comprises the following steps: in response to an 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 in response to a triggering operation for the target resource, obtaining an actual access address of the target resource in the cloud server based on the target resource identifier and obtaining the target resource based on the actual access address.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and provides a resource access method, apparatus, device, and storage medium. Background Technology

[0002] With the continuous development of computer technology, containers, as an emerging lightweight virtualization technology, are widely used. Taking the Industrial Internet of Things (IIoT) scenario as an example, industrial configuration is a device association platform applied to IIoT scenarios, including but not limited to: visual page configuration, data source binding, real-time display page, and other functions.

[0003] In related technologies, industrial configuration services are deployed in a containerized manner, while industrial configuration resources are typically stored on local storage or local file servers.

[0004] However, since the smallest deployment unit of a container is a container group (Pod), a Pod can drift between all container nodes after a restart, and cross-node data access is not supported in a container, if configuration resources are stored in local storage, component resources will be lost due to Pod restart, resulting in the inability to persistently access resources.

[0005] For example, if the Pod that deploys the configuration service is container node A, and the configuration resources are stored in container node A, and the Pod restarts due to a failure or other reasons, the Pod that deploys the configuration service will be container node B. At this time, the Pod will not be able to access the component resources stored in container node A, which will affect the normal operation of the configuration service. Summary of the Invention

[0006] This application provides a resource access method and related apparatus to achieve persistent resource access and ensure normal service operation.

[0007] In a first aspect, embodiments of this application provide a resource access method, including:

[0008] In response to an upload operation for a target resource, the target resource is uploaded to the cloud server, and the target resource identifier of the target resource is returned by the cloud server.

[0009] In response to a triggered operation targeting a target resource, the actual access address of the target resource in the cloud server is obtained based on the target resource identifier, and the target resource is obtained based on the actual access address.

[0010] Secondly, embodiments of this application provide a resource access device, including:

[0011] The identifier acquisition unit is used to respond to the upload operation for the target resource, upload the target resource to the cloud server, and receive the target resource identifier of the target resource returned by the cloud server;

[0012] The resource acquisition unit is configured to respond to a trigger operation targeting a target resource, obtain the 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.

[0013] Thirdly, embodiments of this application provide an electronic device, including a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the resource access method described above.

[0014] Fourthly, embodiments of this application provide a computer-readable storage medium including a computer program, which, when run on an electronic device, causes the electronic device to perform the steps of the resource access method described above.

[0015] Fifthly, embodiments of this application provide a computer program product, the program product including a computer program stored in a computer-readable storage medium, wherein a processor of an electronic device reads from the computer-readable storage medium and executes the computer program, causing the electronic device to perform the steps of the above-described resource access method.

[0016] In this embodiment of the application, in response to an upload operation for a target resource, the target resource is uploaded to a cloud server, and the target resource identifier of the target resource returned by the cloud server is received; in response to a trigger operation for a target resource, the actual access address of the target resource in the cloud server is obtained based on the target resource identifier, and the target resource is obtained based on the actual access address.

[0017] With the above implementation, since the resources are stored in the cloud server, when a POD drift or restart occurs, even if the target resource was generated when the previous node was running the target service, the target resource can still be obtained from the cloud server, thereby ensuring the continuity of the target business. In addition, since the target resource identifier is generated by the cloud server, even if the target resource identifier is lost, it can be retrieved through the cloud server, and then the target resource can be obtained based on the target resource identifier.

[0018] Other features and advantages of this application will be set forth in the following description and will be apparent in part from the description or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings. Attached Figure Description

[0019] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0020] Figure 1 This is a schematic diagram of an application scenario provided in the embodiments of this application;

[0021] Figure 2 This is a schematic diagram of a system architecture provided in an embodiment of this application;

[0022] Figure 3 This is a flowchart illustrating a resource access method provided in an embodiment of this application;

[0023] Figure 4 This is a schematic diagram of an operation interface provided in an embodiment of this application;

[0024] Figure 5 This is a schematic diagram of an operation interface provided in an embodiment of this application before triggering resources;

[0025] Figure 6 This is a schematic diagram of an operation interface provided in an embodiment of this application after triggering a resource;

[0026] Figure 7 This is a schematic diagram of a target resource catalog provided in an embodiment of this application;

[0027] Figure 8A This is a schematic diagram of an original resource catalog provided in an embodiment of this application;

[0028] Figure 8B This is a schematic diagram of a target resource catalog provided in an embodiment of this application;

[0029] Figure 9 This is a schematic diagram illustrating the interaction between a terminal device, an electronic device, a file server, and an identification database during resource initialization and resource creation, as provided in an embodiment of this application.

[0030] Figure 10 This is a schematic diagram illustrating the interaction between an electronic device and a file server during the loading of resources to be loaded, as provided in an embodiment of this application.

[0031] Figure 11 This is a schematic diagram illustrating the interaction between a terminal device, an electronic device, a file server, and an identifier database during a resource editing process, as provided in an embodiment of this application.

[0032] Figure 12This is a schematic diagram illustrating the interaction between a terminal device, an electronic device, a file server, and an identifier database during a resource deletion process provided in this application embodiment.

[0033] Figure 13 This is a schematic diagram illustrating the interaction between a terminal device, an electronic device, and a file server during a resource upload process, as provided in an embodiment of this application.

[0034] Figure 14 This is a schematic diagram illustrating the interaction between a terminal device, an electronic device, and a file server provided in an embodiment of this application.

[0035] Figure 15 This is a schematic diagram of the structure of a resource access device provided in the embodiments of this application;

[0036] Figure 16 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0037] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings of the embodiments of this application. Obviously, the described embodiments are only some embodiments of the technical solutions of this application, and not all embodiments. Based on the embodiments recorded in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the technical solutions of this application.

[0038] The following explanations of some terms used in the embodiments of this application are provided to facilitate understanding by those skilled in the art.

[0039] Industrial Internet: The Industrial Internet is a new type of infrastructure, application model, and industrial ecosystem that deeply integrates next-generation information and communication technologies with the industrial economy. Through comprehensive connectivity of people, machines, things, and systems, it constructs a new manufacturing and service system covering the entire industrial chain and value chain, providing a pathway for the digital, networked, and intelligent development of industry and even the broader industrial sector. It is a crucial cornerstone of the Fourth Industrial Revolution. The Industrial Internet has a richer connotation and extension. Based on networks, centered on platforms, driven by data, and guaranteed by security, it serves as both the infrastructure for the digital, networked, and intelligent transformation of industry and an application model for the deep integration of the Internet, big data, and artificial intelligence with the real economy. Furthermore, it represents a new business model and a new industry that will reshape enterprise forms, supply chains, and industrial chains.

[0040] Configuration and Industrial Configuration: Configuration refers to the process of using methods and tools provided by industrial control software to complete a specific task in an engineering project. Industrial configuration is a platform mainly used in industrial internet scenarios. The platform provides drag-and-drop page configuration, data source binding, real-time page display, and other functions. Developers can customize icons and pages, implement resource isolation and sharing through an account permission system, provide access addresses for easy large-screen display or platform integration, and graphically display various collected information.

[0041] Cloud-native architecture: Cloud-native architecture is an emerging architecture for large-scale distributed systems in the Internet era. Its core functions include, but are not limited to, microservices, DevOps, containerization technology, and service governance. Driven by microservice architecture, it builds a new technology stack for Internet+, constructs large-scale distributed systems, completes the continuous integration (CI) / continuous delivery (CD) system, and uses container technology for service deployment and automated operation and maintenance, thereby reducing enterprise costs and accelerating project delivery.

[0042] Container cloud: Container cloud is a cloud service product that deploys container services on clustered servers using technologies such as Docker and Kubernetes. It can be viewed as a lightweight Linux cloud server. Users do not need to manage the underlying servers; they only need to provide container images to run containers. Each container in a container cloud is a complete service runtime environment, capable of resource and process isolation.

[0043] Docker: Docker is an open-source application container engine that allows developers to package their applications and dependencies into a portable container in a unified way, and then deploy it to a server (such as a Linux or Windows machine) with the Docker engine installed, thereby achieving virtualization. In Docker container technology, a container contains a complete runtime environment for a service.

[0044] Cloud technology refers to a hosting technology that unifies a series of resources such as hardware, software, and networks within a wide area network or local area network to achieve data computing, storage, processing, and sharing.

[0045] Cloud technology is a collective term for network technologies, information technologies, integration technologies, management platform technologies, and application technologies applied to the cloud computing business model. It can form resource pools, providing flexible and convenient on-demand access. Cloud computing technology will become a crucial support. Backend services of technical network systems require substantial computing and storage resources, such as video websites, image websites, and many portal websites. With the rapid development and application of the internet industry, every item may have its own identification mark in the future, requiring transmission to backend systems for logical processing. Data at different levels will be processed separately, and various industry data will all require robust system support, which can only be achieved through cloud computing.

[0046] Cloud computing is a computing model that distributes computing tasks across a large pool of computers, enabling various application systems to access computing power, storage space, and information services as needed. The network providing these resources is called the "cloud." From the user's perspective, resources in the "cloud" appear infinitely scalable, readily available, on-demand, and expandable, with payment based on usage.

[0047] As a provider of fundamental cloud computing capabilities, a cloud resource pool (referred to as a cloud platform, generally called Infrastructure as a Service (IaaS)) platform) is established. Various types of virtual resources are deployed in the resource pool for external customers to choose from. The cloud resource pool mainly includes: computing devices (virtualized machines containing operating systems), storage devices, and network devices.

[0048] Based on logical function, a Platform as a Service (PaaS) layer can be deployed on top of the IaaS layer, followed by a Software as a Service (SaaS) layer. Alternatively, SaaS can be deployed directly on top of IaaS. PaaS is the platform for running software, such as databases and web containers. SaaS refers to various types of business software, such as web portals and bulk SMS senders. Generally, SaaS and PaaS are upper layers compared to IaaS.

[0049] Cloud storage is a new concept that extends and develops from the concept of cloud computing. A distributed cloud storage system (hereinafter referred to as a storage system) refers to a storage system that uses cluster applications, grid technology, and distributed storage file systems to bring together a large number of storage devices of various types (storage devices are also called storage nodes) in the network to work together through application software or application interfaces to provide data storage and business access functions to the outside world.

[0050] Currently, the storage method of storage systems is as follows: Logical volumes are created. During the creation of a logical volume, physical storage space is allocated to each logical volume. This physical storage space may consist of a single storage device or the disks of several storage devices. Clients store data on a logical volume, which means storing the data on the file system. The file system divides the data into many parts, each part being an object. Each object contains not only the data but also additional information such as a data identifier (ID, ID entity). The file system writes each object to the physical storage space of that logical volume and records the storage location information of each object. Therefore, when a client requests access to data, the file system can allow the client to access the data based on the storage location information of each object.

[0051] The process by which a storage system allocates physical storage space to a logical volume is as follows: the physical storage space is pre-divided into strips according to the capacity estimate of the objects stored in the logical volume (this estimate often has a large margin relative to the actual capacity of the objects to be stored) and the grouping of Redundant Array of Independent Disks (RAID). A logical volume can be understood as a strip, thus allocating physical storage space to the logical volume.

[0052] A database, simply put, can be viewed as an electronic filing cabinet—a place to store electronic files, where users can perform operations such as adding, querying, updating, and deleting data. A "database" is a collection of data stored together in a certain way, capable of being shared by multiple users, with minimal redundancy, and independent of application programs.

[0053] The Internet of Things (IoT) refers to the use of various information sensors, RFID technology, GPS, infrared sensors, laser scanners, and other devices and technologies to collect real-time data on any object or process that needs to be viewed, connected, or interacted with. This data includes information on sound, light, heat, electricity, mechanics, chemistry, biology, location, and other parameters. Through various possible network access methods, it achieves ubiquitous connectivity between things and between things and people, enabling intelligent perception, identification, and management of objects and processes. The IoT is an information carrier based on the internet and traditional telecommunications networks, enabling all independently addressable ordinary physical objects to form an interconnected network.

[0054] Cloud IoT aims to connect the information sensed and commands received by traditional IoT devices to the Internet, truly achieving networking. It also enables massive data storage and computation through cloud computing technology. Due to the nature of IoT, which involves connecting things to each other and sensing the current operating status of each "object" in real time, a large amount of data is generated in this process. How to aggregate this information and how to sift out useful information from the massive amount of data to support decision-making for future development have become key issues affecting the development of IoT. As a result, IoT cloud based on cloud computing and cloud storage technology has become a powerful support for IoT technology and applications.

[0055] In related technologies, industrial configuration services are deployed in a containerized manner, while industrial configuration resources are typically stored on local storage or local file servers.

[0056] However, since the smallest deployment unit of a container is a container group (Pod), a Pod can migrate between all container nodes after a restart, and cross-node data access is not supported within a container. Therefore, storing configuration resources locally will result in the loss of component resources due to Pod restarts, making persistent resource access impossible. For example, if the Pod deploying the configuration service is container node A, and the configuration resources are stored in container node A, and the Pod restarts due to a failure or other reason, the Pod deploying the configuration service will now be on container node B. In this case, the Pod cannot access the component resources stored in container node A, affecting the normal operation of the configuration service.

[0057] In this embodiment of the application, in response to an upload operation for a target resource, the target resource is uploaded to a cloud server, and the target resource identifier of the target resource returned by the cloud server is received; in response to a trigger operation for a target resource, the actual access address of the target resource in the cloud server is obtained based on the target resource identifier, and the target resource is obtained based on the actual access address.

[0058] With the above implementation, since the resources are stored in the cloud server, when a POD drift or restart occurs, even if the target resource was generated when the previous node was running the target service, the target resource can still be obtained from the cloud server, thereby ensuring the continuity of the target business. In addition, since the target resource identifier is generated by the cloud server, even if the target resource identifier is lost, it can be retrieved through the cloud server, and then the target resource can be obtained based on the target resource identifier.

[0059] See Figure 1The diagram illustrates an application scenario of an embodiment of this application. The application scenario diagram includes a terminal device 110, a server 120, and a server 130. The terminal device 110, server 120, and server 130 can communicate with each other via a communication network. The communication network can be a wired network or a wireless network.

[0060] Among them, terminal device 110 is a computer device used by the user, including but not limited to personal computers, mobile phones, tablets, laptops, e-book readers, intelligent voice interaction devices, smart home appliances, vehicle terminals, aircraft, etc.

[0061] Server 120 is the server corresponding to the industrial internet platform. Server 120 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms. In the following text, Server 120 may also be referred to as the backend server.

[0062] Server 130 is a file server. Server 130 is a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery network (CDN), and big data and artificial intelligence platforms.

[0063] It should be noted that, Figure 1 The example shown is for illustration only; in reality, there is no limit to the number of terminal devices and servers.

[0064] In this embodiment of the application, the terminal device 110 may have a configuration portal corresponding to the industrial internet platform installed. The configuration portal may be a webpage or a client.

[0065] The resource access method in this application embodiment can be executed by the server or the terminal device alone, or by the server and the terminal device together. For example, in response to a trigger operation for a target resource, the server 120 obtains the target resource identifier, obtains the 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 the operation of the target service in the target node based on the target resource.

[0066] It should be noted that the embodiments in this application are only illustrated using industrial configuration scenarios as an example, but can also be applied to other types of visualization development platforms.

[0067] See Figure 2 As shown, it is a schematic diagram of an architecture provided in the embodiment of this application. The architecture includes three layers: components, industrial internet platform, and configuration portal.

[0068] The component layer provides middleware for data storage. This middleware includes, but is not limited to, file storage systems for storing resources and identifier databases for storing resource identifiers. It may also include a cache database for storing cached data. Furthermore, the component layer may also provide message middleware. For example, middleware includes MySQL, Redis, Kafka, Network File System (NFS), and SeeWeedFS, where MySQL is the identifier database, Redis is the cache database, Kafka is the message middleware, and NFS and SeeWeedFS are both file storage systems.

[0069] The industrial internet platform comprises two modules: device access management and industrial configuration. Device access management provides functions such as channel management, device management, location management, protocol access and parsing, data parsing, and device assets. Industrial configuration is the configuration support module for the industrial internet, providing functions such as file signing, configuration backend, configuration caching, and configuration resource storage, but is not limited to these.

[0070] The configuration portal provides interactive functionality with target objects. It comprises two modules: control and display, and data configuration. Control and display provides functions such as console access, resource management, dashboards, stage data management, stage operation, and file upload. Data configuration provides functions such as attribute configuration and data access.

[0071] The architecture also includes an IaaS / PaaS layer, which provides services including but not limited to Docker and Kubernetes.

[0072] For example, the target object can upload resources through the file upload function of the configuration portal. After the configuration backend in the industrial internet platform obtains the uploaded resources, it stores the uploaded resources in SeeWeedFS through configuration resource storage and stores the corresponding resource identifiers in MySQL.

[0073] In some possible implementations, to improve data processing efficiency, the resource identifier can be further stored in Redis so that it can be retrieved directly from Redis later.

[0074] In some possible implementations, to improve data security, the configuration backend in the industrial internet platform, after obtaining the uploaded resources, can also control access permissions to the target object through file signing during the process of storing the uploaded resources to SeeWeedFS via configuration resource storage.

[0075] See Figure 3 The diagram shown is a flowchart of a resource access method provided in this embodiment of the application. This method is applied to an electronic device, which is a server corresponding to an industrial internet platform. The specific process is as follows:

[0076] S301. In response to the upload operation for the target resource, upload the target resource to the cloud server and receive the target resource identifier returned by the cloud server.

[0077] The target service includes, but is not limited to, configuration services for industrial configurations. The cloud server is a file server used to store resources, such as seaweedFS. The database can be, but is not limited to, MySQL. For ease of distinction, the cloud server used for resource storage will be directly referred to as a file server. The following explanation will only use industrial configuration as the target service and seaweedFS as the cloud server as an example.

[0078] In this application embodiment, the resource types of the target resource include, but are not limited to, displays, symbols, components, static resources, and templates. Static resources include, but are not limited to, one or more of audio files, images, and video files. Components include, but are not limited to, dynamic icons, such as fan blade groups.

[0079] A resource identifier is used to determine the actual access address of a resource. A resource identifier can also be called a resource storage identifier, and it can be represented by, but is not limited to, a sequence number (ID). In this embodiment, the target resource identifier is used to determine the actual access address of the target resource, and the original resource identifier is used to determine the actual access address of the original resource. A resource identifier can be unique within the system to which the resource belongs.

[0080] S302. In response to a triggered operation targeting a target resource, obtain the 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.

[0081] In some embodiments, the configuration portal's operation interface can display resource description information corresponding to each candidate resource. The resource types of the candidate resources include, but are not limited to, one or more of the following: pages, icons, components, resources, templates, etc. When a target object performs a trigger operation on the resource description information of one of the candidate resources in the operation interface, the corresponding candidate resource is taken as the target resource, and the trigger operation is determined to be performed on the target resource.

[0082] The resource description information can be represented by at least one of the following: resource name, resource thumbnail, but is not limited to these. Triggering operations include, but are not limited to, selection operations such as clicking, long pressing, and touching.

[0083] Resource names can consist of one or more of the following: text, numbers, letters, symbols, etc. It should be noted that in this embodiment, a resource can also be understood as a file, and a resource name can also be understood as a file name. Files can be stored in folders. For multiple candidate resources located in the same folder, the resource names of the multiple candidate resources can be the same or different. If multiple candidate resources have the same resource name, they can be further distinguished by file extensions. File extensions include, but are not limited to, data formats such as mp3, png, and jpg.

[0084] For example, candidate resource 1 is "chooseseasts.mp3", the resource name of candidate resource 1 is chooseseasts, and the resource extension is mp3, that is, candidate resource 1 is an audio file named chooseseasts. Candidate resource 2 is "chooseseasts.png", the resource name of candidate resource 2 is chooseseasts, and the resource extension is png, that is, candidate resource 1 is an image named chooseseasts.

[0085] In this embodiment of the application, the following two presentation methods can be used when presenting each candidate resource:

[0086] The first presentation method presents the resource description information corresponding to each candidate resource in parallel.

[0087] The second presentation method uses a tree structure to display the resource description information of each candidate resource according to the hierarchical relationship between them. The hierarchical relationship is used to represent the superior-subordinate relationship between the candidate resources.

[0088] Considering that if there are many candidate resources, the target object will need to spend a long time searching for the resource description information of the target resource one by one from all the candidate resources displayed side by side, resulting in low resource access efficiency, the second presentation method presents the resource description information of each candidate resource in a tree structure according to the hierarchical structure between each candidate resource.

[0089] It should be noted that, in the embodiments of this application, in the tree structure, the root node corresponding to the resource type can be called the root resource, and the child node can be called the lower-level resource.

[0090] Since the candidate resources correspond to different resource types, in the second presentation method, the user interface also displays the resource description information of each candidate resource under each resource type in a hierarchical tree structure. Correspondingly, the electronic device can respond to the target object's triggering operations on resources at each level, sequentially presenting the corresponding lower-level resources.

[0091] See Figure 4 As shown, it is a schematic diagram of the operation interface of a configuration portal provided in the embodiment of this application. The left area of ​​the operation interface is used to display the resource description information corresponding to each candidate resource, and the right area is used to display the triggered candidate resource, that is, the right area is used to display the target resource.

[0092] The left side of the interface contains four root resources: page, icon, component, and resource (i.e., static resource).

[0093] Taking a page as an example, candidate resources of the page type include: COB production line, automobile production line, air conditioner assembly, etc. These candidate resources are all stored in the folder "Example Scene". That is, the page is the root resource, the sub-resource of the page is the folder "Example Scene", and the sub-resource of the folder "Example Scene" is the candidate resources such as COB production line, automobile production line, and air conditioner assembly. When the target object clicks on the page in the operation interface, the sub-resource of the page, the folder "Example Scene", is displayed. When the target object can click on the folder "Example Scene", the resource description information corresponding to each of the candidate resources in the folder "Example Scene", such as COB production line, automobile production line, and air conditioner assembly, is displayed. The resource description information includes the corresponding resource name and resource thumbnail. When the target object clicks on the thumbnail of the COB production line, the page corresponding to the COB production line is displayed in the right area. The page corresponding to the COB production line contains production line equipment such as COB testing equipment and plasma cleaners, as well as the connection relationships between the various production line equipment.

[0094] Taking resources (i.e., static resources) as an example, see [link / reference]. Figure 5 As shown, static resources are the root resources. Sub-resources of static resources include the folders "2D", "Scene Cases", "Model Library", "map", "system", "tenant", and "user". Among them, the folder "map" contains the folder "media", which contains candidate resources such as "Panel Light Effect.png", "Corner Light Effect.png", and "Selection Light Effect.png".

[0095] See Figure 6 As shown, when the target object clicks on a resource in the operation interface, the following sub-resources of the static resource are displayed: folder "2D", folder "Scene Cases", folder "Model Library", folder "map", folder "system", folder "tenant", and folder "user". When the target object can click on the folder "map", the following sub-resource of the folder "map" is displayed: folder "media". Furthermore, when the target object clicks on the folder "media", the following sub-resources of the folder "media" are displayed: candidate resources such as "panel light effect.png", "corner light effect.png", and "selected light effect.png".

[0096] When obtaining a target resource based on its actual access address, the electronic device sends the actual access address of the target resource to the file server. After receiving the actual access address, the file server obtains the target resource based on the actual access address and returns the target resource to the electronic device.

[0097] In some embodiments, resource identifiers can be stored in an identifier database. Specifically, resource initialization can be performed in the following ways, but not limited to: when it is determined that the target service has not undergone resource initialization, the electronic device uploads each original resource to the cloud server; the file server can generate an original resource identifier for each original resource after storing it, and return the original resource identifier to the electronic device. The electronic device receives the original resource identifiers of each original resource returned by the cloud server; based on the received original resource identifiers, it obtains the original resource directory and stores it in the identifier database. Correspondingly, after obtaining the target resource identifier of the uploaded target resource, the electronic device updates the original resource directory based on the target resource identifier, generates the target resource directory, and stores the target resource directory in the identifier database.

[0098] In this embodiment, the target resource directory may contain resource identifiers for each candidate resource, and each candidate resource may include the target resource and other candidate resources. The target resource directory may be generated by arranging the resource identifiers of each candidate resource in a tree structure according to the 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. In this document, default resources may also be referred to as original resources.

[0099] See Figure 7 As shown, this is a schematic diagram of a possible target resource directory provided in an embodiment of this application. The target resource directory includes candidate resource 1, candidate resource 2, ..., candidate resource 5, etc. Taking candidate resource 1 and candidate resource 2 as examples, both candidate resource 1 and candidate resource 2 are located in the folder "media", that is, candidate resource 1 and candidate resource 2 are at the same level. The resource ID of candidate resource 1 is "Dashboard_default_b988d3" and the resource ID of candidate resource 2 is "Dashboard_default_f893c2".

[0100] By implementing the above method, during resource initialization, the resources are stored in a file server and the resource identifiers are stored in an identifier database, thus achieving data isolation. This reduces the probability of resource tampering and accidental operation in a containerized environment, thereby improving resource security.

[0101] In some embodiments, an electronic device may determine whether a target service has undergone resource initialization by, but not limited to, the following methods:

[0102] When it is determined that the target service has started on the target node, the electronic device sends a resource directory retrieval request to the identification server and receives a resource directory retrieval response from the identification server. If the resource directory retrieval response indicates that the resource directory does not exist, it is determined that the target service has not performed resource initialization. If the resource directory retrieval response table carries a resource directory, it is determined that the target service has performed resource initialization.

[0103] The response indicating that a resource catalog does not exist can mean either that the resource catalog retrieval response does not carry any resource catalog information, or that the resource target retrieval response carries an indication that a resource catalog does not exist; there is no limitation on this.

[0104] In some embodiments, when obtaining an original resource catalog based on the received original resource identifiers, the electronic device can assemble the obtained original resource identifiers based on the hierarchical relationship between the original resources to obtain the original resource catalog.

[0105] For example, see Figure 8AAs shown, each original resource includes original resource 1, original resource 2, ..., original resource m, where m is a positive integer. The original resource identifiers of original resource 1, original resource 2, ..., original resource m are ID1, ID2, ..., IDm, respectively. In the hierarchical relationship between 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, and folder B is a subfolder of folder X's subfolder C. Based on the hierarchical relationship between original resource 1, original resource 2, ..., original resource m, the electronic device assembles the obtained ID1, ID2, ..., IDm to obtain the original resource directory.

[0106] When uploading target resources to a file server, electronic devices can upload files by creating a storage bucket.

[0107] Accordingly, based on the target resource identifier, the original resource directory is updated. When generating the target resource directory, the electronic device can add the target resource identifier to the original resource directory based on the storage location of the target resource in the original resource directory, thereby generating the target resource directory. The storage location of the target resource in the original resource directory can also be referred to as the resource path.

[0108] For example, see Figure 8B As shown, assuming the target resource is resource z, and resource z is stored in folder A, the electronic device adds the resource identifier ID z of resource z to the original resource directory based on the storage location of resource z in the original resource directory, thereby generating the target resource directory.

[0109] By implementing the above method, the original resources are stored on the file server to initialize the system resources. Then, based on the original resources, the system provides users with the function of creating custom resources, thereby improving configuration efficiency.

[0110] In some embodiments, the electronic device may store the original resource catalog in an identity database after generating it. Similarly, after generating the target resource catalog, the electronic device may store the target resource catalog in an identity database. When storing the target resource catalog in the identity database, the electronic device may use, but is not limited to, the following two possible methods:

[0111] As one possible method of directory updating, the electronic device sends the target resource directory to the identifier database, so that the identifier database replaces the stored original resource directory with the target resource directory.

[0112] For example, an electronic device sends a directory update request to an identification database. The target update request carries the target resource directory. When the identification database receives the directory update request, it replaces the original resource directory with the target resource directory and returns a directory update response to the electronic device. When the electronic device receives the directory update response returned by the identification database, it determines that the identification database has stored the target resource.

[0113] As another possible method of updating the directory, 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 obtains and stores the target resource directory.

[0114] For example, an electronic device sends a directory update request to an identifier database. The target update request carries the target resource identifier and the resource path of the target resource. When the identifier database receives the directory update request, it stores the resource path of the target resource and the target resource identifier, and returns a directory update response to the electronic device. When the electronic device receives the directory update response returned by the identifier database, it determines that the identifier database has stored the target resource.

[0115] It should be noted that, in this embodiment of the application, only the process of updating the original resource directory based on the target resource directory is used as an example for illustration. Similarly, the resource directories stored in the identifier database can be updated using the above two directory update methods.

[0116] For example, see Figure 9 As shown, the interaction process between the terminal device, electronic device, file server, and identity database during resource initialization and resource creation is as follows:

[0117] S901. The electronic device sends a resource directory retrieval request to the identification server.

[0118] S902. The electronic device receives a resource directory retrieval response from the identification server, but the resource directory retrieval response does not contain a resource directory. This indicates that the electronic device has not performed resource initialization.

[0119] S903: Electronic devices upload all original resources to the file server.

[0120] S904. The file server returns the original resource identifier of each original resource to the electronic device.

[0121] S905. The electronic device obtains the original resource catalog based on the received original resource identifiers.

[0122] S906. The electronic device stores the original resource directory in the identifier database. Specifically, the electronic device sends a directory write request to the identifier database, the target write request carrying the target resource directory, and upon receiving a directory write success response from the identifier database, determines to store the original resource directory in the identifier database.

[0123] S907. In response to an upload operation for a target resource, the electronic device uploads the target resource to the file server.

[0124] S908, The file server returns the target resource identifier to the electronic device.

[0125] S909. The electronic device updates the original resource catalog based on the target resource identifier to generate the target resource catalog.

[0126] S910. The electronic device sends a directory update request to the identifier database, and the directory update request carries the target resource directory.

[0127] S911. The electronic device receives a directory update response returned by the identifier database.

[0128] When the electronic device receives a directory update response from the identifier database, it determines that the identifier database has stored the target resource target.

[0129] It should be noted that, in this embodiment of the 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 based on the storage location of the target resource in the original resource directory, and obtains the target resource directory. At this time, S909 can be executed before S910 or after S910.

[0130] In some embodiments, considering the large amount of resources, in order to improve the access speed of resources, resources can be loaded in layers. In this embodiment, when the electronic device determines that the target object triggers the target resource type, it can obtain the target resource directory corresponding to the target resource type from the identifier database. The target resource directory corresponding to the target resource type contains the resource identifiers of each candidate resource under that resource type.

[0131] Specifically, in response to a trigger operation by a target object targeting a target resource type, the electronic device determines each candidate resource belonging to the target resource type from the candidate resources of each candidate resource type, and presents each candidate resource of the target resource type in the operation interface, wherein each candidate resource contains the target resource. The target resource type can be any of the root resources mentioned above.

[0132] It should be noted that the candidate resources for each candidate resource type can be candidate resources stored in the target resource directory.

[0133] During the process of obtaining the target resource directory corresponding to the target resource type, the electronic device can send a resource directory retrieval request carrying the target resource type to the identifier database, and receive the resource directory retrieval response carrying the target resource directory returned by the identifier database, thereby obtaining the target resource directory.

[0134] For example, when a target object triggers a root resource "page", the electronic device responds to the target object's trigger operation for the target resource type "page" by determining the candidate resources belonging to the target resource type "page" from the target resource directory. Suppose that the candidate resources belonging to the target resource type "page" include: COB production line, automobile production line, air conditioning assembly, etc., and present the candidate resources such as COB production line, automobile production line, and air conditioning assembly in the operation interface.

[0135] By implementing the above method, layered loading improves resource loading speed while reducing resource update and storage pressure, thereby improving system performance.

[0136] In some embodiments, if the resource type of the target resource is a page, the electronic device obtains the resource identifier of each of the at least one resource to be loaded when it determines that the target resource contains at least one resource to be loaded; the electronic device 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 at least one resource to be loaded based on the actual access address of each of the at least one resource to be loaded.

[0137] Here, "resources to be loaded" refers to resources that need to be obtained through parsing. Resources to be loaded include, but are not limited to, dynamic icons.

[0138] For example, when an electronic device determines that a target resource contains a resource of a specified type, it determines that the target resource contains a resource to be loaded. The specified type is related to the resource type of the target resource; it refers to the type of resource in the target resource that needs to be parsed and obtained. For instance, if the resource type of the target resource is a page, the specified type could be a dynamic icon, a script file, etc.

[0139] In the process of obtaining at least one resource to be loaded, based on the actual access address of each resource, the electronic device can send the actual access address of each resource to the cloud server. After receiving the actual access address of each resource, the cloud server obtains the at least one resource to be loaded based on the actual access address and returns the at least one resource to the electronic device.

[0140] For example, see Figure 10 As shown, assuming the target resource is a COB production line on a webpage, after the target user clicks on the COB production line in the interface, the electronic device obtains the resource identifier of the COB production line and, based on the resource identifier, obtains the actual access address of the "COB production line" page. Then, based on the actual access address, it retrieves the "COB production line" page. Assuming the "COB production line" page has a dynamic icon (a flashing light), indicating the presence of a resource to be loaded, the electronic device, based on the dynamic icon's resource identifier, obtains the actual access address of the dynamic icon and sends it to the cloud server. Upon receiving the actual access address, the cloud server retrieves the dynamic icon and returns it to the electronic device. The electronic device then displays the dynamic icon in the interface.

[0141] With the above implementation method, when there is a reference in the target resource (such as a page), the target resource and the resources to be loaded can be presented after obtaining each resource to be loaded.

[0142] In some embodiments, resource editing may also be performed in, but is not limited to, the following ways:

[0143] In response to an editing operation on a target resource, the electronic device obtains the 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 identifier, it obtains the actual access address of the target resource in the cloud server and deletes the target resource from the file server based on the actual access address. Based on the resource identifier of the new resource, it updates the target resource identifier stored in the identifier database.

[0144] For example, see Figure 11 As shown, the interaction flow between terminal devices, electronic devices, file servers, and identifier databases is as follows:

[0145] S1101, The terminal device responds to the editing operation on the target resource and obtains the new resource after editing.

[0146] S1102, The terminal device sends the edited new resource to the electronic device.

[0147] S1103. The electronic device uploads the new resources to the file server.

[0148] S1104. The electronic device receives the resource identifier of the new resource returned by the file server.

[0149] S1105. Electronic devices obtain the target resource identifier of the target resource through the identifier database.

[0150] Specifically, the electronic device can send a resource identifier query request to the identifier database based on the resource path of the target resource. The resource path indicates the location of the target resource within the target resource directory. After receiving the resource identifier query response from the identifier database, the electronic device retrieves the target resource identifier carried in the response.

[0151] S1106. The electronic device obtains the actual access address of the target resource in the cloud server based on the target resource identifier of the target resource.

[0152] S1107. The electronic device deletes the target resource from the file server based on the actual access address of the target resource. Specifically, the electronic device determines whether the target resource is an original resource. If the target resource is an original resource, it does not delete the target resource from the file server. If the target resource is an object creation resource, it sends a resource deletion request to the file server based on the actual access address of the target resource. Upon receiving a successful resource deletion response from the file server, it determines to delete the target resource from the file server.

[0153] Creating resources by deleting objects reduces the data storage pressure on the identity database, while ensuring the normal operation of the system by not deleting the original resources.

[0154] S1108. The electronic device updates the target resource identifier stored in the identifier database based on the resource identifier of the new resource. Specifically, the electronic device updates the original resource directory based on the resource identifier of the new resource, generates a new resource directory, and then sends a directory update request to the identifier database, carrying the new resource directory. When the electronic device receives a directory update success response from the identifier database, it determines that the target resource identifier stored in the identifier database has been updated.

[0155] S1109. The terminal device receives the resource upload results returned by the electronic device.

[0156] It should be noted that in the embodiments of this application, the target object can also be edited based on the original resource. The resource editing process for the original resource is the same as the resource editing process for the target resource, and will not be described again here.

[0157] Through the above implementation method, dynamic data maintenance is achieved by updating the file server and the identifier database during the resource editing process.

[0158] In some embodiments, see Figure 12As shown, this is an example of the interaction process between a terminal device, an electronic device, a file server, and an identifier database during a resource deletion process provided in this application embodiment. The specific process is as follows:

[0159] S1201, the terminal device responds to the deletion operation of the target object on the target resource by obtaining the resource path of the target resource. It should be noted that in this embodiment, the target object can delete a single resource, or it can delete all or part of the resources in a folder; there is no limitation on this. This document only uses the deletion of a single resource as an example for explanation.

[0160] S1202, The terminal device sends the resource path of the target resource to the electronic device.

[0161] S1203. When it is determined that the target resource does not belong to the original resource, the electronic device sends a resource deletion request to the file server based on the actual access address of the target resource.

[0162] S1204. The electronic device receives a successful resource deletion response from the file server.

[0163] S1205. The electronic device returns a successful resource deletion response to the terminal device.

[0164] Furthermore, the electronic device may update the currently stored resource directory in the identifier database, or it may choose not to update it; there is no limitation on this. The process of updating the resource directory in the identifier database is described in the resource directory update process above, and will not be repeated here.

[0165] In some embodiments, resource renaming may be performed in, but is not limited to, the following ways:

[0166] In response to a renaming operation of a target resource by a target object, the terminal device obtains the original resource path and the target resource path, and sends these two paths to the electronic device. It should be noted that in this embodiment, the target object can rename a single resource, or it can rename all or part of the resources in a folder; there is no limitation on this. This document only uses renaming a single resource as an example for illustration.

[0167] After receiving the original resource path and the target resource path, the electronic device modifies the target resource path from the original resource path to the target resource path. Furthermore, the electronic device may update the currently stored resource directory in the identifier database, or it may choose not to update it; this is not limited.

[0168] In some embodiments, to avoid security issues such as resource loss due to the leakage of the target resource identifier, a signature mechanism is added in this application embodiment. Specifically, when an electronic device obtains the actual access address of the target resource in the cloud server based on the target resource identifier, it can use, but is not limited to, the following methods:

[0169] The electronic device generates signature information of the target object based on the resource information of the target resource. The signature information is used to represent that the target object has resource access permissions. Based on the target resource identifier and signature information, the electronic device obtains the actual access address of the target resource in the cloud server.

[0170] The resource information may include at least one of a resource name and a resource suffix. It should be noted that, in this embodiment, the target object may refer to a user, or the account used by a user; alternatively, the target object may refer to a tenant, or the account used by a tenant.

[0171] For example, in the process of generating signature information of a target object based on the resource information of the target resource, the electronic device generates the signature information of the target object through the GetPreSign interface used to generate signature information, according to the resource prefix and resource name.

[0172] Specifically, in the process of obtaining the target resource based on the actual access address, the following implementation method can be adopted: send a resource acquisition request to the file server, which carries the actual access address and signature information, so that the file server can determine whether the target object has resource access permissions based on the signature information; receive the target resource returned by the file server when it is determined that the target object has resource access permissions.

[0173] By implementing the above methods, authentication and access control of target objects are achieved through signature information. This can prevent resources from being tampered with, accessed, or modified to a certain extent, ensuring data security and reliability. In addition, access control enables multi-tenancy and multi-account usage.

[0174] In some embodiments, to improve access efficiency, if the target object caches the actual access address of the target resource after the target object accesses the target resource for the first time, when the target object accesses the target resource again within a certain period of time, it can obtain the target resource directly without generating the actual access address.

[0175] Specifically, the electronic device can record the time when the actual access address is obtained and store the actual access address of the target resource in the cache; in response to another trigger operation for the target resource, it determines the waiting time between the trigger time and the address acquisition time; when the waiting time does not exceed the preset cache time, it obtains the actual access address of the target resource from the cache and obtains the target resource again based on the actual access address of the target resource.

[0176] For example, the preset cache duration can be 30 minutes. When the target resource is triggered again, and the time between the trigger time and the address acquisition time 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.

[0177] It should be noted that, in this embodiment, when the target object uploads a file, the terminal device can obtain the actual access address of the file using the GetPreSign interface through the file prefix and file name. After the file is uploaded, the terminal device can update the resource directory with the file prefix and file name of the uploaded file through the resource update (UploadSource). The resource directory update process is the same as the resource update process described above, and will not be repeated here. After refreshing the resource directory, the terminal device presents the new resource directory.

[0178] For example, see Figure 13 As shown, the interaction process between terminal devices, electronic devices, and file servers is as follows:

[0179] S1301, The terminal device sends a resource catalog retrieval request to the electronic device.

[0180] S1302. The electronic device obtains the target resource directory. As one possible implementation, the electronic device requests the target resource directory from the identification server and obtains it. As another possible implementation, the electronic device directly retrieves the target resource directory stored locally.

[0181] 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.

[0182] S1304. In response to the trigger operation for the target resource, the terminal device obtains the target resource identifier based on the target resource catalog.

[0183] S1305. The terminal device sends the signature information of the target object to the electronic device. The signature information can be generated by the terminal device based on the resource information of the target resource using the GetPreSign interface.

[0184] S1306. The electronic device obtains the actual access address and authorization expiration time of the target resource in the file server based on the target resource identifier and signature information. The authorization expiration time is determined based on the address acquisition time and a preset cache duration.

[0185] S1307. The electronic device returns the actual access address and authorization expiration time to the terminal device.

[0186] S1308. The terminal device caches the actual access address and the authorization expiration time. The terminal device can also cache the resource path of the target resource.

[0187] S1309. The terminal device sends a resource access request to the file service based on the actual access address.

[0188] S1310. The terminal device receives a resource access response carrying the target resource returned by the file server.

[0189] S1311. When the terminal device triggers the target resource again, and the current time has not exceeded the authorization expiration time, the actual access address of the target resource is obtained from the cache.

[0190] S1312. The terminal device sends a resource access request to the file service based on the actual access address.

[0191] In some embodiments, in response to a resource upload operation targeting a target resource, the terminal device generates signature information based on the resource prefix and resource name of the target resource using the GetPreSign interface, and sends the signature information to the electronic device. The electronic device generates the actual access address of the target resource in the file server based on the target resource identifier and signature information, and returns the actual access address to the terminal device. After receiving the actual access address returned by the electronic device, the terminal device converts the file format of the target resource to a standard File format file, and then uploads the target resource to the file server using the actual access address. Furthermore, after uploading the target resource to the file server, the terminal device can also update the resource directory stored in the electronic device based on the resource prefix and resource name of the target resource using a resource directory update interface. The terminal device then receives the updated resource directory returned by the electronic device and presents the updated resource directory.

[0192] The following explanation uses the example of the target service running on the previous node to illustrate this application.

[0193] See Figure 14As shown, this application scenario includes terminal devices, electronic devices, a signature service, a file server, a cache, and an identifier database. The file server is SeeweedFS, the cache is Redis, and the identifier database is DB. The electronic device includes two modules: a configuration backend and a configuration storage. The interaction flow between the terminal device, electronic device, signature service, file server, cache, and identifier database is as follows:

[0194] S1401, The configuration backend of the electronic device sends an initialization request to the configuration storage.

[0195] S1402, The electronic device's configuration storage sends a signature generation request to the signature service. The signature generation request can carry object information of the target object. The signature generation request can also carry a platform certificate.

[0196] S1403, The signature service returns signature information to the electronic device.

[0197] S1404. The configuration storage of electronic devices uploads each original resource to the file server.

[0198] S1405. The configuration storage of electronic equipment receives the original resource identifiers of each original resource returned by the file server.

[0199] S1406. The configuration storage of electronic devices organizes the original resource identifiers of each original resource to obtain the original resource catalog.

[0200] S1407. The configuration storage of electronic devices stores the original resource catalog in the identifier database.

[0201] S1408. The configuration storage of the electronic device receives a directory write response returned by the identifier database. The directory write response may carry the database identifier.

[0202] S1409. The configuration storage of electronic devices stores the original resource directory in the cache.

[0203] S1410, The configuration storage of the electronic device receives the target write response returned by the buffer.

[0204] S1411. The configuration storage of the electronic device returns an initialization response to the configuration backend.

[0205] S1412. When the terminal device determines that the configuration is loaded for the first time, it sends a default resource acquisition request to the configuration backend of the electronic device.

[0206] S1413. The configuration backend of the electronic device forwards the default resource acquisition request to the configuration storage of the electronic device.

[0207] S1414. The configuration storage of the electronic device sends a resource catalog retrieval request to the cache.

[0208] S1415. The configuration storage of the electronic device receives the original resource catalog from the cache.

[0209] S1416. The configuration storage of electronic devices sends a resource acquisition request to the file server based on the original resource directory and signature information.

[0210] S1417. The configuration storage of electronic equipment receives the original resources returned by the file server.

[0211] S1418. The configuration backend of the electronic device receives the original resources returned by the configuration storage.

[0212] S1419. The terminal device receives the original resources returned by the configuration backend of the electronic device.

[0213] S1420: In response to the target object's upload operation for the target resource, the terminal device sends a resource upload request to the configuration backend of the electronic device.

[0214] S1421. The configuration backend of the electronic device forwards the resource upload request to the configuration storage of the electronic device.

[0215] S1422. The configuration storage of electronic devices is based on signature information, and the target resources are uploaded to the file server.

[0216] S1423. The configuration storage of electronic equipment receives the target resource identifier of the target resource returned by the file server.

[0217] S1424. The configuration storage of the electronic device sends a directory update request to the identifier database. The directory update request carries the target resource identifier and the resource path of the target resource.

[0218] S1425. The configuration storage of the electronic device receives the directory update response returned by the identifier database.

[0219] S1426. The configuration storage of electronic devices is based on the target resource identifier, and the original resource directory is updated to obtain the target resource directory.

[0220] S1427. The configuration storage of the electronic device sends a directory update request to the cache, and the directory update request carries the target resource directory.

[0221] S1428. The configuration storage of the electronic device receives the directory update response returned by the cache and sends the directory update response to the configuration backend.

[0222] S1429. The configuration backend sends the directory update response to the terminal device.

[0223] Based on the same inventive concept, embodiments of this application provide a resource access device. For example... Figure 15 As shown, this is a structural schematic diagram of the resource access device 1500, which may include:

[0224] The identifier acquisition unit 1501 is used to respond to the upload operation for the target resource, upload the target resource to the cloud server, and receive the target resource identifier of the target resource returned by the cloud server.

[0225] The resource acquisition unit 1502 is configured to respond to a trigger operation targeting a target resource, obtain the 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.

[0226] As one possible implementation, the identifier acquisition unit 1501 is also used for:

[0227] When it is determined that the target service has not performed resource initialization, each original resource is uploaded to the cloud server, and the original resource identifier of each original resource is returned by the cloud server.

[0228] Based on the received original resource identifiers, the original resource directory is obtained and stored in the identifier database;

[0229] After receiving the target resource identifier returned by the cloud server, in response to a trigger operation for the target resource, before obtaining the actual access address of the target resource in the cloud server based on the target resource identifier, the identifier acquisition unit 1501 is further configured to:

[0230] Based on the target resource identifier, the original resource directory is updated to generate the target resource directory, and the target resource directory is stored in the identifier database.

[0231] As one possible implementation, when obtaining the original resource directory based on the received original resource identifiers, the identifier acquisition unit 1501 is specifically used for:

[0232] Based on the hierarchical relationship between the original resources, the obtained original resource identifiers are assembled to obtain the original resource catalog.

[0233] The step of updating the original resource directory based on the target resource identifier to generate the target resource directory includes:

[0234] Based on the storage location of the target resource in the original resource directory, the target resource identifier is added to the original resource directory to generate the target resource directory.

[0235] As one possible implementation, when storing the target resource directory in the identifier database, the identifier acquisition unit 1501 is specifically used for:

[0236] The target resource directory is sent to the identifier database, so that the identifier database replaces the stored original resource directory with the target resource directory; or...

[0237] 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, thereby obtaining and storing the target resource directory.

[0238] As one possible implementation, when it is determined that the target service has not undergone resource initialization, the identifier acquisition unit 1501 is specifically used for:

[0239] When it is determined that the target service is started in the target node, a resource directory retrieval request is sent to the identifier database, and a resource directory retrieval response is received from the identifier database;

[0240] If the resource directory is not included in the resource directory retrieval response, it is determined that the target service has not undergone resource initialization.

[0241] As one possible implementation, the resource acquisition unit 1502 is also used for:

[0242] In response to a trigger operation by the target object targeting a target resource type, each candidate resource belonging to the target resource type is determined from the candidate resources of each candidate resource type;

[0243] The user interface presents candidate resources of the target resource type, and each candidate resource includes the target resource.

[0244] As one possible implementation, the resource acquisition unit 1502 is also used for:

[0245] In response to the editing operation on the target resource, the new resource after editing is obtained, the new resource is uploaded to the cloud server, and the resource identifier of the new resource is returned by the cloud server;

[0246] Based on the target resource identifier, the actual access address of the target resource in the cloud server is obtained, and based on the actual access address, the target resource is deleted from the cloud server;

[0247] Based on the resource identifier of the new resource, the target resource identifier stored in the identifier database is updated.

[0248] As one possible implementation, the resource acquisition unit 1502 is also used for:

[0249] If the resource type of the target resource is a page, then when it is determined that the target resource contains at least one resource to be loaded, the resource identifier of each of the at least one resource to be loaded is obtained;

[0250] Based on the resource identifier of each of the at least one resource to be loaded, obtain the actual access address of each of the at least one resource to be loaded, and based on the actual access address of each of the at least one resource to be loaded, obtain the at least one resource to be loaded.

[0251] As one possible implementation, when obtaining the actual access address of the target resource in the cloud server based on the target resource identifier, the resource acquisition unit 1502 is specifically used for:

[0252] Based on the resource information of the target resource, a signature information of the target object is generated, wherein the signature information is used to characterize that the target object has resource access permissions;

[0253] Based on the target resource identifier and the signature information, the actual access address of the target resource in the cloud server is obtained.

[0254] As one possible implementation, the resource acquisition unit 1502 is also used for:

[0255] Record the time when the actual access address is obtained, and store the actual access address of the target resource in the cache;

[0256] In response to a trigger operation targeting the target resource again, determine the waiting time between the trigger time and the address acquisition time;

[0257] When the waiting time does not exceed the preset cache duration, 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.

[0258] As one possible implementation, when obtaining the target resource based on the actual access address, the resource acquisition unit 1502 is specifically used for:

[0259] A resource acquisition request is sent to the cloud server, the resource acquisition request carrying the actual access address and the signature information, so that the cloud server can determine whether the target object has resource access rights based on the signature information;

[0260] Receive the target resource returned by the cloud server after determining that the target object has resource access permissions.

[0261] For ease of description, the above sections are divided into modules (or units) according to their functions and described separately. Of course, in implementing this application, the functions of each module (or unit) can be implemented in one or more software or hardware components.

[0262] Regarding the apparatus in the above embodiments, the specific manner in which each unit executes the request has been described in detail in the embodiments related to the method, and will not be elaborated here.

[0263] Those skilled in the art will understand that various aspects of this application can be implemented as a system, method, or program product. Therefore, various aspects of this application can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, collectively referred to herein as a "circuit," "module," or "system."

[0264] Based on the same inventive concept, embodiments of this application also provide an electronic device. In one embodiment, the electronic device can be a server or a terminal device. See also... Figure 16 As shown, it is a schematic diagram of the structure of a possible electronic device provided in an embodiment of this application. Figure 16 In the electronic device 1600, there are: processor 1610 and memory 1620.

[0265] The memory 1620 stores a computer program that can be executed by the processor 1610. The processor 1610 can execute the steps of the resource access method described above by executing the instructions stored in the memory 1620.

[0266] Memory 1620 may be volatile memory, such as random-access memory (RAM); memory 1620 may also be non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid-state drive (SSD); or memory 1620 may be any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but is not limited thereto. Memory 1620 may also be a combination of the above-mentioned memories.

[0267] Processor 1610 may include one or more central processing units (CPUs) or digital processing units, etc. Processor 1610 implements the above-described resource access methods when executing computer programs stored in memory 1620.

[0268] In some embodiments, the processor 1610 and the memory 1620 may be implemented on the same chip, while in other embodiments they may be implemented on separate chips.

[0269] This application embodiment does not limit the specific connection medium between the processor 1610 and the memory 1620. This application embodiment takes the connection between the processor 1610 and the memory 1620 via a bus as an example. Figure 16 The diagram uses thick lines to describe the connections between other components; these are merely illustrative and not intended to be limiting. Buses can be categorized as address buses, data buses, control buses, etc. For ease of description, Figure 16 It is described using only a thick line, but does not indicate that there is only one bus or one type of bus.

[0270] Based on the same inventive concept, embodiments of this application provide a computer-readable storage medium including a computer program. When the computer program is run on an electronic device, it causes the electronic device to perform the steps of the aforementioned resource access method. In some possible implementations, various aspects of the resource access method provided in this application can also be implemented as a program product including a computer program. When the program product is run on an electronic device, the computer program causes the electronic device to perform the steps of the aforementioned resource access method. For example, the electronic device can perform actions such as... Figure 3 The steps are shown in the figure.

[0271] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: electrical connections having one or more wires, portable disks, hard disks, RAM, ROM, erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0272] The program product of the embodiments of this application may be a CD-ROM and include a computer program, and may run on an electronic device. However, the program product of this application is not limited thereto. In this document, the readable storage medium may be any tangible medium that contains or stores a computer program that may be used by or in conjunction with a command execution system, apparatus, or device.

[0273] A readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying a readable computer program. This propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting a computer program for use by or in conjunction with a command execution system, apparatus, or device.

[0274] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.

[0275] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A resource access method, characterized in that, include: When it is determined that the target service has started in the target node, a resource directory retrieval request is sent to the identifier database, and a resource directory retrieval response is received from the identifier database. The target service is the configuration service for industrial configuration; When the resource directory retrieval response does not include a resource directory, it is determined that the target service has not undergone resource initialization. When it is determined that the target service has not been initialized with resources, each original resource is uploaded to the cloud server, and the original resource identifier of each original resource is received from the cloud server. Based on the received original resource identifiers, the original resource directory is obtained and stored in the identifier database; In response to an upload operation for a target resource, the target resource is uploaded to the cloud server, and the target resource identifier of the target resource is returned by the cloud server. Based on the target resource identifier, the original resource directory is updated to generate the target resource directory, and the target resource directory is stored in the identifier database; In response to a triggered operation targeting the target resource, the actual access address of the target resource in the cloud server is obtained based on the target resource identifier, and the target resource is obtained based on the actual access address.

2. The method as described in claim 1, characterized in that, The process of obtaining the original resource catalog based on the received original resource identifiers includes: Based on the hierarchical relationship between the original resources, the obtained original resource identifiers are assembled to obtain the original resource catalog. The step of updating the original resource directory based on the target resource identifier to generate the target resource directory includes: Based on the storage location of the target resource in the original resource directory, the target resource identifier is added to the original resource directory to generate the target resource directory.

3. The method as described in claim 1, characterized in that, The step of storing the target resource directory in the identifier database includes: The target resource directory is sent to the identifier database, so that the identifier database replaces the stored original resource directory with the target resource directory; or... 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, thereby obtaining and storing the target resource directory.

4. The method according to any one of claims 1-3, characterized in that, Before obtaining the actual access address of the target resource in the cloud server based on the target resource identifier in response to a triggered operation targeting the target resource, the method further includes: In response to a trigger operation by the target object targeting a target resource type, each candidate resource belonging to the target resource type is determined from the candidate resources of each candidate resource type; The user interface presents candidate resources of the target resource type, and each candidate resource includes the target resource.

5. The method according to any one of claims 1-3, characterized in that, Also includes: In response to the editing operation on the target resource, the new resource after editing is obtained, the new resource is uploaded to the cloud server, and the resource identifier of the new resource is received from the cloud server. Based on the target resource identifier, the actual access address of the target resource in the cloud server is obtained, and based on the actual access address, the target resource is deleted from the cloud server; Based on the resource identifier of the new resource, the target resource identifier stored in the identifier database is updated.

6. The method according to any one of claims 1-3, characterized in that, Also includes: If the resource type of the target resource is a page, then when it is determined that the target resource contains at least one resource to be loaded, the resource identifier of each of the at least one resource to be loaded is obtained; Based on the resource identifier of each of the at least one resource to be loaded, obtain the actual access address of each of the at least one resource to be loaded, and based on the actual access address of each of the at least one resource to be loaded, obtain the at least one resource to be loaded.

7. The method according to any one of claims 1-3, characterized in that, Obtaining the actual access address of the target resource in the cloud server based on the target resource identifier includes: Based on the resource information of the target resource, a signature information of the target object is generated, wherein the signature information is used to characterize that the target object has resource access permissions; Based on the target resource identifier and the signature information, the actual access address of the target resource in the cloud server is obtained.

8. The method as described in claim 7, characterized in that, After obtaining the target resource based on the actual access address, the process includes: Record the time when the actual access address is obtained, and store the actual access address of the target resource in the cache; In response to a trigger operation targeting the target resource again, determine the waiting time between the trigger time and the address acquisition time; When the waiting time does not exceed the preset cache duration, 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.

9. The method as described in claim 7, characterized in that, Obtaining the target resource based on the actual access address includes: A resource acquisition request is sent to the cloud server, the resource acquisition request carrying the actual access address and the signature information, so that the cloud server can determine whether the target object has resource access rights based on the signature information; Receive the target resource returned by the cloud server after determining that the target object has resource access permissions.

10. A resource access device, characterized in that, include: The identifier acquisition unit is used to send a resource directory acquisition request to the identifier database and receive the resource directory acquisition response returned by the identifier database when it is determined that the target service has started in the target node. The target service is the configuration service for industrial configuration; When the resource directory retrieval response does not carry a resource directory, it is determined that the target service has not performed resource initialization; when it is determined that the target service has not performed resource initialization, each original resource is uploaded to the cloud server, and the original resource identifier of each original resource returned by the cloud server is received; based on the received original resource identifiers, the original resource directory is obtained, and the original resource directory is stored in the identifier database; In response to an upload operation for a target resource, the target resource is uploaded to the cloud server, and the target resource identifier of the target resource is returned by the cloud server. Based on the target resource identifier, the original resource directory is updated to generate the target resource directory, and the target resource directory is stored in the identifier database; The resource acquisition unit is configured to respond to a triggered operation for the target resource, obtain the 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.

11. An electronic device, characterized in that, It includes a processor and a memory, wherein the memory stores a computer program that, when executed by the processor, causes the processor to perform the steps of any of the methods described in claims 1 to 9.

12. A computer-readable storage medium, characterized in that, It includes a computer program that, when run on an electronic device, causes the electronic device to perform the steps of any of the methods described in claims 1 to 9.

13. A computer program product, characterized in that, It includes a computer program stored in a computer-readable storage medium, and a processor of an electronic device reads from and executes the computer program, causing the electronic device to perform the steps of any of the methods described in claims 1 to 9.

Citation Information

Patent Citations

  • Method and system for transferring files

    CN103812882A