CN110741617A - Resource updating method and device, computer equipment and storage medium - Google Patents

Resource updating method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN110741617A
CN110741617A CN201880037171.8A CN201880037171A CN110741617A CN 110741617 A CN110741617 A CN 110741617A CN 201880037171 A CN201880037171 A CN 201880037171A CN 110741617 A CN110741617 A CN 110741617A
Authority
CN
China
Prior art keywords
update operation
operation request
target resource
interface
identifier
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201880037171.8A
Other languages
Chinese (zh)
Other versions
CN110741617B (en
Inventor
唐海
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Publication of CN110741617A publication Critical patent/CN110741617A/en
Application granted granted Critical
Publication of CN110741617B publication Critical patent/CN110741617B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/565Conversion or adaptation of application format or content
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Information Transfer Between Computers (AREA)
  • Stored Programmes (AREA)

Abstract

The application relates to resource updating methods, devices, computer equipment and storage media, a server receives a th updating operation request for updating a target resource sent by a user side, if the target resource has a link resource, and if the link resource does not support a recursive interface and a default interface of the link resource does not support the updating operation, the server re-determines the target interface of the target resource and generates a second updating operation request according to the target interface, so that the server can update the link resource according to the second updating operation request, the flexibility of the server updating resource is greatly improved, and the updating of the link resource is realized when the link resource does not support the recursive interface and the default interface does not support the updating operation.

Description

资源更新方法、装置、计算机设备和存储介质Resource update method, apparatus, computer equipment and storage medium

技术领域technical field

本申请涉及物联网资源技术领域,特别是涉及一种资源更新方法、装置、计算机设备和存储介质。The present application relates to the technical field of Internet of Things resources, and in particular, to a resource updating method, apparatus, computer equipment and storage medium.

背景技术Background technique

基于表现层状态转化(representational state transfer,restfull)架构的物联网设备方法越来越流行,在restfull架构下物理世界中的事物(设备)均可以使用资源(resource)的方式来描述,并且使用创建、更新、获取、删除、通知(Creat、Update、Retrieve、Delete、Notification,CURDN)的方式来操作资源。The IoT device method based on the representational state transfer (restfull) architecture is becoming more and more popular. Under the restfull architecture, things (devices) in the physical world can be described in the form of resources and created using , Update, Get, Delete, Notification (Creat, Update, Retrieve, Delete, Notification, CURDN) to operate resources.

在资源描述过程中,定义了一种集合资源(collection),并且,定义了一些接口(interface)来确定资源的操作方式,其中,一个collection还可以包括多个链接指向的资源(link collection),link为某一个资源的链接。当需要对某个资源进行操作时,用户端可以向服务器发送携带资源标识和接口类型的操作指令,服务器根据该操作指令对collection和link指向的资源进行操作,操作的方式为请求消息携带的interface(接口类型)。常用的接口类型有递归接口(batch interface)、默认接口(default interface)等。In the process of resource description, a collection resource (collection) is defined, and some interfaces are defined to determine the operation mode of the resource, among which, a collection can also include resources (link collection) pointed to by multiple links, link is a link to a resource. When a certain resource needs to be operated, the client can send an operation instruction carrying the resource identifier and interface type to the server, and the server operates the resource pointed to by the collection and link according to the operation instruction. The operation method is the interface carried in the request message. (Interface Type). Commonly used interface types are recursive interface (batch interface), default interface (default interface) and so on.

但是,当link collection不支持batch interface,且其default interface不支持更新(update)操作时,无法完成对link指向的资源进行修改。However, when the link collection does not support the batch interface and its default interface does not support the update operation, the modification of the resource pointed to by the link cannot be completed.

发明内容SUMMARY OF THE INVENTION

基于此,有必要针对上述当link collection不支持递归接口(batchinterface),且其默认接口(default interface)不支持更新(update)操作时,无法完成对link指向的资源进行修改的技术问题,提供一种资源更新方法、装置、计算机设备和存储介质。Based on this, it is necessary to provide a solution for the above-mentioned technical problem that when the link collection does not support the recursive interface (batchinterface) and its default interface (default interface) does not support the update (update) operation, the modification of the resource pointed to by the link cannot be completed. A resource updating method, apparatus, computer equipment and storage medium.

第一方面,本发明实施例提供一种资源更新方法,所述方法包括:In a first aspect, an embodiment of the present invention provides a resource update method, the method includes:

接收用户端发送的第一更新操作请求;所述第一更新操作请求用于指示采用递归接口对第一目标资源进行更新操作;Receive a first update operation request sent by the client; the first update operation request is used to instruct to use a recursive interface to update the first target resource;

若所述第一目标资源为存在链接资源的集合资源,判断所述链接指向的第二目标资源是否支持递归接口;If the first target resource is an aggregate resource with linked resources, determine whether the second target resource pointed to by the link supports a recursive interface;

若所述第二目标资源不支持递归接口,且,所述第二目标资源的默认接口不支持更新操作,则从预设的接口列表中确定支持更新操作的目标接口,并根据所述第一更新操作请求生成第二更新操作请求;所述第二更新操作请求包括所述目标接口的标识,且,所述第二更新操作请求用于对所述第二目标资源进行更新操作。If the second target resource does not support the recursive interface, and the default interface of the second target resource does not support the update operation, the target interface that supports the update operation is determined from the preset interface list, and according to the first The update operation request generates a second update operation request; the second update operation request includes the identifier of the target interface, and the second update operation request is used to perform an update operation on the second target resource.

在其中一个实施例中,所述第一更新操作请求包括所述第一目标资源的标识、递归接口标识、更新操作标识和更新内容。In one embodiment, the first update operation request includes an identifier of the first target resource, a recursive interface identifier, an update operation identifier, and an update content.

在其中一个实施例中,所述根据所述第一更新操作请求生成第二更新操作请求,包括:In one embodiment, the generating a second update operation request according to the first update operation request includes:

将所述第一更新操作请求的递归接口标识替换为所述目标接口的标识,并将所述第一更新操作请求中的所述第一目标资源的标识替换为所述第二目标资源的标识,得到所述第二更新操作请求;其中,所述第二更新操作请求包括所述第二目标资源的标识、所述目标接口的标识、所述更新操作标识和所述更新内容。Replace the recursive interface identifier of the first update operation request with the identifier of the target interface, and replace the identifier of the first target resource in the first update operation request with the identifier of the second target resource to obtain the second update operation request; wherein, the second update operation request includes the identifier of the second target resource, the identifier of the target interface, the identifier of the update operation and the update content.

在其中一个实施例中,所述方法还包括:In one embodiment, the method further includes:

在所述第一目标资源中的所有资源均更新完成之后,生成应答消息;所述应答消息包括所述第一目标资源中的所有所述链接资源的更新结果;After all the resources in the first target resource are updated, a response message is generated; the response message includes the update results of all the linked resources in the first target resource;

将所述应答消息发送给用户端。Send the reply message to the client.

在其中一个实施例中,所述第一更新操作请求包括用户端标识,则在所述第一目标资源为存在链接的集合资源时,判断所述链接指向的第二目标资源是否支持递归接口之前,还包括:In one embodiment, the first update operation request includes a client identifier, then when the first target resource is a linked aggregate resource, before determining whether the second target resource pointed to by the link supports a recursive interface ,Also includes:

根据所述用户端标识,判断所述用户端是否具有访问所述第一目标资源的权限;According to the identifier of the client, determine whether the client has the authority to access the first target resource;

若所述用户端具有访问所述第一目标资源的权限,则在所述第一目标资源为存在链接的集合资源时,判断所述第二目标资源是否支持递归接口。If the client has the right to access the first target resource, when the first target resource is a linked aggregate resource, it is determined whether the second target resource supports a recursive interface.

在其中一个实施例中,所述方法还包括:In one embodiment, the method further includes:

若所述第二目标资源不支持递归接口,且所述第二目标资源的默认接口支持更新操作,则根据所述第一更新操作请求生成第三更新操作请求;所述第三更新操作请求包括所述默认接口的标识,且所述第三更新操作请求用于对所述第二目标资源进行更新操作。If the second target resource does not support a recursive interface and the default interface of the second target resource supports an update operation, a third update operation request is generated according to the first update operation request; the third update operation request includes The identifier of the default interface, and the third update operation request is used to perform an update operation on the second target resource.

在其中一个实施例中,所述根据所述第一更新操作请求生成第三更新操作请求,包括:In one embodiment, the generating a third update operation request according to the first update operation request includes:

将所述第一更新操作请求中的递归接口标识替换为所述默认接口的标识,并将所述第一更新操作请求中的所述第一目标资源的标识替换为所述第二目标资源的标识,得到所述第三更新操作请求;Replace the recursive interface identifier in the first update operation request with the default interface identifier, and replace the identifier of the first target resource in the first update operation request with the identifier of the second target resource. identifier, to obtain the third update operation request;

其中,所述第三更新操作请求包括所述第二目标资源的标识、所述默认接口的标识、更新操作标识和更新内容。Wherein, the third update operation request includes the identifier of the second target resource, the identifier of the default interface, the identifier of the update operation, and the update content.

在其中一个实施例中,所述方法还包括:In one embodiment, the method further includes:

若所述第二目标资源支持递归接口,则根据所述第一更新操作请求生成第四更新操作请求;所述第四更新操作请求用于对所述第二目标资源进行更新操作。If the second target resource supports a recursive interface, a fourth update operation request is generated according to the first update operation request; the fourth update operation request is used to perform an update operation on the second target resource.

在其中一个实施例中,所述根据所述第一更新操作请求生成第四更新操作请求,包括:In one embodiment, the generating a fourth update operation request according to the first update operation request includes:

将所述第一更新操作请求中的所述第一目标资源的标识替换为所述第二目标资源的标识,得到所述第四更新操作请求;replacing the identifier of the first target resource in the first update operation request with the identifier of the second target resource to obtain the fourth update operation request;

其中,所述第四更新操作请求包括所述第二目标资源的标识、所述递归接口标识、更新操作标识和更新内容。Wherein, the fourth update operation request includes the identifier of the second target resource, the recursive interface identifier, the update operation identifier and the update content.

第二方面,本发明实施例提供一种资源更新装置,所述装置包括:In a second aspect, an embodiment of the present invention provides an apparatus for updating resources, the apparatus comprising:

接收模块,用于接收用户端发送的第一更新操作请求;所述第一更新操作请求用于指示采用递归接口对第一目标资源进行更新操作;a receiving module, configured to receive a first update operation request sent by the user terminal; the first update operation request is used to instruct to use a recursive interface to update the first target resource;

判断模块,用于若所述第一目标资源为存在链接资源的集合资源,判断所述链接指向的第二目标资源是否支持递归接口;A judging module, configured to judge whether the second target resource pointed to by the link supports a recursive interface if the first target resource is an aggregate resource with linked resources;

处理模块,用于若所述第二目标资源不支持递归接口,且,所述第二目标资源的默认接口不支持更新操作,则从预设的接口列表中确定支持更新操作的目标接口,并根据所述第一更新操作请求生成第二更新操作请求;所述第二更新操作请求包括所述目标接口的标识,且所述第二更新操作请求用于对所述第二目标资源进行更新操作。The processing module is configured to, if the second target resource does not support the recursive interface and the default interface of the second target resource does not support the update operation, determine the target interface that supports the update operation from the preset interface list, and A second update operation request is generated according to the first update operation request; the second update operation request includes the identifier of the target interface, and the second update operation request is used to perform an update operation on the second target resource .

第三方面,本发明实施例提供一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现以下步骤:In a third aspect, an embodiment of the present invention provides a computer device, including a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:

接收用户端发送的第一更新操作请求;所述第一更新操作请求用于指示采用递归接口对第一目标资源进行更新操作;Receive a first update operation request sent by the client; the first update operation request is used to instruct to use a recursive interface to update the first target resource;

若所述第一目标资源为存在链接的集合资源,判断所述链接指向的第二目标资源是否支持递归接口;If the first target resource is an aggregate resource with a link, determine whether the second target resource pointed to by the link supports a recursive interface;

若所述第二目标资源不支持递归接口,且,所述第二目标资源的默认接口不支持更新操作,则从预设的接口列表中确定支持更新操作的目标接口,并根据所述第一更新操作请求生成第二更新操作请求;所述第二更新操作请求包括所述目标接口的标识,且所述第二更新操作请求用于对所述第二目标资源进行更新操作。If the second target resource does not support the recursive interface, and the default interface of the second target resource does not support the update operation, the target interface that supports the update operation is determined from the preset interface list, and according to the first The update operation request generates a second update operation request; the second update operation request includes the identifier of the target interface, and the second update operation request is used to perform an update operation on the second target resource.

第三方面,本发明实施例提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现以下步骤:In a third aspect, an embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

接收用户端发送的第一更新操作请求;所述第一更新操作请求用于指示采用递归接口对第一目标资源进行更新操作;Receive a first update operation request sent by the client; the first update operation request is used to instruct to use a recursive interface to update the first target resource;

若所述第一目标资源为存在链接的集合资源,判断所述链接指向的第二目标资源是否支持递归接口;If the first target resource is an aggregate resource with a link, determine whether the second target resource pointed to by the link supports a recursive interface;

若所述第二目标资源不支持递归接口,且,所述第二目标资源的默认接口不支持更新操作,则从预设的接口列表中确定支持更新操作的目标接口,并根据所述第一更新操作请求生成第二更新操作请求;所述第二更新操作请求包括所述目标接口的标识,且所述第二更新操作请求用于对所述第二目标资源进行更新操作。If the second target resource does not support the recursive interface, and the default interface of the second target resource does not support the update operation, the target interface that supports the update operation is determined from the preset interface list, and according to the first The update operation request generates a second update operation request; the second update operation request includes the identifier of the target interface, and the second update operation request is used to perform an update operation on the second target resource.

本申请提供的一种资源更新方法、装置、计算机设备和存储介质,服务器先接收用户端发送的用于更新第一目标资源的第一更新操作请求,在该第一目标资源存在链接资源,链接指向的第二目标资源不支持递归接口,且第二目标资源的默认接口不支持更新操作时,服务器重新确定该第二目标资源的支持更新操作的目标接口,并根据第一更新操作请求生成第二更新操作请求,这样,服务器便可以根据该第二更新操作请求对链接指向的第二目标资源进行更新操作,大大提高了服务器更新资源的灵活度,实现了在链接指向的资源不支持递归接口,且其默认接口不支持更新操作时该链接指向的资源的更新。In a resource updating method, device, computer equipment and storage medium provided by this application, a server first receives a first update operation request sent by a client for updating a first target resource, where a link resource exists in the first target resource, and the link When the pointed second target resource does not support the recursive interface, and the default interface of the second target resource does not support the update operation, the server re-determines the target interface of the second target resource that supports the update operation, and generates the first update operation request according to the first update operation request. Second update operation request, in this way, the server can update the second target resource pointed to by the link according to the second update operation request, which greatly improves the flexibility of the server to update resources, and realizes that the resource pointed to by the link does not support recursive interfaces , and its default interface does not support the update of the resource pointed to by the link during the update operation.

附图说明Description of drawings

图1为一个实施例提供的一种资源更新方法的应用环境图;1 is an application environment diagram of a resource updating method provided by an embodiment;

图2为一个实施例提供的一种资源更新方法的流程示意图;2 is a schematic flowchart of a resource updating method provided by an embodiment;

图3为一个实施例提供的一种资源更新方法的流程示意图;3 is a schematic flowchart of a method for updating a resource provided by an embodiment;

图4为一个实施例提供的一种资源更新方法的流程示意图;4 is a schematic flowchart of a method for updating a resource provided by an embodiment;

图5为一个实施例提供的一种资源更新装置的结构框图;5 is a structural block diagram of a resource updating apparatus provided by an embodiment;

图6为一个实施例提供的一种资源更新装置的结构框图;6 is a structural block diagram of a resource updating apparatus provided by an embodiment;

图7为一个实施例提供的一种资源更新装置的结构框图;7 is a structural block diagram of a resource updating apparatus provided by an embodiment;

图8为一个实施例提供的一种资源更新装置的结构框图;8 is a structural block diagram of a resource updating apparatus provided by an embodiment;

图9为一个实施例提供的一种资源更新装置的结构框图;9 is a structural block diagram of a resource updating apparatus provided by an embodiment;

图10为一个实施例提供的计算机设备内部结构框图。FIG. 10 is a block diagram of the internal structure of a computer device provided by an embodiment.

具体实施方式Detailed ways

为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application will be described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, but not to limit the present application.

本申请提供的一种资源更新方法,可以应用于如图1所示的应用环境中,包括客户端和服务端,客户端与服务端可以进行通信,通信方式无线通信,例如:WIFi、红外通信或者3G、4G、5G等。其中该客户端可以是灯具、空调等,还可以是手机、PAD、电脑等智能移动终端,本实施例对此不做限定。其中服务端可以是服务器,该服务器包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该服务器的处理器用于提供计算和控制能力。该服务器的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机程序和数据库。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该服务器的数据库用于存储资源更新方法的数据。该服务器的网络接口用于与外部的其他设备通过网络连接通信。该计算机程序被处理器执行时以实现一种资源更新方法。A resource updating method provided by this application can be applied to the application environment as shown in FIG. 1 , including a client and a server, and the client and the server can communicate through wireless communication, such as WIFi, infrared communication Or 3G, 4G, 5G, etc. The client may be a lamp, an air conditioner, etc., or an intelligent mobile terminal such as a mobile phone, a PAD, a computer, etc., which is not limited in this embodiment. The server can be a server, and the server includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the server is used to provide computing and control capabilities. The memory of the server includes a non-volatile storage medium and an internal memory. The nonvolatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the execution of the operating system and computer programs in the non-volatile storage medium. The server's database is used to store data for resource update methods. The server's network interface is used to communicate with other external devices through a network connection. The computer program implements a resource updating method when executed by the processor.

本申请的实施例提供一种资源更新方法、装置、计算机设备和存储介质,旨在解决当link collection不支持batch interface,且其default interface不支持update操作时,无法完成对link指向的资源进行修改的技术问题。下面将通过实施例并结合附图具体地对本申请的技术方案以及本申请的技术方案如何解决上述技术问题进行详细说明。下面这几个具体的实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例中不再赘述。需要说明的是,本发明提供的一种资源更新方法,其执行主体为服务器,其中,该执行主体还可以为计算机设备,或者是资源更新装置,其中该装置可以通过软件、硬件或者软硬件结合的方式实现资源更新的部分或者全部。The embodiments of the present application provide a method, device, computer equipment and storage medium for updating resources, aiming to solve the problem that when the link collection does not support the batch interface and the default interface does not support the update operation, the modification of the resource pointed to by the link cannot be completed. technical issues. The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems will be specifically described in detail below with reference to the accompanying drawings. The following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. It should be noted that, in a resource updating method provided by the present invention, the execution body is a server, wherein the execution body may also be a computer device, or a resource updating device, wherein the device may be software, hardware or a combination of software and hardware. way to achieve part or all of the resource update.

为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purposes, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments These are some embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

在一个实施例中,图2提供了一种资源更新方法,本实施例涉及的是在第一目标资源存在链接资源,链接指向的第二目标资源不支持递归接口,且链接指向的第二目标资源的默认接口不支持更新操作时,服务器如何对链接指向的第二目标资源进行更新操作的具体过程。如图2所示,该方法包括:In one embodiment, FIG. 2 provides a method for updating resources. This embodiment involves a linked resource in the first target resource, the second target resource pointed to by the link does not support a recursive interface, and the second target pointed to by the link does not support a recursive interface. The specific process of how the server performs the update operation on the second target resource pointed to by the link when the default interface of the resource does not support the update operation. As shown in Figure 2, the method includes:

S101,接收用户端发送的第一更新操作请求;所述第一更新操作请求用于指示采用递归接口对第一目标资源进行更新操作。S101: Receive a first update operation request sent by a client; the first update operation request is used to instruct to use a recursive interface to update a first target resource.

其中,资源是表示每一个设备、设备的每一种功能服务和设备的状态等信息的逻辑功能实体,这些逻辑功能实体由服务器公开给客户端进行访问和操作,客户端通过资源操作CRUDN和服务器进行交互,资源的参数主要包括URI、资源属性、资源引用和接口等。目标资源指的是用户端需要操作的资源。递归接口(batch interface):表示对collection资源操作时,对递归到collection资源中link指向的资源进行操作。Among them, resources are logical functional entities that represent information such as each device, each functional service of the device, and the status of the device. These logical functional entities are exposed by the server to the client for access and operation, and the client operates the CRUDN and the server through the resource. For interaction, the parameters of resources mainly include URI, resource attributes, resource references and interfaces. The target resource refers to the resource that the user needs to operate. Recursive interface (batch interface): Indicates that when operating on a collection resource, the recursive operation is performed on the resource pointed to by the link in the collection resource.

本实施例中,服务器接收用户端发送的第一更新操作请求,其中,服务器接收请求的方式可以是通过无线通信方式,例如:WIFi、红外通信或者3G、4G、5G等。其中该第一更新操作请求表示用户端需要服务器修改第一目标资源,该第一更新操作请求中可以包括:服务器操作的接口类型,例如:该接口类型为递归接口,第一目标资源的URI以及接口的属性信息,还可以包括其他信息,本实施例对此不做限定。该第一更新操作请求用于指示服务器采用递归接口对第一目标资源进行更新操作,其中,该第一目标资源为一个集合资源,该集合资源可以包括多个链接资源。In this embodiment, the server receives the first update operation request sent by the client, where the server may receive the request through wireless communication, such as WIFi, infrared communication, or 3G, 4G, 5G, and the like. The first update operation request indicates that the client needs the server to modify the first target resource, and the first update operation request may include: the interface type operated by the server, for example: the interface type is a recursive interface, the URI of the first target resource, and The attribute information of the interface may also include other information, which is not limited in this embodiment. The first update operation request is used to instruct the server to use a recursive interface to update the first target resource, where the first target resource is a collective resource, and the collective resource may include multiple linked resources.

S102,若所述第一目标资源为存在链接的集合资源,判断所述链接指向的第二目标资源是否支持递归接口。S102, if the first target resource is an aggregate resource with a link, determine whether the second target resource pointed to by the link supports a recursive interface.

其中,链接(link)表示某一个资源的链接,也即,collection(集合资源)可以包括指向其它资源的链接,例如,collection A中包括link,link指向collection B。The link (link) represents a link to a certain resource, that is, a collection (collection resource) may include links to other resources, for example, collection A includes a link, and the link points to collection B.

基于上述S101步骤中的第一更新操作请求,服务器在根据该第一更新操作请求对第一目标资源进行更新时,首先判断该第一目标资源是否为包含了链接资源的集合资源,若该第一目标资源是存在链接资源的集合资源,则服务器判断该链接指向的第二目标资源是否支持递归接口。其中,存在链接资源的集合资源表示该集合资源可以引用多个其他目标资源或其他集合资源,即,若该第一目标资源是存在链接资源的集合资源,则表示该第一目标资源可以引用多个其他目标资源或其他集合资源。其中,服务器判断链接资源是否支持递归接口的方式可以是,服务器在该链接资源的预设的接口列表中查找是否存在递归接口,若存在,则服务器确定该链接资源支持递归接口。Based on the first update operation request in the above step S101, when the server updates the first target resource according to the first update operation request, it first determines whether the first target resource is a collective resource including linked resources, and if the first target resource is If a target resource is a set resource with linked resources, the server determines whether the second target resource pointed to by the link supports a recursive interface. Wherein, the collective resource with linked resources means that the collective resource can refer to multiple other target resources or other collective resources. That is, if the first target resource is a collective resource with linked resources, it means that the first target resource can reference multiple resources. other target resources or other aggregate resources. The method for the server to determine whether the linked resource supports a recursive interface may be that the server searches for a recursive interface in a preset interface list of the linked resource, and if so, the server determines that the linked resource supports a recursive interface.

S103,若所述第二目标资源不支持递归接口,且,所述第二目标资源的默认接口不支持更新操作,则从预设的接口列表中确定支持更新操作的目标接口,并根据所述第一更新操作请求生成第二更新操作请求;所述第二更新操作请求包括所述目标接口的标识,且所述第二更新操作请求用于对所述第二目标资源进行更新操作。S103: If the second target resource does not support recursive interfaces, and the default interface of the second target resource does not support the update operation, determine the target interface that supports the update operation from the preset interface list, and according to the The first update operation request generates a second update operation request; the second update operation request includes the identifier of the target interface, and the second update operation request is used to perform an update operation on the second target resource.

在本步骤中,默认接口(default interface)通常为每个资源(包括collection,link)的支持接口列表(supported interface list)中排在第一位的接口为defaultinterface)。其中,该支持接口列表为该资源支持的所有操作类型。例如,该预设的接口列表中包括的接口可以是:"oic.if.baseline"、"oic.if.ll"、"oic.if.b"、"oic.if.r"、"oic.if.rw"、"oic.if.a"、"oic.if.s"等,还可以是其他的,则默认接口可以为"oic.if.baseline"。其中,该预设的接口列表中也包括每一个接口的属性信息,每个接口的属性信息表示该接口支持的操作以及其他信息,例如:接口的属性信息包括该接口是否支持更新操作等。本实施例对该预设的接口列表中接口的数量、类型以及其他内容并不做限定,可根据实际事情进行添加或删除。需要说明的是,该预设的接口列表可以是预先存储在服务器中,在使用时直接调用即可。In this step, the default interface (default interface) is usually the first interface in the supported interface list (supported interface list) of each resource (including collection and link) is defaultinterface). The list of supported interfaces is all operation types supported by the resource. For example, the interfaces included in the preset interface list may be: "oic.if.baseline", "oic.if.ll", "oic.if.b", "oic.if.r", "oic. if.rw", "oic.if.a", "oic.if.s", etc., and others, the default interface can be "oic.if.baseline". The preset interface list also includes attribute information of each interface, and the attribute information of each interface indicates the operations supported by the interface and other information, for example, the attribute information of the interface includes whether the interface supports update operations. This embodiment does not limit the number, type, and other contents of the interfaces in the preset interface list, and may be added or deleted according to actual events. It should be noted that the preset interface list may be pre-stored in the server, and can be directly invoked during use.

在实际应用中,基于上述S102步骤中,服务器确定的该第二目标资源不支持递归接口(batch interface),服务器获取该第二目标资源的默认接口,查看该默认接口是否支持更新操作,若该默认接口不支持更新操作,则服务器从预设的接口列表中重新确定一个可以支持更新操作的接口作为该链接资源的目标接口,例如,服务里可以遍历该第二目标资源支持的所有接口,找到一个支持更新操作的接口作为目标接口,并根据第一更新操作请求生成第二更新操作请求,然后,服务器根据该第二更新操作请求对该第二目标资源进行更新操作。In practical applications, based on the above step S102, the second target resource determined by the server does not support a recursive interface (batch interface), the server obtains the default interface of the second target resource, and checks whether the default interface supports the update operation, if the The default interface does not support the update operation, then the server re-determines an interface that can support the update operation from the preset interface list as the target interface of the link resource. For example, the service can traverse all the interfaces supported by the second target resource and find An interface supporting the update operation is used as the target interface, and a second update operation request is generated according to the first update operation request, and then the server performs an update operation on the second target resource according to the second update operation request.

本实施例提供的一种资源更新方法,服务器先接收用户端发送的用于更新第一目标资源的第一更新操作请求,在第一目标资源存在链接资源时,若链接指向的第二目标资源不支持递归接口,且第二目标资源的默认接口不支持更新操作时,服务器重新确定支持更新操作的目标接口,并根据第一更新操作请求生成第二更新操作请求,这样,服务器便可以根据该第二更新操作请求对第二目标资源进行更新操作,大大提高了服务器更新资源的灵活度,实现了在链接指向的资源不支持递归接口,且其默认接口不支持更新操作时,仍然可以采用新的机制来实现该链接指向的资源的更新。In a resource update method provided by this embodiment, the server first receives a first update operation request sent by a client for updating a first target resource, and when a link resource exists in the first target resource, if the link points to the second target resource When the recursive interface is not supported, and the default interface of the second target resource does not support the update operation, the server re-determines the target interface that supports the update operation, and generates a second update operation request according to the first update operation request. The second update operation requests to perform an update operation on the second target resource, which greatly improves the flexibility of the server to update resources, and realizes that when the resource pointed to by the link does not support the recursive interface and the default interface does not support the update operation, the new update operation can still be used. The mechanism to implement the update of the resource pointed to by the link.

可选地,在上述实施例的基础上,所述第一更新操作请求包括所述第一目标资源的标识、递归接口标识、更新操作标识和更新内容。其中,第一目标资源的标识表示的是该第一目标资源的唯一标识,其中该标识可以是数字,也可以是字母,还可以是数字与字母的组合,例如,该第一目标资源标识可以为目标资源(target Resource)的统一资源定位符(Uniform Resource Locator,URL),本实施例对该第一目标资源的标识不做限定。其中,递归接口的标识表示该接口采用递归方式进行操作,例如,oic.if.batch接口表示该接口为递归接口,当然,该标识还可以是其他内容,这里只是举例说明,本实施例对递归接口的标识并不做限定。其中,第一更新操作标识可以是数字、字母或者数字与字母的组合,用于表示该第一更新操作请求的唯一标识,例如,Op:update表示该操作类型为更新操作,服务器根据该更新操作标识确定需要操作的第一目标资源,根据更新内容对第一目标资源进行更新。在本实施例中,由于第一更新操作请求包括了第一目标资源的标识、递归接口标识、更新操作标识和更新内容,这样服务器在接收到用户端发送的第一更新操作请求时,就可以快速对该请求进行正确的响应,大大提高了服务器的响应速度。Optionally, based on the foregoing embodiment, the first update operation request includes an identifier of the first target resource, a recursive interface identifier, an update operation identifier, and an update content. The identifier of the first target resource represents the unique identifier of the first target resource, and the identifier may be a number, a letter, or a combination of numbers and letters. For example, the first target resource identifier may be It is a uniform resource locator (Uniform Resource Locator, URL) of a target resource (target Resource), and the identifier of the first target resource is not limited in this embodiment. The identifier of the recursive interface indicates that the interface is operated in a recursive manner. For example, the oic.if.batch interface indicates that the interface is a recursive interface. Of course, the identifier can also be other contents. The identifier of the interface is not limited. Wherein, the first update operation identifier may be a number, a letter, or a combination of numbers and letters, and is used to represent the unique identifier of the first update operation request. For example, Op:update indicates that the operation type is an update operation, and the server operates according to the update operation. Identify the first target resource that needs to be operated, and update the first target resource according to the update content. In this embodiment, since the first update operation request includes the identifier of the first target resource, the recursive interface identifier, the update operation identifier and the update content, when the server receives the first update operation request sent by the client, it can Fast and correct response to the request greatly improves the response speed of the server.

在一个实施例中,上述S103中“所述根据所述第一更新操作请求生成第二更新操作请求”的一种可实现方式包括:将所述第一更新操作请求中的递归接口标识替换为所述目标接口的标识,并将所述第一更新操作请求中的所述第一目标资源的标识替换为所述第二目标资源的标识,得到所述第二更新操作请求;其中,所述第二更新操作请求包括所述第二目标资源的标识、所述目标接口的标识、所述更新操作标识和所述更新内容。In one embodiment, an implementable manner of "generating a second update operation request according to the first update operation request" in the above S103 includes: replacing the recursive interface identifier in the first update operation request with the identifier of the target interface, and replace the identifier of the first target resource in the first update operation request with the identifier of the second target resource to obtain the second update operation request; wherein, the The second update operation request includes the identifier of the second target resource, the identifier of the target interface, the identifier of the update operation, and the update content.

在上述S101-S103步骤所提供的实施例中,第一更新操作请求一开始携带的是第一目标资源的标识和该第一目标资源对应的递归接口标识,当服务器确定了该第一目标资源存在链接资源,且该链接指向的第二目标资源不支持递归接口,又第二目标资源的默认接口也不支持更新操作,则服务器根据第一更新操作请求生成第二更新操作请求的方式可以是,将该第一更新操作请求中的递归接口标识替换为目标接口的标识,即将该目标接口的接口标识携带在第一更新操作请求中,然后将第二目标资源的标识替换第一目标资源的标识,则该替换了接口标识和资源标识的新的更新操作请求即为服务器根据第一更新操作请求生成的第二更新操作请求。则该第二更新操作请求包括了第二目标资源的标识、目标接口的标识、更新操作标识和更新内容。本实施例中,在服务器确定目前的第一更新操作请求中携带的信息不能实现更新时,重新生成可以实现更新的第二更新操作请求,以便根据该第二更新操作请求对资源进行更新,这样大大提高了服务器更新资源的灵活度,实现了在链接指向的资源不支持递归接口,且其默认接口不支持更新操作时对该链接指向的资源更新。In the embodiment provided by the above steps S101-S103, the first update operation request initially carries the identifier of the first target resource and the recursive interface identifier corresponding to the first target resource. When the server determines the first target resource If there is a link resource, and the second target resource pointed to by the link does not support recursive interfaces, and the default interface of the second target resource does not support the update operation, the server can generate the second update operation request according to the first update operation request. , replace the recursive interface identifier in the first update operation request with the identifier of the target interface, that is, carry the interface identifier of the target interface in the first update operation request, and then replace the identifier of the second target resource with the identifier of the first target resource. ID, the new update operation request that replaces the interface ID and the resource ID is the second update operation request generated by the server according to the first update operation request. Then the second update operation request includes the identifier of the second target resource, the identifier of the target interface, the identifier of the update operation and the update content. In this embodiment, when the server determines that the information carried in the current first update operation request cannot be updated, it regenerates a second update operation request that can realize the update, so as to update the resource according to the second update operation request, so that The flexibility of the server to update resources is greatly improved, and the resource pointed to by the link can be updated when the resource pointed to by the link does not support recursive interface and its default interface does not support the update operation.

由于本申请提供的一种资源更新方法主要用于服务器根据用户端的请求对资源进行更新,那么在更新完成后,服务器需要对用户端反馈一个更新成功的信息,则在一个实施例中,如图3所示,本实施例涉及的是服务器将第一目标资源中所有所述资源均更新完成的结果发送给用户端的具体过程,所述方法包括:Since a resource updating method provided by this application is mainly used for the server to update the resource according to the request of the client, after the update is completed, the server needs to feed back a successful update information to the client. In one embodiment, as shown in Fig. As shown in Fig. 3, this embodiment involves a specific process in which the server sends the result that all the resources in the first target resource have been updated to the client, and the method includes:

S201,在所述第一目标资源中的所有所述资源均更新完成之后,生成应答消息;所述应答消息包括所述第一目标资源中的所有所述资源的更新结果。S201, after all the resources in the first target resource are updated, generate a response message; the response message includes update results of all the resources in the first target resource.

在本实施例中,服务器为每个不支持更新的资源生成第二更新操作请求,然后服务器根据各第二更新操作请求对用户端请求更新的第一目标资源中各个资源更新完成后,将所有更新后的资源的更新结果进行聚合,生成应答消息,其中,该应答消息用于表示对用户端发送更新资源请求的回应。In this embodiment, the server generates a second update operation request for each resource that does not support update, and then the server updates each resource in the first target resource requested by the client to update according to each second update operation request, and then updates all the resources. The update results of the updated resources are aggregated to generate a response message, wherein the response message is used to indicate a response to a request sent by the client to update the resource.

S202,将所述应答消息发送给用户端。S202, sending the response message to the client.

基于上述S201步骤中生成的应答消息,服务器将该应答消息发送至用户端,其中发送方式与接收用户端发送的请求的方式一样,通过无线通信方式传输,当然,传输路径可以是沿原路径返回,也开始其他更便捷的路径,本实施例对此不做限定。Based on the response message generated in the above step S201, the server sends the response message to the client. The sending method is the same as the method of receiving the request sent by the client. , and other more convenient paths are also started, which is not limited in this embodiment.

本实施例提供的一种资源更新方法,服务器在根据第二更新操作请求对用户端请求更新的第一目标资源中所有资源更新完成后,将所有更新后的第一目标资源中的所有资源的更新结果生成应答消息,并发送至用户端,以使用户端知道其请求更新的资源已经完成了更新,大大增加了用户端和服务端之间消息的互动性。In the method for updating resources provided by this embodiment, after the server completes updating all resources in the first target resource requested by the client to update according to the second update operation request, the server updates all the resources in all the updated first target resources The update result generates a response message and sends it to the client, so that the client knows that the resource requested to be updated has been updated, which greatly increases the interactivity of messages between the client and the server.

另外,在服务器根据用户端的第一更新操作请求进行更新操作之前,服务器需要对用户端是否具有访问第一目标资源的权限进行鉴定,则在所述第一目标资源中存在链接资源时,判断所述链接指向的第二目标资源是否支持递归接口之前,本申请还提供了一种实施例,本实施例涉及的是服务器根据用户端的标识确定用户端对第一目标资源是否具有访问权限,并在用户具有访问权限时对第二目标资源是否支持递归接口进行判断的具体过程,如图4所示,所述方法还包括:In addition, before the server performs the update operation according to the first update operation request of the client, the server needs to verify whether the client has the authority to access the first target resource, and then when there is a linked resource in the first target resource, determine whether the Before determining whether the second target resource pointed to by the link supports the recursive interface, the present application also provides an embodiment. This embodiment involves the server determining whether the user terminal has access rights to the first target resource according to the identifier of the user terminal, and in the The specific process of judging whether the second target resource supports the recursive interface when the user has the access authority, as shown in FIG. 4 , the method further includes:

S301,根据所述用户端标识,判断所述用户端是否具有访问所述第一目标资源的权限。S301, according to the identifier of the client, determine whether the client has the authority to access the first target resource.

其中,用户端标识为用户端的身份标识,例如可以是数字、字母或者数字与字母的组合,本实施例对此不做限定。在实际应用中,可以根据各个用户端的权限,预先建立用户端标识与访问权限之间的对应关系,服务器查询该对应关系,判断用户端是否具有访问第一目标资源的权限,若存在,则说明该用户端具有访问该第一目标资源的权限,否则,则表示该用户端具没有访问该第一目标资源的权限。可以理解的是,上述每个第一目标资源都有各自的标识,用户若需要访问某个第一目标资源,则需要提前建立该用户与该第一目标资源之间的映射关系,并将该映射关系存储在服务器中。The user terminal identifier is an identity identifier of the user terminal, for example, may be numbers, letters, or a combination of numbers and letters, which is not limited in this embodiment. In practical applications, the corresponding relationship between the identity of the client and the access authority can be pre-established according to the authority of each client, and the server queries the corresponding relationship to determine whether the client has the authority to access the first target resource. The client has the right to access the first target resource, otherwise, it means that the client has no right to access the first target resource. It can be understood that each of the above-mentioned first target resources has its own identifier. If a user needs to access a certain first target resource, the mapping relationship between the user and the first target resource needs to be established in advance, and the The mapping relationship is stored in the server.

S302,若所述用户端具有访问所述第一目标资源的权限,则在所述第一目标资源为存在链接的集合资源时,判断所述第二目标资源是否支持递归接口。S302, if the client has the authority to access the first target resource, when the first target resource is a linked aggregate resource, determine whether the second target resource supports a recursive interface.

本步骤中,若上述步骤S301中确定了该用户端具有访问该第一目标资源的权限,则继续执行图2中的S101-S103,也即在该第一目标资源存在链接资源时,判断该链接指向的第二目标资源是否支持递归接口,其中服务器判断第二目标资源是否支持递归接口的方式同S102步骤中的方式,例如为服务器在该第二目标资源的预设的接口列表中查找是否存在递归接口,若存在,则服务器确定该第二目标资源支持递归接口。In this step, if it is determined in the above step S301 that the client has the authority to access the first target resource, then continue to execute S101-S103 in FIG. 2 , that is, when the first target resource has a link resource, determine the Whether the second target resource pointed to by the link supports the recursive interface, wherein the server determines whether the second target resource supports the recursive interface in the same manner as in step S102, for example, the server searches the preset interface list of the second target resource for whether A recursive interface exists, and if so, the server determines that the second target resource supports the recursive interface.

本实施例提供的一种资源更新方法,服务器根据用户端的标识先确定该用户端是否具有访问该第一目标资源的权限,在确定有权限时,再在该第一目标资源为存在链接的集合资源时,判断所述第二目标资源是否支持递归接口,这样,只在用户端具有访问该第一目标资源权限时才进行后续步骤,避免了没有访问权限的用户端访问第一目标资源,提高了资源信息的安全可靠性,而且避免了服务器资源和时间的浪费。In a resource updating method provided by this embodiment, the server first determines whether the client has the permission to access the first target resource according to the identifier of the client, and when it is determined that the first target resource has the permission, the first target resource is a set of existing links. resource, it is judged whether the second target resource supports a recursive interface. In this way, the subsequent steps are only performed when the user terminal has the authority to access the first target resource, which prevents the user terminal without access authority from accessing the first target resource and improves the The security and reliability of resource information are improved, and the waste of server resources and time is avoided.

考虑到第二目标资源不支持递归接口时,但其默认接口支持更新操作的情况,在一个实施例中,所述方法还包括:若所述第二目标资源不支持递归接口,且所述第二目标资源的默认接口支持更新操作,则根据所述第一更新操作请求生成第三更新操作请求;所述第三更新操作请求包括所述默认接口的标识,且所述第三更新操作请求用于对所述第二目标资源进行更新操作。可选地,根据所述第一更新操作请求生成第三更新操作请求的一种可实现方式为:将所述第一更新操作请求中的递归接口标识替换为所述默认接口的标识,并将所述第一更新操作请求中的所述第一目标资源的标识替换为所述第二目标资源的标识,得到所述第三更新操作请求;其中,所述第三更新操作请求包括所述第二目标资源的标识、所述默认接口的标识、更新操作标识和更新内容。Considering a situation where the second target resource does not support the recursive interface, but its default interface supports the update operation, in one embodiment, the method further includes: if the second target resource does not support the recursive interface, and the first target resource does not support the recursive interface The default interface of the second target resource supports the update operation, then a third update operation request is generated according to the first update operation request; the third update operation request includes the identifier of the default interface, and the third update operation request uses for performing an update operation on the second target resource. Optionally, an implementation manner of generating a third update operation request according to the first update operation request is: replacing the recursive interface identifier in the first update operation request with the identifier of the default interface, and replacing the identifier of the default interface with the identifier of the default interface. The identifier of the first target resource in the first update operation request is replaced with the identifier of the second target resource to obtain the third update operation request; wherein the third update operation request includes the first update operation request. 2. The identification of the target resource, the identification of the default interface, the identification of the update operation, and the update content.

其中,第二目标资源的默认接口同上述S103步骤中所述,在实际应用中,在服务器确定的该第二目标资源不支持递归接口,但服务器获取的该第二目标资源的默认接口支持更新操作,则服务器根据第一更新操作请求生成第三更新操作请求,然后,服务器根据该第三更新操作请求对该第二目标资源进行更新操作。其中,服务器根据第一更新操作请求生成第三更新操作请求的方式可以是服务器将该默认接口的接口标识替换第一目标资源中递归接口的接口标识,然后将第二目标资源的标识替换第一目标资源标识,最后,将该替换了接口标识和资源标识的新的更新操作请求确定为第三更新操作请求,则生成的第三更新操作请求包括所述第二目标资源的标识、所述默认接口的标识、更新操作标识和更新内容。Wherein, the default interface of the second target resource is the same as that described in step S103 above. In practical applications, the second target resource determined by the server does not support recursive interfaces, but the default interface of the second target resource obtained by the server supports updating operation, the server generates a third update operation request according to the first update operation request, and then the server performs an update operation on the second target resource according to the third update operation request. The manner in which the server generates the third update operation request according to the first update operation request may be that the server replaces the interface identifier of the default interface with the interface identifier of the recursive interface in the first target resource, and then replaces the first target resource with the identifier of the second target resource. target resource identifier, and finally, the new update operation request that replaces the interface identifier and the resource identifier is determined as the third update operation request, and the generated third update operation request includes the identifier of the second target resource, the default The identifier of the interface, the identifier of the update operation, and the contents of the update.

在本实施例中,若第二目标资源不支持递归接口,但第二目标资源的默认接口支持更新操作,则服务器根据第一更新操作请求生成第三更新操作请求。这样,服务器确定目前的递归接口不能实现资源更新时,将支持更新的默认接口根据第一更新操作请求生成第三更新操作请求,大大提高了服务器更新资源的灵活度。In this embodiment, if the second target resource does not support the recursive interface, but the default interface of the second target resource supports the update operation, the server generates the third update operation request according to the first update operation request. In this way, when the server determines that the current recursive interface cannot implement resource update, the default interface that supports updating generates a third update operation request according to the first update operation request, which greatly improves the flexibility of the server to update resources.

又考虑到上述S102步骤中,第二目标资源支持递归接口的情况,本申请实施例提供一种资源更新方法,所述方法还包括:若所述第二目标资源支持递归接口,则根据所述第一更新操作请求生成第四更新操作请求;所述第四更新操作请求用于对所述第二目标资源进行更新操作。可选地,所述根据所述第一更新操作请求生成第四更新操作请求的一种可实现方式为:将所述第一更新操作请求中的所述第一目标资源的标识替换为所述第二目标资源的标识,得到所述第四更新操作请求;其中,所述第四更新操作请求包括所述第二目标资源的标识、所述递归接口标识、更新操作标识和更新内容。Considering the situation that the second target resource supports a recursive interface in the above step S102, an embodiment of the present application provides a resource updating method, the method further includes: if the second target resource supports a recursive interface, according to the The first update operation request generates a fourth update operation request; the fourth update operation request is used to perform an update operation on the second target resource. Optionally, an implementable manner of generating the fourth update operation request according to the first update operation request is: replacing the identifier of the first target resource in the first update operation request with the The identifier of the second target resource is obtained, and the fourth update operation request is obtained; wherein, the fourth update operation request includes the identifier of the second target resource, the recursive interface identifier, the update operation identifier and the update content.

其中,在确定第二目标资源支持递归接口的时,服务器根据该第一更新操作请求生成第四更新操作请求,并根据该第四更新操作请求对该第二目标资源进行更新操作。其中,服务器根据第一更新操作请求生成第四更新操作请求的方式可以是服务器将该第一更新操作请求中的第一目标资源的标识替换为第二目标资源的标识,然后新的更新操作请求确定为第四更新操作请求,生成的第四更新操作请求包括所述第二目标资源的标识、所述递归接口标识、更新操作标识和更新内容。Wherein, when it is determined that the second target resource supports the recursive interface, the server generates a fourth update operation request according to the first update operation request, and performs an update operation on the second target resource according to the fourth update operation request. The manner in which the server generates the fourth update operation request according to the first update operation request may be that the server replaces the identifier of the first target resource in the first update operation request with the identifier of the second target resource, and then a new update operation request It is determined to be a fourth update operation request, and the generated fourth update operation request includes the identifier of the second target resource, the recursive interface identifier, the update operation identifier and the update content.

在本实施例中,若第二目标资源支持递归接口,服务器根据该第一更新操作请求生成第四更新操作请求。这样,服务器确定目前的递归接口可以实现资源更新时,直接根据生成的第四更新操作请求对资源进行更新,大大提高了服务器更新资源的速度。In this embodiment, if the second target resource supports a recursive interface, the server generates a fourth update operation request according to the first update operation request. In this way, when the server determines that the current recursive interface can realize the resource update, it directly updates the resource according to the generated fourth update operation request, which greatly improves the speed of the server to update the resource.

应该理解的是,虽然图2-4的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图2-4中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the steps in the flowcharts of FIGS. 2-4 are shown in sequence according to the arrows, these steps are not necessarily executed in the sequence shown by the arrows. Unless explicitly stated herein, the execution of these steps is not strictly limited to the order, and these steps may be performed in other orders. Moreover, at least a part of the steps in FIGS. 2-4 may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but may be executed at different times. These sub-steps or stages are not necessarily completed at the same time. The order of execution of the steps is not necessarily sequential, but may be performed alternately or alternately with other steps or at least a part of sub-steps or stages of other steps.

在一个实施例中,如图5所示,本申请实施例提供了一种资源更新装置,所述装置包括:接收模块10、判断模块11和处理模块12。其中,In one embodiment, as shown in FIG. 5 , an embodiment of the present application provides an apparatus for updating resources. The apparatus includes: a receiving module 10 , a judging module 11 and a processing module 12 . in,

接收模块10,用于接收用户端发送的第一更新操作请求;所述第一更新操作请求用于指示采用递归接口对第一目标资源进行更新操作;a receiving module 10, configured to receive a first update operation request sent by the user terminal; the first update operation request is used to instruct to use a recursive interface to update the first target resource;

判断模块11,用于若所述第一目标资源为存在链接资源的集合资源,判断所述链接指向的第二目标资源资源是否支持递归接口;Judging module 11, configured to judge whether the second target resource resource pointed to by the link supports a recursive interface if the first target resource is an aggregate resource with linked resources;

处理模块12,用于若所述第二目标资源资源不支持递归接口,且,所述第二目标资源资源的默认接口不支持更新操作,则从预设的接口列表中确支持更新操作的目标接口,并根据所述第一更新操作请求生成第二更新操作请求;所述第二更新操作请求包括所述目标接口的标识,且所述第二更新操作请求用于对所述第二目标资源进行更新操作。The processing module 12 is configured to, if the second target resource resource does not support the recursive interface, and the default interface of the second target resource resource does not support the update operation, confirm the target of the update operation from the preset interface list interface, and generate a second update operation request according to the first update operation request; the second update operation request includes the identifier of the target interface, and the second update operation request is used for the second target resource Perform an update operation.

上述实施例提供的一种资源更新装置,其实现原理和技术效果与上述方法实施例类似,在此不再赘述。The implementation principle and technical effect of a resource updating apparatus provided by the foregoing embodiment are similar to those of the foregoing method embodiment, and details are not described herein again.

在一个实施例中,所述第一更新操作请求包括第一目标资源的标识、递归接口标识、更新操作标识和更新内容。In one embodiment, the first update operation request includes an identifier of the first target resource, a recursive interface identifier, an update operation identifier, and an update content.

上述实施例提供的一种资源更新装置,其实现原理和技术效果与上述方法实施例类似,在此不再赘述。The implementation principle and technical effect of a resource updating apparatus provided by the foregoing embodiment are similar to those of the foregoing method embodiment, and details are not described herein again.

在一个实施例中,上述处理模块12具体用于将所述第一更新操作请求中的递归接口标识替换为所述目标接口的标识,并将所述第一更新操作请求中的所述第一目标资源的标识替换为所述第二目标资源的标识,得到所述第二更新操作请求;In one embodiment, the above-mentioned processing module 12 is specifically configured to replace the recursive interface identifier in the first update operation request with the identifier of the target interface, and replace the first update operation request with the identifier of the target interface. The identifier of the target resource is replaced with the identifier of the second target resource to obtain the second update operation request;

其中,所述第二更新操作请求包括所述第二目标资源的标识、所述目标接口的标识、所述更新操作标识和所述更新内容。Wherein, the second update operation request includes the identifier of the second target resource, the identifier of the target interface, the identifier of the update operation, and the update content.

上述实施例提供的一种资源更新装置,其实现原理和技术效果与上述方法实施例类似,在此不再赘述。The implementation principle and technical effect of a resource updating apparatus provided by the foregoing embodiment are similar to those of the foregoing method embodiment, and details are not described herein again.

在一个实施例中,如图6所示,本申请实施例提供了一种资源更新装置,所述装置还包括:生成模块13和发送模块14。其中,In one embodiment, as shown in FIG. 6 , an embodiment of the present application provides an apparatus for updating resources, and the apparatus further includes: a generating module 13 and a sending module 14 . in,

生成模块13,用于在所述第一目标资源中的所有资源均更新完成之后,生成应答消息;所述应答消息包括所述第一目标资源中的所有所述链接资源的更新结果;The generating module 13 is configured to generate a response message after all the resources in the first target resource are updated; the response message includes the update results of all the linked resources in the first target resource;

发送模块14,用于将所述应答消息发送给用户端。The sending module 14 is configured to send the response message to the client.

上述实施例提供的一种资源更新装置,其实现原理和技术效果与上述方法实施例类似,在此不再赘述。The implementation principle and technical effect of a resource updating apparatus provided by the foregoing embodiment are similar to those of the foregoing method embodiment, and details are not described herein again.

在一个实施例中,如图7所示,本申请实施例提供了一种资源更新装置,所述装置还包括:判断权限模块15。其中,In one embodiment, as shown in FIG. 7 , an embodiment of the present application provides a resource updating apparatus, the apparatus further includes: a judging authority module 15 . in,

判断权限模块15,用于根据所述用户端标识,判断所述用户端是否具有访问所述第一目标资源的权限;Judging authority module 15, for judging whether the user terminal has the authority to access the first target resource according to the user terminal identifier;

判断模块11,用于若所述用户端具有访问所述第一目标资源的权限,则在所述第一目标资源为存在链接的集合资源时,判断所述第二目标资源是否支持递归接口。The judging module 11 is configured to judge whether the second target resource supports a recursive interface when the first target resource is a linked aggregate resource if the client has the authority to access the first target resource.

上述实施例提供的一种资源更新装置,其实现原理和技术效果与上述方法实施例类似,在此不再赘述。The implementation principle and technical effect of a resource updating apparatus provided by the foregoing embodiment are similar to those of the foregoing method embodiment, and details are not described herein again.

在一个实施例中,如图8所示,本申请实施例提供了一种资源更新装置,所述装置还包括:第二生成模块17,用于若所述第二目标资源不支持递归接口,且所述第二目标资源的默认接口支持更新操作,则根据所述第一更新操作请求生成第三更新操作请求;所述第三更新操作请求包括所述默认接口的标识,且所述第三更新操作请求用于对所述第二目标资源进行更新操作。In one embodiment, as shown in FIG. 8 , an embodiment of the present application provides a resource updating apparatus, the apparatus further includes: a second generating module 17, configured to, if the second target resource does not support a recursive interface, and the default interface of the second target resource supports the update operation, then a third update operation request is generated according to the first update operation request; the third update operation request includes the identifier of the default interface, and the third update operation request The update operation request is used to perform an update operation on the second target resource.

在一个实施例中,所述第二生成模块17还用于将所述第一更新操作请求中的递归接口标识替换为所述默认接口的标识,并将所述第一更新操作请求中的所述第一目标资源的标识替换为所述第二目标资源的标识,得到所述第三更新操作请求;其中,所述第三更新操作请求包括所述第二目标资源的标识、所述默认接口的标识、更新操作标识和更新内容。In one embodiment, the second generation module 17 is further configured to replace the recursive interface identifier in the first update operation request with the default interface identifier, and generate all the identifiers in the first update operation request. The identifier of the first target resource is replaced with the identifier of the second target resource, and the third update operation request is obtained; wherein, the third update operation request includes the identifier of the second target resource, the default interface , the ID of the update operation, and the content of the update.

上述实施例提供的一种资源更新装置,其实现原理和技术效果与上述方法实施例类似,在此不再赘述。The implementation principle and technical effect of a resource updating apparatus provided by the foregoing embodiment are similar to those of the foregoing method embodiment, and details are not described herein again.

在一个实施例中,如图9所示,本申请实施例提供了一种资源更新装置,所述装置还包括:第三生成模块18,用于若所述第二目标资源支持递归接口,则根据所述第一更新操作请求生成第四更新操作请求;所述第四更新操作请求用于对所述第二目标资源进行更新操作。In one embodiment, as shown in FIG. 9 , an embodiment of the present application provides an apparatus for updating resources, and the apparatus further includes: a third generating module 18, configured to: if the second target resource supports a recursive interface, then A fourth update operation request is generated according to the first update operation request; the fourth update operation request is used to perform an update operation on the second target resource.

在一个实施例中,所述第三生成模块18还用于将所述第一更新操作请求中的所述第一目标资源的标识替换为所述第二目标资源的标识,得到所述第四更新操作请求;其中,所述第四更新操作请求包括所述第二目标资源的标识、所述递归接口标识、更新操作标识和更新内容。In one embodiment, the third generation module 18 is further configured to replace the identifier of the first target resource in the first update operation request with the identifier of the second target resource, to obtain the fourth An update operation request; wherein the fourth update operation request includes the identifier of the second target resource, the recursive interface identifier, the update operation identifier and the update content.

上述实施例提供的一种资源更新装置,其实现原理和技术效果与上述方法实施例类似,在此不再赘述。The implementation principle and technical effect of a resource updating apparatus provided by the foregoing embodiment are similar to those of the foregoing method embodiment, and details are not described herein again.

关于资源更新装置的具体限定可以参见上文中对于资源更新方法的限定,在此不再赘述。上述资源更新处理装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。For the specific limitation of the resource updating apparatus, reference may be made to the limitation on the resource updating method above, which will not be repeated here. All or part of the modules in the above resource update processing apparatus can be implemented by software, hardware and combinations thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

在一个实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图10所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机程序和数据库。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的数据库用于存储资源更新数据。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行时以实现一种资源更新方法。In one embodiment, a computer device is provided, and the computer device may be a server, and its internal structure diagram may be as shown in FIG. 10 . The computer device includes a processor, memory, a network interface, and a database connected by a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium, an internal memory. The nonvolatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the execution of the operating system and computer programs in the non-volatile storage medium. The computer device's database is used to store resource update data. The network interface of the computer device is used to communicate with an external terminal through a network connection. The computer program implements a resource updating method when executed by the processor.

本领域技术人员可以理解,图10中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art can understand that the structure shown in FIG. 10 is only a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer equipment to which the solution of the present application is applied. Include more or fewer components than shown in the figures, or combine certain components, or have a different arrangement of components.

在一个实施例中,提供了一种计算机设备,包括存储器和处理器,存储器中存储有计算机程序,该处理器执行计算机程序时实现以下步骤:In one embodiment, a computer device is provided, including a memory and a processor, a computer program is stored in the memory, and the processor implements the following steps when executing the computer program:

接收用户端发送的第一更新操作请求;所述第一更新操作请求用于指示采用递归接口对第一目标资源进行更新操作;Receive a first update operation request sent by the client; the first update operation request is used to instruct to use a recursive interface to update the first target resource;

若所述第一目标资源为存在链接的集合资源,判断所述链接指向的第二目标资源是否支持递归接口;If the first target resource is an aggregate resource with a link, determine whether the second target resource pointed to by the link supports a recursive interface;

若所述第二目标资源不支持递归接口,且,所述第二目标资源的默认接口不支持更新操作,则从预设的接口列表中确定支持更新操作的目标接口,并根据所述第一更新操作请求生成第二更新操作请求;所述第二更新操作请求包括所述目标接口的标识,且所述第二更新操作请求用于对所述第二目标资源进行更新操作。If the second target resource does not support the recursive interface, and the default interface of the second target resource does not support the update operation, the target interface that supports the update operation is determined from the preset interface list, and according to the first The update operation request generates a second update operation request; the second update operation request includes the identifier of the target interface, and the second update operation request is used to perform an update operation on the second target resource.

上述实施例提供的一种计算机设备,其实现原理和技术效果与上述方法实施例类似,在此不再赘述。The implementation principle and technical effect of the computer device provided by the above-mentioned embodiment are similar to those of the above-mentioned method embodiment, which will not be repeated here.

在一个实施例中,提供了一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现以下步骤:In one embodiment, a computer-readable storage medium is provided on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

接收用户端发送的第一更新操作请求;所述第一更新操作请求用于指示采用递归接口对第一目标资源进行更新操作;Receive a first update operation request sent by the client; the first update operation request is used to instruct to use a recursive interface to update the first target resource;

若所述第一目标资源为存在链接的集合资源,判断所述链接指向的第二目标资源是否支持递归接口;If the first target resource is an aggregate resource with a link, determine whether the second target resource pointed to by the link supports a recursive interface;

若所述第二目标资源不支持递归接口,且,所述第二目标资源的默认接口不支持更新操作,则从预设的接口列表中确定支持更新操作的目标接口,并根据所述第一更新操作请求生成第二更新操作请求;所述第二更新操作请求包括所述目标接口的标识,且所述第二更新操作请求用于对所述第二目标资源进行更新操作。If the second target resource does not support the recursive interface, and the default interface of the second target resource does not support the update operation, the target interface that supports the update operation is determined from the preset interface list, and according to the first The update operation request generates a second update operation request; the second update operation request includes the identifier of the target interface, and the second update operation request is used to perform an update operation on the second target resource.

上述实施例提供的一种计算机可读存储介质,其实现原理和技术效果与上述方法实施例类似,在此不再赘述。The implementation principle and technical effect of the computer-readable storage medium provided by the above-mentioned embodiments are similar to those of the above-mentioned method embodiments, and details are not described herein again.

本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage In the medium, when the computer program is executed, it may include the processes of the above-mentioned method embodiments. Wherein, any reference to memory, storage, database or other medium used in the various embodiments provided in this application may include non-volatile and/or volatile memory. Nonvolatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Road (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。The technical features of the above embodiments can be combined arbitrarily. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features It is considered to be the range described in this specification. The above-mentioned embodiments only represent several embodiments of the present application, and the descriptions thereof are specific and detailed, but should not be construed as a limitation on the scope of the invention patent. It should be pointed out that for those skilled in the art, without departing from the concept of the present application, several modifications and improvements can be made, which all belong to the protection scope of the present application. Therefore, the scope of protection of the patent of the present application shall be subject to the appended claims.

Claims (12)

1.一种资源更新方法,其特征在于,所述方法包括:1. a resource update method, it is characterised in that the method comprises: 接收用户端发送的第一更新操作请求;所述第一更新操作请求用于指示采用递归接口对第一目标资源进行更新操作;Receive a first update operation request sent by the client; the first update operation request is used to instruct to use a recursive interface to update the first target resource; 若所述第一目标资源为存在链接的集合资源,判断所述链接指向的第二目标资源是否支持递归接口;If the first target resource is an aggregate resource with a link, determine whether the second target resource pointed to by the link supports a recursive interface; 若所述第二目标资源不支持递归接口,且,所述第二目标资源的默认接口不支持更新操作,则从预设的接口列表中确定支持更新操作的目标接口,并根据所述第一更新操作请求生成第二更新操作请求;所述第二更新操作请求包括所述目标接口的标识,且所述第二更新操作请求用于对所述第二目标资源进行更新操作。If the second target resource does not support the recursive interface, and the default interface of the second target resource does not support the update operation, the target interface that supports the update operation is determined from the preset interface list, and according to the first The update operation request generates a second update operation request; the second update operation request includes the identifier of the target interface, and the second update operation request is used to perform an update operation on the second target resource. 2.根据权利要求1所述的方法,其特征在于,所述第一更新操作请求包括所述第一目标资源的标识、递归接口标识、更新操作标识和更新内容。2 . The method according to claim 1 , wherein the first update operation request includes an identifier of the first target resource, a recursive interface identifier, an update operation identifier, and an update content. 3 . 3.根据权利要求2所述的方法,其特征在于,所述根据所述第一更新操作请求生成第二更新操作请求,包括:3. The method according to claim 2, wherein the generating a second update operation request according to the first update operation request comprises: 将所述第一更新操作请求中的递归接口标识替换为所述目标接口的标识,并将所述第一更新操作请求中的所述第一目标资源的标识替换为所述第二目标资源的标识,得到所述第二更新操作请求;Replace the recursive interface identifier in the first update operation request with the identifier of the target interface, and replace the identifier of the first target resource in the first update operation request with the identifier of the second target resource. identifier, to obtain the second update operation request; 其中,所述第二更新操作请求包括所述第二目标资源的标识、所述目标接口的标识、所述更新操作标识和所述更新内容。Wherein, the second update operation request includes the identifier of the second target resource, the identifier of the target interface, the identifier of the update operation, and the update content. 4.根据权利要求1-3任一项所述的方法,其特征在于,所述方法还包括:4. The method according to any one of claims 1-3, wherein the method further comprises: 在所述第一目标资源中的所有资源均更新完成之后,生成应答消息;所述应答消息包括所述第一目标资源中的所有资源的更新结果;After all the resources in the first target resource are updated, a response message is generated; the response message includes the update results of all the resources in the first target resource; 将所述应答消息发送给用户端。Send the reply message to the client. 5.根据权利要求1-3任一项所述的方法,其特征在于,所述第一更新操作请求包括用户端标识,则若所述第一目标资源为存在链接的集合资源,判断所述链接指向的第二目标资源是否支持递归接口之前,所述方法还包括:5. The method according to any one of claims 1-3, wherein the first update operation request includes a client identifier, and if the first target resource is a linked aggregate resource, it is determined that the Before determining whether the second target resource pointed to by the link supports the recursive interface, the method further includes: 根据所述用户端标识,判断所述用户端是否具有访问所述第一目标资源的权限;According to the identifier of the client, determine whether the client has the authority to access the first target resource; 若所述用户端具有访问所述第一目标资源的权限,则在所述第一目标资源为存在链接的集合资源时,判断所述第二目标资源是否支持递归接口。If the client has the right to access the first target resource, when the first target resource is a linked aggregate resource, it is determined whether the second target resource supports a recursive interface. 6.根据权利要求1-3任一项所述的方法,其特征在于,所述方法还包括:6. The method according to any one of claims 1-3, wherein the method further comprises: 若所述第二目标资源不支持递归接口,且所述第二目标资源的默认接口支持更新操作,则根据所述第一更新操作请求生成第三更新操作请求;所述第三更新操作请求包括所述默认接口的标识,且所述第三更新操作请求用于对所述第二目标资源进行更新操作。If the second target resource does not support a recursive interface and the default interface of the second target resource supports an update operation, a third update operation request is generated according to the first update operation request; the third update operation request includes The identifier of the default interface, and the third update operation request is used to perform an update operation on the second target resource. 7.根据权利要求6所述的方法,其特征在于,所述根据所述第一更新操作请求生成第三更新操作请求,包括:7. The method according to claim 6, wherein the generating a third update operation request according to the first update operation request comprises: 将所述第一更新操作请求中的递归接口标识替换为所述默认接口的标识,并将所述第一更新操作请求中的所述第一目标资源的标识替换为所述第二目标资源的标识,得到所述第三更新操作请求;Replace the recursive interface identifier in the first update operation request with the default interface identifier, and replace the identifier of the first target resource in the first update operation request with the identifier of the second target resource. identifier, to obtain the third update operation request; 其中,所述第三更新操作请求包括所述第二目标资源的标识、所述默认接口的标识、更新操作标识和更新内容。Wherein, the third update operation request includes the identifier of the second target resource, the identifier of the default interface, the identifier of the update operation, and the update content. 8.根据权利要求1-3任一项所述的方法,其特征在于,所述方法还包括:8. The method according to any one of claims 1-3, wherein the method further comprises: 若所述第二目标资源支持递归接口,则根据所述第一更新操作请求生成第四更新操作请求;所述第四更新操作请求用于对所述第二目标资源进行更新操作。If the second target resource supports a recursive interface, a fourth update operation request is generated according to the first update operation request; the fourth update operation request is used to perform an update operation on the second target resource. 9.根据权利要求1-3任一项所述的方法,其特征在于,所述根据所述第一更新操作请求生成第四更新操作请求,包括:9. The method according to any one of claims 1-3, wherein the generating a fourth update operation request according to the first update operation request comprises: 将所述第一更新操作请求中的所述第一目标资源的标识替换为所述第二目标资源的标识,得到所述第四更新操作请求;replacing the identifier of the first target resource in the first update operation request with the identifier of the second target resource to obtain the fourth update operation request; 其中,所述第四更新操作请求包括所述第二目标资源的标识、所述递归接口标识、更新操作标识和更新内容。Wherein, the fourth update operation request includes the identifier of the second target resource, the recursive interface identifier, the update operation identifier and the update content. 10.一种资源更新装置,其特征在于,所述装置包括:10. A resource updating device, characterized in that the device comprises: 接收模块,用于接收用户端发送的第一更新操作请求;所述第一更新操作请求用于指示采用递归接口对第一目标资源进行更新操作;a receiving module, configured to receive a first update operation request sent by the user terminal; the first update operation request is used to instruct to use a recursive interface to update the first target resource; 判断模块,用于若所述第一目标资源为存在链接的集合资源,判断所述链接指向的第二目标资源是否支持递归接口;a judgment module, configured to judge whether the second target resource pointed to by the link supports a recursive interface if the first target resource is an aggregate resource with a link; 处理模块,用于若所述第二目标资源不支持递归接口,且,所述第二目标资源的默认接口不支持更新操作,则从预设的接口列表中确定支持更新操作的目标接口,并根据所述第一更新操作请求生成第二更新操作请求;所述第二更新操作请求包括所述目标接口的标识,且所述第二更新操作请求用于对所述第二目标资源进行更新操作。The processing module is configured to, if the second target resource does not support the recursive interface and the default interface of the second target resource does not support the update operation, determine the target interface that supports the update operation from the preset interface list, and A second update operation request is generated according to the first update operation request; the second update operation request includes the identifier of the target interface, and the second update operation request is used to perform an update operation on the second target resource . 11.一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,其特征在于,所述处理器执行所述计算机程序时实现权利要求1至7中任一项所述方法的步骤。11. A computer device, comprising a memory and a processor, wherein the memory stores a computer program, wherein the processor implements the steps of the method according to any one of claims 1 to 7 when the processor executes the computer program . 12.一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至7中任一项所述的方法的步骤。12. A computer-readable storage medium on which a computer program is stored, characterized in that, when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
CN201880037171.8A 2018-12-14 2018-12-14 Resource updating method and device, computer equipment and storage medium Active CN110741617B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/121283 WO2020118705A1 (en) 2018-12-14 2018-12-14 Resource update method and apparatus, computer device and storage medium

Publications (2)

Publication Number Publication Date
CN110741617A true CN110741617A (en) 2020-01-31
CN110741617B CN110741617B (en) 2022-06-10

Family

ID=69236603

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201880037171.8A Active CN110741617B (en) 2018-12-14 2018-12-14 Resource updating method and device, computer equipment and storage medium

Country Status (2)

Country Link
CN (1) CN110741617B (en)
WO (1) WO2020118705A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113064609A (en) * 2021-03-05 2021-07-02 深圳市欢太科技有限公司 A resource loading method and client, server and storage medium
CN113259443A (en) * 2021-05-20 2021-08-13 远景智能国际私人投资有限公司 Resource data updating system, method, device, equipment and readable storage medium
CN116841622A (en) * 2023-09-01 2023-10-03 上海燧原智能科技有限公司 Address self-increasing memory instruction generation method, device, equipment and medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009205486A (en) * 2008-02-28 2009-09-10 Mitsubishi Electric Corp Data processor and communication system and data processing method and program
US20150237165A1 (en) * 2014-02-20 2015-08-20 International Business Machines Corporation Bulk uploading of multiple self-referencing objects
CN106161393A (en) * 2015-04-17 2016-11-23 伊姆西公司 The method and apparatus realizing the operation of multiple content management service
CN107241293A (en) * 2016-03-28 2017-10-10 杭州萤石网络有限公司 A kind of resource access method, apparatus and system
CN107870814A (en) * 2016-09-23 2018-04-03 伊姆西Ip控股有限责任公司 Method and apparatus for Content Management batch processing
US20180145965A1 (en) * 2016-04-25 2018-05-24 International Business Machines Corporation Protection of application passwords using a secure proxy
CN108141468A (en) * 2015-09-23 2018-06-08 康维达无线有限责任公司 Enhanced RESTFUL operation

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009205486A (en) * 2008-02-28 2009-09-10 Mitsubishi Electric Corp Data processor and communication system and data processing method and program
US20150237165A1 (en) * 2014-02-20 2015-08-20 International Business Machines Corporation Bulk uploading of multiple self-referencing objects
CN106161393A (en) * 2015-04-17 2016-11-23 伊姆西公司 The method and apparatus realizing the operation of multiple content management service
CN108141468A (en) * 2015-09-23 2018-06-08 康维达无线有限责任公司 Enhanced RESTFUL operation
CN107241293A (en) * 2016-03-28 2017-10-10 杭州萤石网络有限公司 A kind of resource access method, apparatus and system
US20180145965A1 (en) * 2016-04-25 2018-05-24 International Business Machines Corporation Protection of application passwords using a secure proxy
CN107870814A (en) * 2016-09-23 2018-04-03 伊姆西Ip控股有限责任公司 Method and apparatus for Content Management batch processing

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113064609A (en) * 2021-03-05 2021-07-02 深圳市欢太科技有限公司 A resource loading method and client, server and storage medium
CN113064609B (en) * 2021-03-05 2024-05-28 深圳市欢太科技有限公司 A resource loading method, client, server, and storage medium
CN113259443A (en) * 2021-05-20 2021-08-13 远景智能国际私人投资有限公司 Resource data updating system, method, device, equipment and readable storage medium
CN113259443B (en) * 2021-05-20 2023-09-29 远景智能国际私人投资有限公司 Resource data updating system, method, device, equipment and readable storage medium
CN116841622A (en) * 2023-09-01 2023-10-03 上海燧原智能科技有限公司 Address self-increasing memory instruction generation method, device, equipment and medium
CN116841622B (en) * 2023-09-01 2023-11-24 上海燧原智能科技有限公司 Address self-increasing memory instruction generation method, device, equipment and medium

Also Published As

Publication number Publication date
WO2020118705A1 (en) 2020-06-18
CN110741617B (en) 2022-06-10

Similar Documents

Publication Publication Date Title
JP7014887B2 (en) PDU type setting method, UE policy setting method, and related entities
CN108268346B (en) Data backup method, device, equipment and storage medium
CN110741617B (en) Resource updating method and device, computer equipment and storage medium
WO2019201040A1 (en) File update management method and system and terminal apparatus
US12106253B2 (en) Container management method, apparatus, and device
CN114281573A (en) Workflow data interaction method, device and electronic device, and readable storage medium
US11991171B2 (en) Communication method for device, device and storage medium
CN107026879B (en) A data caching method and background application system
CN111680328A (en) Data processing method and device, server and computer readable storage medium
CN114281263A (en) Storage resource processing method, system and equipment of container cluster management system
WO2022116575A1 (en) Service platform access permission acquisition method and service platform access control method
CN110740464A (en) NF service discovery method and device
US11445036B1 (en) Cluster management method and apparatus, electronic device and storage medium
US10404578B2 (en) Method for calling routing algorithm, SDN controller, and SDN-OAF
US10904746B2 (en) Implementation method, apparatus and system for remote access
CN111064675B (en) Access flow control method, device, network equipment and storage medium
US10152490B2 (en) Sequential replication with limited number of objects
CN115643028A (en) Business certificate management method and device, storage medium and electronic device
CN106878352A (en) A method for realizing remote access, AllJoyn gateway agent, cloud server and mobile device
WO2024152403A1 (en) Remote network upgrade system and method
CN110741361A (en) Resource query processing method, apparatus, computer equipment and storage medium
CN115062249B (en) Method, device, electronic device and system for exporting pages
US20240143784A1 (en) Method, apparatus, system, and computer program for managing software component
CN109565666B (en) A configuration file management method and device
WO2016112506A1 (en) Method and device for configuring embedded universal integrated circuit card

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant