CN110741617B - 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
CN110741617B
CN110741617B CN201880037171.8A CN201880037171A CN110741617B CN 110741617 B CN110741617 B CN 110741617B CN 201880037171 A CN201880037171 A CN 201880037171A CN 110741617 B CN110741617 B CN 110741617B
Authority
CN
China
Prior art keywords
target resource
interface
operation request
update operation
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.)
Active
Application number
CN201880037171.8A
Other languages
Chinese (zh)
Other versions
CN110741617A (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

Abstract

The application relates to a resource updating method, a device, computer equipment and a storage medium.A server receives a first updating operation request which is sent by a user side and used for updating a target resource, 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.

Description

Resource updating method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of internet of things resource technologies, and in particular, to a resource updating method and apparatus, a computer device, and a storage medium.
Background
Internet of things device methods based on a representation state transfer (restfull) architecture are becoming popular, under which things (devices) in the physical world can all be described in terms of resources (resources), and operate resources in terms of creating, updating, acquiring, deleting, notifying (Creat, Update, Retrieve, Delete, Notification, CURDN).
In the resource description process, a collection resource (collection) is defined, and interfaces (interfaces) are defined to determine the operation mode of the resource, wherein one collection may further include a plurality of links collection (link collection) to which the links are pointing, and a link is a link of a certain resource. When a certain resource needs to be operated, the user side can send an operation instruction carrying a resource identifier and an interface type to the server, and the server operates the resource pointed by the collection and the link according to the operation instruction, wherein the operation mode is interface (interface type) carried by the request message. Common interface types include a recursive interface (batch interface), a default interface (default interface), and the like.
However, when the link collection does not support the batch interface and the default interface does not support the update (update) operation, the modification of the resource pointed by the link cannot be completed.
Disclosure of Invention
Therefore, it is necessary to provide a resource updating method, device, computer equipment and storage medium for solving the technical problem that when the link collection does not support the recursive interface (batch interface) and the default interface (default interface) does not support the update (update) operation, the modification of the resource pointed by the link cannot be completed.
In a first aspect, an embodiment of the present invention provides a resource updating method, where the method includes:
receiving a first updating operation request sent by a user side; the first updating operation request is used for indicating that a recursive interface is adopted to perform updating operation on a first target resource;
if the first target resource is a set resource with a link resource, judging whether a second target resource pointed by the link supports a recursive interface;
if the second target resource does not support a recursive interface and the default interface of the second target resource does not support the updating operation, determining a target interface supporting the updating operation from a preset interface list, and generating a second updating operation request according to the first updating operation request; the second update operation request includes an 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 identification of the first target resource, a recursive interface identification, an update operation identification, and an update content.
In one embodiment, the generating a second update operation request according to the first update operation request includes:
Replacing the recursive interface identifier of the first update operation request with the identifier of the target interface, and replacing the identifier of the first target resource in the first update operation request with the identifier of the second target resource to obtain a second update operation request; wherein the second update operation request includes an identification of the second target resource, an identification of the target interface, the update operation identification, and the update content.
In one embodiment, the method further comprises:
after all the resources in the first target resource are updated, generating a response message; the response message comprises the update results of all the linked resources in the first target resource;
and sending the response message to the user terminal.
In one embodiment, if the first update operation request includes a user-side identifier, before determining whether a second target resource pointed by a link supports a recursive interface when the first target resource is a set resource in which the link exists, the method further includes:
judging whether the user side has the authority of accessing the first target resource or not according to the user side identification;
If the user side has the right to access the first target resource, judging whether the second target resource supports the recursive interface or not when the first target resource is the set resource with the link.
In one embodiment, 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 updating operation, generating a third updating operation request according to the first updating operation request; the third update operation request includes an identifier of the default interface, and the third update operation request is used for performing 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:
replacing the recursive interface identifier in the first update operation request with the identifier of the default interface, and 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 third update operation request;
wherein the third update operation request comprises an identification of the second target resource, an identification of the default interface, an update operation identification, and update content.
In one embodiment, the method further comprises:
if the second target resource supports a recursive interface, generating a fourth updating operation request according to the first updating operation request; the fourth update operation request is used for performing 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 updating operation request with the identifier of the second target resource to obtain a fourth updating operation request;
wherein the fourth update operation request comprises an identification of the second target resource, the recursive interface identification, an update operation identification, and update content.
In a second aspect, an embodiment of the present invention provides a resource updating apparatus, where the apparatus includes:
the receiving module is used for receiving a first updating operation request sent by a user side; the first updating operation request is used for indicating that a recursive interface is adopted to perform updating operation on a first target resource;
the judging module is used for judging whether a second target resource pointed by the link supports a recursive interface or not if the first target resource is a set resource with the link resource;
The processing module is used for determining a target interface supporting the updating operation from a preset interface list and generating a second updating operation request according to the first updating operation request if the second target resource does not support the recursive interface and the default interface of the second target resource does not support the updating operation; the second update operation request includes an 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, where the memory stores a computer program, and the processor implements the following steps when executing the computer program:
receiving a first updating operation request sent by a user side; the first updating operation request is used for indicating that a recursive interface is adopted to perform updating operation on a first target resource;
if the first target resource is a set resource with a link, judging whether a second target resource pointed by the link supports a recursive interface;
if the second target resource does not support a recursive interface and the default interface of the second target resource does not support the updating operation, determining a target interface supporting the updating operation from a preset interface list, and generating a second updating operation request according to the first updating operation request; the second update operation request includes an identifier of the target interface, and the second update operation request is used for performing 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, where the computer program, when executed by a processor, implements the following steps:
receiving a first updating operation request sent by a user side; the first updating operation request is used for indicating that a recursive interface is adopted to perform updating operation on a first target resource;
if the first target resource is a set resource with a link, judging whether a second target resource pointed by the link supports a recursive interface;
if the second target resource does not support a recursive interface and the default interface of the second target resource does not support the updating operation, determining a target interface supporting the updating operation from a preset interface list, and generating a second updating operation request according to the first updating operation request; the second update operation request includes an identifier of the target interface, and the second update operation request is used for performing an update operation on the second target resource.
In the resource updating method, device, computer device and storage medium provided by the present application, a server first receives a first update operation request sent by a client for updating a first target resource, a link resource exists at the first target resource, the link points to a second target resource that does not support a 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 supporting the update operation, and generating a second updating operation request according to the first updating operation request, so that the server can update the second target resource pointed by the link according to the second updating operation request, the flexibility of the server updating resource is greatly improved, and the updating of the resource pointed by the link is realized when the resource pointed by the link does not support a recursive interface and a default interface does not support the updating operation.
Drawings
FIG. 1 is a diagram of an application environment of a resource update method according to an embodiment;
fig. 2 is a flowchart illustrating a resource updating method according to an embodiment;
FIG. 3 is a flowchart illustrating a resource updating method according to an embodiment;
FIG. 4 is a flowchart illustrating a resource updating method according to an embodiment;
FIG. 5 is a block diagram of a resource updating apparatus according to an embodiment;
FIG. 6 is a block diagram of a resource updating apparatus according to an embodiment;
FIG. 7 is a block diagram of a resource updating apparatus according to an embodiment;
FIG. 8 is a block diagram of a resource updating apparatus according to an embodiment;
FIG. 9 is a block diagram of a resource updating apparatus according to an embodiment;
FIG. 10 is a block diagram of an internal architecture of a computer device, according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The resource updating method provided by the present application can be applied to the application environment shown in fig. 1, and includes a client and a server, where the client and the server can communicate with each other in a wireless communication manner, for example: WIFi, infrared communication, or 3G, 4G, 5G, etc. The client may be a lamp, an air conditioner, or the like, and may also be an intelligent mobile terminal such as a mobile phone, a PAD, a computer, or the like, which is not limited in this embodiment. Wherein the server may be a server comprising a processor, a memory, a network interface and a database connected by a system bus. Wherein the processor of the server is configured to provide computing and control capabilities. The memory of the server comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operating system and the computer program to run on the non-volatile storage medium. The database of the server is used for storing data of the resource updating method. The network interface of the server is used for communicating with other external devices through network connection. The computer program is executed by a processor to implement a resource updating method.
Embodiments of the present application provide a resource updating method, apparatus, computer device, and storage medium, which aim to solve the technical problem that when a link collection does not support a batch interface and a default interface does not support an update operation, modification of a resource pointed by a link cannot be completed. The following describes in detail the technical solutions of the present application and how the technical solutions of the present application solve the above technical problems by embodiments and with reference to the drawings. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. It should be noted that, in the resource updating method provided by the present invention, the execution subject is a server, where the execution subject may also be a computer device, or a resource updating apparatus, where the apparatus may implement part or all of resource updating through software, hardware, or a combination of software and hardware.
In order to make the objects, 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 drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In an embodiment, fig. 2 provides a resource updating method, and this embodiment relates to a specific process of how a server performs an updating operation on a second target resource to which a link points when a link resource exists in a first target resource, a second target resource to which the link points does not support a recursive interface, and a default interface of the second target resource to which the link points does not support the updating operation. As shown in fig. 2, the method includes:
s101, receiving a first updating operation request sent by a user side; the first updating operation request is used for indicating that a recursive interface is adopted to carry out updating operation on a first target resource.
The resources are logic functional entities which represent information such as each device, each functional service of the device, the state of the device and the like, the logic functional entities are disclosed to a client by a server for access and operation, the client interacts with the server through a resource operation CRUDN, and parameters of the resources mainly comprise URI, resource attributes, resource references, interfaces and the like. The target resource refers to a resource that the user terminal needs to operate. Recursive interface (batch interface): when the collection resource is operated, the resource pointed by the link recurred to the collection resource is operated.
In this embodiment, the server receives a first update operation request sent by the user side, where the server receives the request in a wireless communication manner, for example: WIFi, infrared communications or 3G, 4G, 5G, etc. Wherein 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 types of server operations, for example: the interface type is a recursive interface, the URI of the first target resource and the attribute information of the interface may further include other information, which is not limited in this embodiment. The first update operation request is used for instructing the server to perform an update operation on a first target resource by using a recursive interface, where the first target resource is an aggregate resource, and the aggregate resource may include a plurality of linked resources.
S102, if the first target resource is a set resource with a link, judging whether a second target resource pointed by the link supports a recursive interface.
Wherein, a link (link) represents a link of a certain resource, that is, a collection (aggregate resource) may include links pointing to other resources, for example, collection a includes a link, and a link points to collection B.
Based on the first update operation request in step S101, when the server updates the first target resource according to the first update operation request, first determining whether the first target resource is an aggregate resource including a link resource, and if the first target resource is an aggregate resource having a link resource, the server determines whether a second target resource to which the link points supports a recursive interface. The collective resource with the linked resource indicates that the collective resource can refer to a plurality of other target resources or other collective resources, that is, if the first target resource is the collective resource with the linked resource, it indicates that the first target resource can refer to a plurality of other target resources or other collective resources. The server determines whether the link resource supports the recursive interface or not, and if so, the server determines that the link resource supports the recursive interface.
S103, if the second target resource does not support a recursive interface and the default interface of the second target resource does not support the updating operation, determining a target interface supporting the updating operation from a preset interface list, and generating a second updating operation request according to the first updating operation request; the second update operation request includes an identifier of the target interface, and the second update operation request is used for performing an update operation on the second target resource.
In this step, the default interface is usually the interface with the first position in the supported interface list (supported interface list) of each resource (including collection, link) as the default interface. Wherein, the supported interface list 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 may be provided, the default interface may be "oic. if. baseline". The preset interface list also includes attribute information of each interface, and the attribute information of each interface represents operations supported by the interface and other information, for example: the attribute information of the interface includes whether the interface supports the update operation, and the like. The number, type and other contents of the interfaces in the preset interface list are not limited in this embodiment, and may be added or deleted according to actual matters. It should be noted that the preset interface list may be pre-stored in the server, and may be directly called when in use.
In practical application, based on the step S102, the server determines that the second target resource does not support a recursive interface (batch interface), the server obtains a default interface of the second target resource, checks whether the default interface supports the update operation, if the default interface does not support the update operation, the server re-determines an interface capable of supporting the update operation from a preset interface list as the target interface of the link resource, for example, all interfaces supported by the second target resource can be traversed in service, finds an interface capable of supporting the update operation as the target interface, generates a second update operation request according to the first update operation request, and then performs the update operation on the second target resource according to the second update operation request.
In the resource updating method provided by this embodiment, the server first receives a first update operation request sent by the user end for updating the first target resource, and when the first target resource has a link resource, if the second target resource to which the link points 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 supporting the update operation, and generates a second update operation request according to the first update operation request.
Optionally, on the basis of 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 update content. The identifier of the first target Resource may be a unique identifier of the first target Resource, where the identifier may be a number, an alphabet, or a combination of a number and an alphabet, for example, the identifier of the first target Resource may be a Uniform Resource Locator (URL) of a target Resource (target Resource), and the embodiment does not limit the identifier of the first target Resource. The identifier of the recursive interface indicates that the interface operates in a recursive manner, for example, the oic. The first update operation identifier may be a number, an alphabet, or a combination of the number and the alphabet, and is used to indicate a unique identifier of the first update operation request, for example, Op: update indicates that the operation type is an update operation, the server determines a first target resource that needs to be operated according to the update operation identifier, and updates 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 identifier of the recursive interface, the identifier of the update operation, and the update content, when the server receives the first update operation request sent by the user, the server can quickly and correctly respond to the request, thereby greatly improving the response speed of the server.
In an embodiment, one implementation manner of the "generating a second update operation request according to the first update operation request" in S103 includes: replacing the recursive interface identifier in the first update operation request with the identifier of the target interface, and replacing the identifier of the first target resource in the first update operation request with the identifier of the second target resource to obtain a second update operation request; wherein the second update operation request includes an identification of the second target resource, an identification of the target interface, the update operation identification, and the update content.
In the embodiment provided in 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 that the first target resource has a link resource, and the second target resource pointed by the link does not support the recursive interface, and the default interface of the second target resource does not support the update operation, the server may generate the second update operation request based on the first update operation request by replacing the recursive interface identification in the first update operation request with the identification of the target interface, namely, the interface identification of the target interface is carried in the first updating operation request, then the identification of the second target resource is replaced by the identification of the first target resource, the new update operation request replacing the interface identifier and the resource identifier is the second update operation request generated by the server according to the first update operation request. The second update operation request includes an identification of the second target resource, an identification of the target interface, an update operation identification, and update content. In this embodiment, when the server determines that the information carried in the current first update operation request cannot be updated, the server regenerates the second update operation request capable of being updated, so as to update the resource according to the second update operation request, thereby greatly improving the flexibility of updating the resource of the server, and implementing that the resource pointed by the link is updated when the resource pointed by the link does not support the recursive interface and the default interface does not support the update operation.
Since the resource updating method provided by the present application is mainly used for updating resources by the server according to a request of the user side, after the update is completed, the server needs to feed back information of successful update to the user side, in an embodiment, as shown in fig. 3, this embodiment relates to a specific process in which the server sends a result of completion of update of all the resources in the first target resource to the user side, and the method includes:
s201, after all the resources in the first target resource are updated, generating a response message; the reply message includes the update results for all of 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 updating, and then, after the server completes updating each resource in the first target resource requested to be updated by the client according to each second update operation request, aggregates update results of all updated resources to generate a response message, where the response message is used to indicate a response to the client to send an update resource request.
And S202, sending the response message to the user side.
Based on the response message generated in the step S201, the server sends the response message to the user end, where the sending mode is the same as the mode of receiving the request sent by the user end, and the response message is transmitted in a wireless communication mode, and of course, the transmission path may be returned along the original path, and other more convenient paths are also started, which is not limited in this embodiment.
In the resource updating method provided in this embodiment, after the server completes updating all the resources in the first target resource requested to be updated by the client according to the second update operation request, the server generates response messages according to the update results of all the resources in the first target resource after all the resources are updated, and sends the response messages to the client, so that the client knows that the resource requested to be updated has been updated, and the message interactivity between the client and the server is greatly increased.
In addition, before the server performs the update operation according to the first update operation request of the user, the server needs to identify whether the user has an authority to access the first target resource, and then when a link resource exists in the first target resource, before determining whether the second target resource to which the link points supports the recursive interface, an embodiment is further provided in the present application, which relates to a specific process in which the server determines whether the user has an access authority to the first target resource according to an identifier of the user, and determines 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, judging whether the user side has the authority of accessing the first target resource according to the user side identification.
The user-side identifier is an identity identifier of the user side, and may be, for example, a number, a letter, or a combination of the number and the letter, which is not limited in this embodiment. In practical application, a corresponding relationship between the user side identifier and the access right can be pre-established according to the right of each user side, the server queries the corresponding relationship, and judges whether the user side has the right to access the first target resource, if so, the user side has the right to access the first target resource, otherwise, the user side has no right to access the first target resource. It can be understood that each of the first target resources has its own identifier, and if a user needs to access a certain first target resource, a mapping relationship between the user and the first target resource needs to be established in advance, and the mapping relationship is stored in the server.
S302, if the user side has the right to access the first target resource, when the first target resource is a set resource with a link, whether the second target resource supports a recursive interface is judged.
In this step, if it is determined in step S301 that the user side has the right to access the first target resource, the process continues to execute steps S101 to S103 in fig. 2, that is, when a link resource exists in the first target resource, it is determined whether the second target resource pointed by the link supports the recursive interface, where 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 for whether the recursive interface exists in a preset interface list of the second target resource, and if the recursive interface exists, the server determines that the second target resource supports the recursive interface.
In the resource updating method provided by this embodiment, the server determines, according to the identifier of the user side, whether the user side has the authority to access the first target resource, and when it is determined that the authority exists, and the first target resource is an aggregate resource with a link, it determines whether the second target resource supports a recursive interface, so that the subsequent steps are performed only when the user side has the authority to access the first target resource, thereby preventing the user side without access authority from accessing the first target resource, improving the security and reliability of resource information, and avoiding the waste of server resources and time.
Considering the case when the second target resource does not support the recursive interface, but its default interface supports the update operation, in one embodiment, 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 updating operation, generating a third updating operation request according to the first updating operation request; the third update operation request includes an identifier of the default interface, and the third update operation request is used for performing an update operation on the second target resource. Optionally, one implementation manner of generating a third update operation request according to the first update operation request is as follows: replacing the recursive interface identifier in the first update operation request with the identifier of the default interface, and 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 third update operation request; wherein the third update operation request comprises an identification of the second target resource, an identification of the default interface, an update operation identification, and update content.
In practical application, the second target resource determined by the server does not support the recursive interface, but the default interface of the second target resource acquired by the server supports the update operation, the server generates a third update operation request according to the first update operation request, and then the server performs the 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 recursive interface in the first target resource with the interface identifier of the default interface, then replaces the first target resource identifier with the identifier of the second target resource, and finally determines the new update operation request in which the interface identifier and the resource identifier are replaced as the third update operation request, and the generated third update operation request includes the identifier of the second target resource, the identifier of the default interface, the update operation identifier, and the update content.
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 a third update operation request according to the first update operation request. Therefore, when the server determines that the current recursive interface can not realize resource updating, the default interface supporting updating generates a third updating operation request according to the first updating operation request, and the flexibility of updating resources by the server is greatly improved.
Considering the above step S102, when the second target resource supports the recursive interface, an embodiment of the present application provides a resource updating method, where the method further includes: if the second target resource supports a recursive interface, generating a fourth updating operation request according to the first updating operation request; the fourth update operation request is used for performing update operation on the second target resource. Optionally, one implementation manner of generating a fourth update operation request according to the first update operation request is as follows: replacing the identifier of the first target resource in the first updating operation request with the identifier of the second target resource to obtain a fourth updating operation request; wherein the fourth update operation request comprises an identification of the second target resource, the recursive interface identification, an update operation identification, and update content.
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 the new update operation request is determined to be the fourth update operation request, where 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 the recursive interface, the server generates a fourth update operation request according to the first update operation request. Therefore, when the server determines that the current recursive interface can realize resource updating, the server directly updates the resources according to the generated fourth updating operation request, and the speed of updating the resources by the server is greatly improved.
It should be understood that although the various steps in the flow charts of fig. 2-4 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-4 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 5, an embodiment of the present application provides a resource updating apparatus, including: the device comprises a receiving module 10, a judging module 11 and a processing module 12. Wherein, the first and the second end of the pipe are connected with each other,
a receiving module 10, configured to receive a first update operation request sent by a user end; the first updating operation request is used for indicating that a recursive interface is adopted to perform updating operation on a first target resource;
a determining module 11, configured to determine whether a second target resource pointed by the link supports a recursive interface if the first target resource is a set resource in which a link resource exists;
a processing module 12, configured to determine, if the second target resource does not support a recursive interface and a default interface of the second target resource does not support an update operation, a target interface that supports the update operation from a preset interface list, and generate a second update operation request according to the first update operation request; the second update operation request includes an identifier of the target interface, and the second update operation request is used for performing an update operation on the second target resource.
The implementation principle and technical effect of the resource updating apparatus provided in the foregoing embodiments are similar to those of the foregoing method embodiments, and are not described herein again.
In one embodiment, the first update operation request includes an identification of a first target resource, a recursive interface identification, an update operation identification, and update content.
The implementation principle and technical effect of the resource updating apparatus provided in the foregoing embodiments are similar to those of the foregoing method embodiments, and are not described herein again.
In an embodiment, the processing module 12 is specifically configured to replace the identifier of the recursive interface 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, so as to obtain the second update operation request;
wherein the second update operation request includes an identification of the second target resource, an identification of the target interface, the update operation identification, and the update content.
The implementation principle and technical effect of the resource updating apparatus provided in the foregoing embodiments are similar to those of the foregoing method embodiments, and are not described herein again.
In an embodiment, as shown in fig. 6, an embodiment of the present application provides a resource updating apparatus, where the apparatus further includes: a generating module 13 and a sending module 14. Wherein, the first and the second end of the pipe are connected with each other,
A generating module 13, configured to generate a response message after all the resources in the first target resource are updated; the response message comprises the update results of all the linked resources in the first target resource;
and a sending module 14, configured to send the response message to the user side.
The implementation principle and technical effect of the resource updating apparatus provided in the foregoing embodiments are similar to those of the foregoing method embodiments, and are not described herein again.
In an embodiment, as shown in fig. 7, an embodiment of the present application provides a resource updating apparatus, where the apparatus further includes: and a judging authority module 15. Wherein the content of the first and second substances,
the permission judging module 15 is configured to judge whether the user side has a permission to access the first target resource according to the user side identifier;
a determining module 11, configured to determine whether the second target resource supports a recursive interface when the first target resource is a set resource with a link if the user side has an authority to access the first target resource.
The implementation principle and technical effect of the resource updating apparatus provided in the foregoing embodiments are similar to those of the foregoing method embodiments, and are not described herein again.
In an embodiment, as shown in fig. 8, an embodiment of the present application provides a resource updating apparatus, where the apparatus further includes: a second generating module 17, configured to generate a third update operation request according to the first update operation request if the second target resource does not support a recursive interface and a default interface of the second target resource supports an update operation; the third update operation request includes an identifier of the default interface, and the third update operation request is used for performing an update operation on the second target resource.
In an embodiment, the second generating module 17 is further configured to replace the identifier of the recursive interface in the first update operation request with the identifier of the default interface, and replace the identifier of the first target resource in the first update operation request with the identifier of the second target resource, so as to obtain the third update operation request; wherein the third update operation request comprises an identification of the second target resource, an identification of the default interface, an update operation identification, and update content.
The implementation principle and technical effect of the resource updating apparatus provided in the foregoing embodiments are similar to those of the foregoing method embodiments, and are not described herein again.
In an embodiment, as shown in fig. 9, an embodiment of the present application provides a resource updating apparatus, where the apparatus further includes: a third generating module 18, configured to generate a fourth update operation request according to the first update operation request if the second target resource supports a recursive interface; the fourth update operation request is used for performing an update operation on the second target resource.
In one embodiment, the third generating 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, resulting in the fourth update operation request; wherein the fourth update operation request comprises an identification of the second target resource, the recursive interface identification, an update operation identification, and update content.
The implementation principle and technical effect of the resource updating apparatus provided in the foregoing embodiments are similar to those of the foregoing method embodiments, and are not described herein again.
For the specific limitation of the resource updating apparatus, reference may be made to the above limitation of the resource updating method, which is not described herein again. The modules in the resource update processing apparatus may be implemented in whole or in part by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, and the internal structure thereof may be as shown in fig. 10. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing resource update data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a resource updating method.
Those skilled in the art will appreciate that the architecture shown in fig. 10 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:
receiving a first updating operation request sent by a user side; the first updating operation request is used for indicating that a recursive interface is adopted to perform updating operation on a first target resource;
if the first target resource is a set resource with a link, judging whether a second target resource pointed by the link supports a recursive interface;
if the second target resource does not support a recursive interface and the default interface of the second target resource does not support the updating operation, determining a target interface supporting the updating operation from a preset interface list, and generating a second updating operation request according to the first updating operation request; the second update operation request includes an identifier of the target interface, and the second update operation request is used for performing an update operation on the second target resource.
The implementation principle and technical effect of the computer device provided by the above embodiment are similar to those of the above method embodiment, and are not described herein again.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
Receiving a first updating operation request sent by a user side; the first updating operation request is used for indicating that a recursive interface is adopted to perform updating operation on a first target resource;
if the first target resource is a set resource with a link, judging whether a second target resource pointed by the link supports a recursive interface;
if the second target resource does not support a recursive interface and the default interface of the second target resource does not support the updating operation, determining a target interface supporting the updating operation from a preset interface list, and generating a second updating operation request according to the first updating operation request; the second update operation request includes an identifier of the target interface, and the second update operation request is used for performing an update operation on the second target resource.
The implementation principle and technical effect of the computer-readable storage medium provided by the above embodiments are similar to those of the above method embodiments, and are not described herein again.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features. The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method for resource update, the method comprising:
receiving a first updating operation request sent by a user side; the first updating operation request is used for indicating that a recursive interface is adopted to perform updating operation on a first target resource; the first updating operation request comprises an identifier of the first target resource, a recursive interface identifier, an updating operation identifier and updating content;
If the first target resource is a set resource with a link, judging whether a second target resource pointed by the link supports a recursive interface;
if the second target resource does not support a recursive interface and the default interface of the second target resource does not support the update operation, determining a target interface supporting the update operation from a preset interface list, replacing the identifier of the recursive interface in the first update operation request with the identifier of the target interface, and replacing the identifier of the first target resource in the first update operation request with the identifier of the second target resource to obtain a second update operation request;
the second update operation request includes an identifier of the second target resource, an identifier of the target interface, the update operation identifier, and the update content, and is used to perform an update operation on the second target resource.
2. The method of claim 1, further comprising:
after all the resources in the first target resource are updated, generating a response message; the response message comprises the update results of all the resources in the first target resource;
And sending the response message to the user terminal.
3. The method of claim 1, wherein the first update operation request includes a user-side identifier, and before determining whether a second target resource pointed to by a link supports a recursive interface, if the first target resource is a set resource in which the link exists, the method further includes:
judging whether the user side has the authority of accessing the first target resource or not according to the user side identification;
if the user side has the right to access the first target resource, judging whether the second target resource supports the recursive interface or not when the first target resource is the set resource with the link.
4. The method of claim 1, further comprising:
if the second target resource does not support a recursive interface and the default interface of the second target resource supports an updating operation, generating a third updating operation request according to the first updating operation request; the third update operation request includes an identifier of the default interface, and the third update operation request is used for performing an update operation on the second target resource.
5. The method of claim 4, wherein generating a third update operation request according to the first update operation request comprises:
replacing the recursive interface identifier in the first update operation request with the identifier of the default interface, and 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 third update operation request;
wherein the third update operation request comprises an identification of the second target resource, an identification of the default interface, an update operation identification, and update content.
6. The method of claim 1, further comprising:
if the second target resource supports a recursive interface, generating a fourth updating operation request according to the first updating operation request; the fourth update operation request is used for performing an update operation on the second target resource.
7. The method of claim 1, wherein generating a fourth update operation request based on the first update operation request comprises:
replacing the identifier of the first target resource in the first updating operation request with the identifier of the second target resource to obtain a fourth updating operation request;
Wherein the fourth update operation request comprises an identification of the second target resource, the recursive interface identification, an update operation identification, and update content.
8. An apparatus for resource update, the apparatus comprising:
the receiving module is used for receiving a first updating operation request sent by a user side; the first updating operation request is used for indicating that a recursive interface is adopted to perform updating operation on a first target resource; the first updating operation request comprises an identifier of the first target resource, a recursive interface identifier, an updating operation identifier and updating content;
the judging module is used for judging whether a second target resource pointed by the link supports a recursive interface or not if the first target resource is a set resource with the link;
a processing module, configured to determine, if the second target resource does not support a recursive interface and a default interface of the second target resource does not support an update operation, a target interface that supports the update operation from a preset interface list, replace a recursive interface identifier in the first update operation request with an identifier of the target interface, and replace an identifier of the first target resource in the first update operation request with an identifier of the second target resource to obtain a second update operation request;
The second update operation request includes an identifier of the second target resource, an identifier of the target interface, the update operation identifier, and the update content, and is used to perform an update operation on the second target resource.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor when executing the computer program performs the steps of the method according to any of claims 1 to 5.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 5.
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 CN110741617A (en) 2020-01-31
CN110741617B true 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)

Families Citing this family (3)

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

Citations (5)

* 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
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
CN108141468A (en) * 2015-09-23 2018-06-08 康维达无线有限责任公司 The RESTFUL operations of enhancing

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9398068B2 (en) * 2014-02-20 2016-07-19 International Business Machines Corporation Bulk uploading of multiple self-referencing objects
US9887990B2 (en) * 2016-04-25 2018-02-06 International Business Machines Corporation Protection of application passwords using a secure proxy

Patent Citations (5)

* 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
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 康维达无线有限责任公司 The RESTFUL operations of enhancing
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

Also Published As

Publication number Publication date
WO2020118705A1 (en) 2020-06-18
CN110741617A (en) 2020-01-31

Similar Documents

Publication Publication Date Title
CN108845816B (en) Application program updating method, system, computer device and storage medium
EP3337219B1 (en) Carrier configuration processing method, device and system, and computer storage medium
US20220109974A1 (en) Esim card change method and related device
CN110741617B (en) Resource updating method and device, computer equipment and storage medium
CN109391673B (en) Method, system and terminal equipment for managing update file
CN107967140B (en) Software modification initiating method, metadata publishing method and device
CN112399130B (en) Processing method and device of cloud video conference information, storage medium and communication equipment
CN107015870B (en) Method and device for realizing communication between web page and local application and electronic equipment
CN108268346B (en) Data backup method, device, equipment and storage medium
CN108966159B (en) Short message withdrawing method, system, computer equipment and storage medium
CN114281573A (en) Workflow data interaction method and device, electronic device and readable storage medium
WO2011023122A1 (en) Method, device and system for routing service
US10715628B2 (en) Attribute operating method and device
CN111680328A (en) Data processing method and device, server and computer readable storage medium
CN109196891A (en) A kind of management method, terminal and the server of subscription data collection
CN111984520A (en) Buried point testing method, computer device and computer-readable storage medium
CN107301053B (en) Picture configuration method and device and electronic terminal
CN112818270A (en) Data cross-domain transfer method and device and computer equipment
CN108595274B (en) Program synchronization control method, device, system, computer device and storage medium
KR20210043654A (en) Method, apparatus and storage medium for resource organization
CN109548020B (en) Compensation method and device after authentication failure, server and storage medium
CN112579956A (en) Website account management method and device and electronic equipment
CN113596105A (en) Content acquisition method, edge node and computer-readable storage medium
CN113746932A (en) Network request merging method and device, electronic device and computer program product
CN111064675A (en) Access flow control method, device, network equipment and storage medium

Legal Events

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